- Prefix many more functions, types, structs, etc. with MSVCRT_.
[wine.git] / include / msvcrt / direct.h
blobe4fef570ef162aae4a958596e2d286a002573036
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
10 #ifndef __WINE_USE_MSVCRT
11 #define __WINE_USE_MSVCRT
12 #endif
14 #ifndef MSVCRT
15 # ifdef USE_MSVCRT_PREFIX
16 # define MSVCRT(x) MSVCRT_##x
17 # else
18 # define MSVCRT(x) x
19 # endif
20 #endif
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 #ifndef MSVCRT_WCHAR_T_DEFINED
27 #define MSVCRT_WCHAR_T_DEFINED
28 #ifndef __cplusplus
29 typedef unsigned short MSVCRT(wchar_t);
30 #endif
31 #endif
33 #ifndef MSVCRT_SIZE_T_DEFINED
34 typedef unsigned int MSVCRT(size_t);
35 #define MSVCRT_SIZE_T_DEFINED
36 #endif
38 #ifndef MSVCRT_DISKFREE_T_DEFINED
39 #define MSVCRT_DISKFREE_T_DEFINED
40 struct MSVCRT(_diskfree_t) {
41 unsigned int total_clusters;
42 unsigned int avail_clusters;
43 unsigned int sectors_per_cluster;
44 unsigned int bytes_per_sector;
46 #endif /* MSVCRT_DISKFREE_T_DEFINED */
48 int _chdir(const char*);
49 int _chdrive(int);
50 char* _getcwd(char*,int);
51 char* _getdcwd(int,char*,int);
52 int _getdrive(void);
53 unsigned long _getdrives(void);
54 int _mkdir(const char*);
55 int _rmdir(const char*);
57 #ifndef MSVCRT_WDIRECT_DEFINED
58 #define MSVCRT_WDIRECT_DEFINED
59 int _wchdir(const MSVCRT(wchar_t)*);
60 MSVCRT(wchar_t)* _wgetcwd(MSVCRT(wchar_t)*,int);
61 MSVCRT(wchar_t)* _wgetdcwd(int,MSVCRT(wchar_t)*,int);
62 int _wmkdir(const MSVCRT(wchar_t)*);
63 int _wrmdir(const MSVCRT(wchar_t)*);
64 #endif /* MSVCRT_WDIRECT_DEFINED */
66 #ifdef __cplusplus
68 #endif
71 #ifndef USE_MSVCRT_PREFIX
72 static inline int chdir(const char* newdir) { return _chdir(newdir); }
73 static inline char* getcwd(char * buf, int size) { return _getcwd(buf, size); }
74 static inline int mkdir(const char* newdir) { return _mkdir(newdir); }
75 static inline int rmdir(const char* dir) { return _rmdir(dir); }
76 #endif /* USE_MSVCRT_PREFIX */
78 #endif /* __WINE_DIRECT_H */