userenv/tests: Fix buffer overrun.
[wine/multimedia.git] / include / msvcrt / direct.h
blobb0c4af816ca761bc75096e85841044f050605624
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 #include <pshpack8.h>
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 #ifndef _WCHAR_T_DEFINED
21 #define _WCHAR_T_DEFINED
22 #ifndef __cplusplus
23 typedef unsigned short wchar_t;
24 #endif
25 #endif
27 #if defined(__x86_64__) && !defined(_WIN64)
28 #define _WIN64
29 #endif
31 #if !defined(_MSC_VER) && !defined(__int64)
32 # ifdef _WIN64
33 # define __int64 long
34 # else
35 # define __int64 long long
36 # endif
37 #endif
39 #ifndef _SIZE_T_DEFINED
40 #ifdef _WIN64
41 typedef unsigned __int64 size_t;
42 #else
43 typedef unsigned int size_t;
44 #endif
45 #define _SIZE_T_DEFINED
46 #endif
48 #ifndef _DISKFREE_T_DEFINED
49 #define _DISKFREE_T_DEFINED
50 struct _diskfree_t {
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*);
59 int _chdrive(int);
60 char* _getcwd(char*,int);
61 char* _getdcwd(int,char*,int);
62 int _getdrive(void);
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 */
76 #ifdef __cplusplus
78 #endif
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); }
86 #include <poppack.h>
88 #endif /* __WINE_DIRECT_H */