master
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _INC_DIRECT
7#define _INC_DIRECT
8
9#include <crtdefs.h>
10#include <io.h>
11
12#pragma pack(push,_CRT_PACKING)
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#ifndef _DISKFREE_T_DEFINED
19#define _DISKFREE_T_DEFINED
20 struct _diskfree_t {
21 unsigned total_clusters;
22 unsigned avail_clusters;
23 unsigned sectors_per_cluster;
24 unsigned bytes_per_sector;
25 };
26#endif
27
28#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
29#pragma push_macro("_getcwd")
30#undef _getcwd
31#pragma push_macro("_getdcwd")
32#undef _getdcwd
33#pragma push_macro("_getdcwd_nolock")
34#undef _getdcwd_nolock
35#endif
36 _CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes);
37 _CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes);
38#if __MSVCRT_VERSION__ >= 0x800
39 char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes);
40#endif
41#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
42#pragma pop_macro("_getcwd")
43#pragma pop_macro("_getdcwd")
44#pragma pop_macro("_getdcwd_nolock")
45#endif
46 _CRTIMP int __cdecl _chdir(const char *_Path);
47 _CRTIMP int __cdecl _mkdir(const char *_Path);
48 _CRTIMP int __cdecl _rmdir(const char *_Path);
49#ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
50 _CRTIMP int __cdecl _chdrive(int _Drive);
51 _CRTIMP int __cdecl _getdrive(void);
52 _CRTIMP unsigned long __cdecl _getdrives(void);
53
54#ifndef _GETDISKFREE_DEFINED
55#define _GETDISKFREE_DEFINED
56 _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
57#endif
58#endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */
59
60#ifndef _WDIRECT_DEFINED
61#define _WDIRECT_DEFINED
62#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
63#pragma push_macro("_wgetcwd")
64#undef _wgetcwd
65#pragma push_macro("_wgetdcwd")
66#undef _wgetdcwd
67#pragma push_macro("_wgetdcwd_nolock")
68#undef _wgetdcwd_nolock
69#endif
70 _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
71 _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
72#if __MSVCRT_VERSION__ >= 0x800
73 wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
74#endif
75#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
76#pragma pop_macro("_wgetcwd")
77#pragma pop_macro("_wgetdcwd")
78#pragma pop_macro("_wgetdcwd_nolock")
79#endif
80 _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
81 _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
82 _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
83#endif
84
85#ifndef NO_OLDNAMES
86
87#define diskfree_t _diskfree_t
88
89#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
90#pragma push_macro("getcwd")
91#undef getcwd
92#endif
93 char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
94#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
95#pragma pop_macro("getcwd")
96#endif
97 int __cdecl chdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
98 int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
99 int __cdecl rmdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
100#endif
101
102#ifdef __cplusplus
103}
104#endif
105
106#pragma pack(pop)
107#endif