Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / direct.h
blobcf446627936194f0abea60c744002194fae60739
1 /*
2 * direct.h
3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
7 * Functions for manipulating paths and directories (included from io.h)
8 * plus functions for setting the current drive.
11 #ifndef _DIRECT_H_
12 #define _DIRECT_H_
14 /* All the headers include this file. */
15 #include <_mingw.h>
17 #define __need_wchar_t
18 #ifndef RC_INVOKED
19 #include <stddef.h>
20 #endif /* Not RC_INVOKED */
22 #include <io.h>
24 #ifndef RC_INVOKED
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 #ifndef _DISKFREE_T_DEFINED
31 /* needed by _getdiskfree (also in dos.h) */
32 struct _diskfree_t {
33 unsigned total_clusters;
34 unsigned avail_clusters;
35 unsigned sectors_per_cluster;
36 unsigned bytes_per_sector;
38 #define _DISKFREE_T_DEFINED
39 #endif
42 * You really shouldn't be using these. Use the Win32 API functions instead.
43 * However, it does make it easier to port older code.
45 _CRTIMP int __cdecl _getdrive (void);
46 _CRTIMP unsigned long __cdecl _getdrives(void);
47 _CRTIMP int __cdecl _chdrive (int);
48 _CRTIMP char* __cdecl _getdcwd (int, char*, int);
49 _CRTIMP unsigned __cdecl _getdiskfree (unsigned, struct _diskfree_t *);
51 #ifndef _NO_OLDNAMES
52 # define diskfree_t _diskfree_t
53 #endif
55 #ifndef _WDIRECT_DEFINED
56 /* wide character versions. Also in wchar.h */
57 #ifdef __MSVCRT__
58 _CRTIMP int __cdecl _wchdir(const wchar_t*);
59 _CRTIMP wchar_t* __cdecl _wgetcwd(wchar_t*, int);
60 _CRTIMP wchar_t* __cdecl _wgetdcwd(int, wchar_t*, int);
61 _CRTIMP int __cdecl _wmkdir(const wchar_t*);
62 _CRTIMP int __cdecl _wrmdir(const wchar_t*);
63 #endif /* __MSVCRT__ */
64 #define _WDIRECT_DEFINED
65 #endif
67 #ifdef __cplusplus
69 #endif
71 #endif /* Not RC_INVOKED */
73 #endif /* Not _DIRECT_H_ */