2 * Path and directory definitions
4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
8 #ifndef __WINE_DIRECT_H
9 #define __WINE_DIRECT_H
10 #ifndef __WINE_USE_MSVCRT
11 #define __WINE_USE_MSVCRT
18 #ifndef _WCHAR_T_DEFINED
19 #define _WCHAR_T_DEFINED
21 typedef unsigned short wchar_t;
25 #if !defined(_MSC_VER) && !defined(__int64)
26 #define __int64 long long
29 #if defined(__x86_64__) && !defined(_WIN64)
33 #ifndef _SIZE_T_DEFINED
35 typedef unsigned __int64 size_t;
37 typedef unsigned int size_t;
39 #define _SIZE_T_DEFINED
42 #ifndef _DISKFREE_T_DEFINED
43 #define _DISKFREE_T_DEFINED
45 unsigned int total_clusters;
46 unsigned int avail_clusters;
47 unsigned int sectors_per_cluster;
48 unsigned int bytes_per_sector;
50 #endif /* _DISKFREE_T_DEFINED */
52 int _chdir(const char*);
54 char* _getcwd(char*,int);
55 char* _getdcwd(int,char*,int);
57 unsigned long _getdrives(void);
58 int _mkdir(const char*);
59 int _rmdir(const char*);
61 #ifndef _WDIRECT_DEFINED
62 #define _WDIRECT_DEFINED
63 int _wchdir(const wchar_t*);
64 wchar_t* _wgetcwd(wchar_t*,int);
65 wchar_t* _wgetdcwd(int,wchar_t*,int);
66 int _wmkdir(const wchar_t*);
67 int _wrmdir(const wchar_t*);
68 #endif /* _WDIRECT_DEFINED */
75 static inline int chdir(const char* newdir) { return _chdir(newdir); }
76 static inline char* getcwd(char * buf, int size) { return _getcwd(buf, size); }
77 static inline int mkdir(const char* newdir) { return _mkdir(newdir); }
78 static inline int rmdir(const char* dir) { return _rmdir(dir); }
80 #endif /* __WINE_DIRECT_H */