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
14extern "C" {
15#endif
16
17int GetLastError();
18void _splitpath(const char*, char*, char*, char*, char*);
19void _makepath(char*, const char*, const char*, const char*, const char*);
20char *_fullpath(char *absPath, const char *relPath, size_t maxLength);
21BOOL MessageBeep(uint);
22unsigned long _filelength(int fd);
23
24PSZ strupr(PSZ s);
25PSZ strlwr(PSZ s);
26
27typedef size_t FILEPOS;
28//pedef int FILEHANDLE; // UNIX
29
30#ifdef __cplusplus
31}
32#endif
33
34#else /* WINDOWS */
35#include <windows.h>
36
37typedef __int64 FILEPOS;
38//pedef HANDLE FILEHANDLE; // Win32
39
40#endif /* WINDOWS */
41
42#define XSTR(x) ((x)?(x):"<null>")
43
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48my_bool CloseFileHandle(HANDLE h);
49#ifdef __cplusplus
50}
51#endif
52
53
54#endif /* __OSUTIL_H__ */
55