dos.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. * dos.h
  3. *
  4. * DOS-specific functions and structures.
  5. *
  6. * This file is part of the Mingw32 package.
  7. *
  8. * Contributors:
  9. * Created by J.J. van der Heijden <[email protected]>
  10. *
  11. * THIS SOFTWARE IS NOT COPYRIGHTED
  12. *
  13. * This source code is offered for use in the public domain. You may
  14. * use, modify or distribute it freely.
  15. *
  16. * This code is distributed in the hope that it will be useful but
  17. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  18. * DISCLAIMED. This includes but is not limited to warranties of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  20. *
  21. * $Revision: 1.2 $
  22. * $Author: bellard $
  23. * $Date: 2005/04/17 13:14:29 $
  24. *
  25. */
  26. #ifndef __STRICT_ANSI__
  27. #ifndef _DOS_H_
  28. #define _DOS_H_
  29. /* All the headers include this file. */
  30. #include <_mingw.h>
  31. #define __need_wchar_t
  32. #ifndef RC_INVOKED
  33. #include <stddef.h>
  34. #endif /* Not RC_INVOKED */
  35. /* For DOS file attributes */
  36. #include <io.h>
  37. #ifndef RC_INVOKED
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41. #ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
  42. #ifndef __DECLSPEC_SUPPORTED
  43. extern unsigned int *__imp__basemajor_dll;
  44. extern unsigned int *__imp__baseminor_dll;
  45. extern unsigned int *__imp__baseversion_dll;
  46. extern unsigned int *__imp__osmajor_dll;
  47. extern unsigned int *__imp__osminor_dll;
  48. extern unsigned int *__imp__osmode_dll;
  49. #define _basemajor (*__imp__basemajor_dll)
  50. #define _baseminor (*__imp__baseminor_dll)
  51. #define _baseversion (*__imp__baseversion_dll)
  52. #define _osmajor (*__imp__osmajor_dll)
  53. #define _osminor (*__imp__osminor_dll)
  54. #define _osmode (*__imp__osmode_dll)
  55. #else /* __DECLSPEC_SUPPORTED */
  56. __MINGW_IMPORT unsigned int _basemajor_dll;
  57. __MINGW_IMPORT unsigned int _baseminor_dll;
  58. __MINGW_IMPORT unsigned int _baseversion_dll;
  59. __MINGW_IMPORT unsigned int _osmajor_dll;
  60. __MINGW_IMPORT unsigned int _osminor_dll;
  61. __MINGW_IMPORT unsigned int _osmode_dll;
  62. #define _basemajor _basemajor_dll
  63. #define _baseminor _baseminor_dll
  64. #define _baseversion _baseversion_dll
  65. #define _osmajor _osmajor_dll
  66. #define _osminor _osminor_dll
  67. #define _osmode _osmode_dll
  68. #endif /* __DECLSPEC_SUPPORTED */
  69. #endif /* ! __MSVCRT__ */
  70. #ifndef _DISKFREE_T_DEFINED
  71. /* needed by _getdiskfree (also in direct.h) */
  72. struct _diskfree_t {
  73. unsigned total_clusters;
  74. unsigned avail_clusters;
  75. unsigned sectors_per_cluster;
  76. unsigned bytes_per_sector;
  77. };
  78. #define _DISKFREE_T_DEFINED
  79. #endif
  80. unsigned _getdiskfree (unsigned, struct _diskfree_t *);
  81. #ifndef _NO_OLDNAMES
  82. # define diskfree_t _diskfree_t
  83. #endif
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif /* Not RC_INVOKED */
  88. #endif /* Not _DOS_H_ */
  89. #endif /* Not __STRICT_ANSI__ */