summaryrefslogtreecommitdiffstats
path: root/storage/connect/osutil.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /storage/connect/osutil.h
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/connect/osutil.h')
-rw-r--r--storage/connect/osutil.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/storage/connect/osutil.h b/storage/connect/osutil.h
new file mode 100644
index 00000000..380e7beb
--- /dev/null
+++ b/storage/connect/osutil.h
@@ -0,0 +1,58 @@
+/* Copyright (C) MariaDB Corporation Ab */
+#ifndef __OSUTIL_H__
+#define __OSUTIL_H__
+
+#if defined(UNIX) || defined(UNIV_LINUX)
+#if defined(MARIADB)
+#include "my_global.h"
+#else
+#include "mini-global.h"
+#endif
+#include <errno.h>
+#include <stddef.h>
+#include "os.h"
+
+#define MB_OK 0x00000000
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int GetLastError();
+void _splitpath(const char*, char*, char*, char*, char*);
+void _makepath(char*, const char*, const char*, const char*, const char*);
+char *_fullpath(char *absPath, const char *relPath, size_t maxLength);
+BOOL MessageBeep(uint);
+unsigned long _filelength(int fd);
+
+PSZ strupr(PSZ s);
+PSZ strlwr(PSZ s);
+
+typedef size_t FILEPOS;
+//pedef int FILEHANDLE; // UNIX
+
+#ifdef __cplusplus
+}
+#endif
+
+#else /* WINDOWS */
+#include <windows.h>
+
+typedef __int64 FILEPOS;
+//pedef HANDLE FILEHANDLE; // Win32
+
+#endif /* WINDOWS */
+
+#define XSTR(x) ((x)?(x):"<null>")
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+my_bool CloseFileHandle(HANDLE h);
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __OSUTIL_H__ */