1 | /* Copyright (C) MariaDB Corporation Ab */ |
2 | #ifndef __OSUTIL_H__ |
3 | #define __OSUTIL_H__ |
4 | |
5 | #if defined(UNIX) || defined(UNIV_LINUX) |
6 | #include "my_global.h" |
7 | #include <errno.h> |
8 | #include <stddef.h> |
9 | #include "os.h" |
10 | |
11 | #define MB_OK 0x00000000 |
12 | |
13 | #ifdef __cplusplus |
14 | extern "C" { |
15 | #endif |
16 | |
17 | int GetLastError(); |
18 | void _splitpath(const char*, char*, char*, char*, char*); |
19 | void _makepath(char*, const char*, const char*, const char*, const char*); |
20 | char *_fullpath(char *absPath, const char *relPath, size_t maxLength); |
21 | BOOL MessageBeep(uint); |
22 | unsigned long _filelength(int fd); |
23 | |
24 | PSZ strupr(PSZ s); |
25 | PSZ strlwr(PSZ s); |
26 | |
27 | typedef size_t FILEPOS; |
28 | //pedef int FILEHANDLE; // UNIX |
29 | |
30 | #ifdef __cplusplus |
31 | } |
32 | #endif |
33 | |
34 | #else /* WINDOWS */ |
35 | #include <windows.h> |
36 | |
37 | typedef __int64 FILEPOS; |
38 | //pedef HANDLE FILEHANDLE; // Win32 |
39 | |
40 | #endif /* WINDOWS */ |
41 | |
42 | #define XSTR(x) ((x)?(x):"<null>") |
43 | |
44 | |
45 | #ifdef __cplusplus |
46 | extern "C" { |
47 | #endif |
48 | my_bool CloseFileHandle(HANDLE h); |
49 | #ifdef __cplusplus |
50 | } |
51 | #endif |
52 | |
53 | |
54 | #endif /* __OSUTIL_H__ */ |
55 | |