include: Add the msvcrt/crtdefs.h header and include it where needed.
[wine/wine64.git] / include / msvcrt / direct.h
blob4fc3943ec182726e4bf3f926c482cc1bc54a3b9c
1 /*
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.
7 */
8 #ifndef __WINE_DIRECT_H
9 #define __WINE_DIRECT_H
11 #include <crtdefs.h>
13 #include <pshpack8.h>
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
19 #ifndef _DISKFREE_T_DEFINED
20 #define _DISKFREE_T_DEFINED
21 struct _diskfree_t {
22 unsigned int total_clusters;
23 unsigned int avail_clusters;
24 unsigned int sectors_per_cluster;
25 unsigned int bytes_per_sector;
27 #endif /* _DISKFREE_T_DEFINED */
29 int _chdir(const char*);
30 int _chdrive(int);
31 char* _getcwd(char*,int);
32 char* _getdcwd(int,char*,int);
33 int _getdrive(void);
34 unsigned long _getdrives(void);
35 int _mkdir(const char*);
36 int _rmdir(const char*);
38 #ifndef _WDIRECT_DEFINED
39 #define _WDIRECT_DEFINED
40 int _wchdir(const wchar_t*);
41 wchar_t* _wgetcwd(wchar_t*,int);
42 wchar_t* _wgetdcwd(int,wchar_t*,int);
43 int _wmkdir(const wchar_t*);
44 int _wrmdir(const wchar_t*);
45 #endif /* _WDIRECT_DEFINED */
47 #ifdef __cplusplus
49 #endif
52 static inline int chdir(const char* newdir) { return _chdir(newdir); }
53 static inline char* getcwd(char * buf, int size) { return _getcwd(buf, size); }
54 static inline int mkdir(const char* newdir) { return _mkdir(newdir); }
55 static inline int rmdir(const char* dir) { return _rmdir(dir); }
57 #include <poppack.h>
59 #endif /* __WINE_DIRECT_H */