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
20 #ifndef _WCHAR_T_DEFINED
21 #define _WCHAR_T_DEFINED
23 typedef unsigned short wchar_t;
27 #if defined(__x86_64__) && !defined(_WIN64)
31 #if !defined(_MSC_VER) && !defined(__int64)
35 # define __int64 long long
39 #ifndef _SIZE_T_DEFINED
41 typedef unsigned __int64
size_t;
43 typedef unsigned int size_t;
45 #define _SIZE_T_DEFINED
48 #ifndef _DISKFREE_T_DEFINED
49 #define _DISKFREE_T_DEFINED
51 unsigned int total_clusters
;
52 unsigned int avail_clusters
;
53 unsigned int sectors_per_cluster
;
54 unsigned int bytes_per_sector
;
56 #endif /* _DISKFREE_T_DEFINED */
58 int _chdir(const char*);
60 char* _getcwd(char*,int);
61 char* _getdcwd(int,char*,int);
63 unsigned long _getdrives(void);
64 int _mkdir(const char*);
65 int _rmdir(const char*);
67 #ifndef _WDIRECT_DEFINED
68 #define _WDIRECT_DEFINED
69 int _wchdir(const wchar_t*);
70 wchar_t* _wgetcwd(wchar_t*,int);
71 wchar_t* _wgetdcwd(int,wchar_t*,int);
72 int _wmkdir(const wchar_t*);
73 int _wrmdir(const wchar_t*);
74 #endif /* _WDIRECT_DEFINED */
81 static inline int chdir(const char* newdir
) { return _chdir(newdir
); }
82 static inline char* getcwd(char * buf
, int size
) { return _getcwd(buf
, size
); }
83 static inline int mkdir(const char* newdir
) { return _mkdir(newdir
); }
84 static inline int rmdir(const char* dir
) { return _rmdir(dir
); }
88 #endif /* __WINE_DIRECT_H */