Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
2.8 KiB

  1. /***
  2. *direct.h - function declarations for directory handling/creation
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This include file contains the function declarations for the library
  8. * functions related to directory handling and creation.
  9. *
  10. * [Public]
  11. *
  12. ****/
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #ifndef _INC_DIRECT
  17. #define _INC_DIRECT
  18. #if !defined(_WIN32)
  19. #error ERROR: Only Win32 target supported!
  20. #endif
  21. #ifdef _MSC_VER
  22. /*
  23. * Currently, all MS C compilers for Win32 platforms default to 8 byte
  24. * alignment.
  25. */
  26. #pragma pack(push,8)
  27. #endif /* _MSC_VER */
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if !defined(_W64)
  32. #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
  33. #define _W64 __w64
  34. #else
  35. #define _W64
  36. #endif
  37. #endif
  38. /* Define _CRTIMP */
  39. #ifndef _CRTIMP
  40. #ifdef _DLL
  41. #define _CRTIMP __declspec(dllimport)
  42. #else /* ndef _DLL */
  43. #define _CRTIMP
  44. #endif /* _DLL */
  45. #endif /* _CRTIMP */
  46. /* Define __cdecl for non-Microsoft compilers */
  47. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  48. #define __cdecl
  49. #endif
  50. #ifndef _WCHAR_T_DEFINED
  51. typedef unsigned short wchar_t;
  52. #define _WCHAR_T_DEFINED
  53. #endif
  54. #ifndef _SIZE_T_DEFINED
  55. #ifdef _WIN64
  56. typedef unsigned __int64 size_t;
  57. #else
  58. typedef _W64 unsigned int size_t;
  59. #endif
  60. #define _SIZE_T_DEFINED
  61. #endif
  62. /* _getdiskfree structure for _getdiskfree() */
  63. #ifndef _DISKFREE_T_DEFINED
  64. struct _diskfree_t {
  65. unsigned total_clusters;
  66. unsigned avail_clusters;
  67. unsigned sectors_per_cluster;
  68. unsigned bytes_per_sector;
  69. };
  70. #define _DISKFREE_T_DEFINED
  71. #endif
  72. /* function prototypes */
  73. _CRTIMP int __cdecl _chdir(const char *);
  74. _CRTIMP char * __cdecl _getcwd(char *, int);
  75. _CRTIMP int __cdecl _mkdir(const char *);
  76. _CRTIMP int __cdecl _rmdir(const char *);
  77. _CRTIMP int __cdecl _chdrive(int);
  78. _CRTIMP char * __cdecl _getdcwd(int, char *, int);
  79. _CRTIMP int __cdecl _getdrive(void);
  80. _CRTIMP unsigned long __cdecl _getdrives(void);
  81. _CRTIMP unsigned __cdecl _getdiskfree(unsigned, struct _diskfree_t *);
  82. #ifndef _WDIRECT_DEFINED
  83. /* wide function prototypes, also declared in wchar.h */
  84. _CRTIMP int __cdecl _wchdir(const wchar_t *);
  85. _CRTIMP wchar_t * __cdecl _wgetcwd(wchar_t *, int);
  86. _CRTIMP wchar_t * __cdecl _wgetdcwd(int, wchar_t *, int);
  87. _CRTIMP int __cdecl _wmkdir(const wchar_t *);
  88. _CRTIMP int __cdecl _wrmdir(const wchar_t *);
  89. #define _WDIRECT_DEFINED
  90. #endif
  91. #if !__STDC__
  92. /* Non-ANSI names for compatibility */
  93. _CRTIMP int __cdecl chdir(const char *);
  94. _CRTIMP char * __cdecl getcwd(char *, int);
  95. _CRTIMP int __cdecl mkdir(const char *);
  96. _CRTIMP int __cdecl rmdir(const char *);
  97. #define diskfree_t _diskfree_t
  98. #endif /* __STDC__ */
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102. #ifdef _MSC_VER
  103. #pragma pack(pop)
  104. #endif /* _MSC_VER */
  105. #endif /* _INC_DIRECT */