xref: /reactos/sdk/include/ucrt/dos.h (revision 04e0dc4a)
1 //
2 // dos.h
3 //
4 //      Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // This file declares the structures, constants, and functions used for the
7 // legacy DOS interface.
8 //
9 #pragma once
10 #ifndef _INC_DOS // include guard for 3rd party interop
11 #define _INC_DOS
12 
13 #include <corecrt.h>
14 
15 #pragma warning(push)
16 #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
17 _UCRT_DISABLE_CLANG_WARNINGS
18 
19 _CRT_BEGIN_C_HEADER
20 
21 // File attribute constants
22 #define _A_NORMAL 0x00 // Normal file - No read/write restrictions
23 #define _A_RDONLY 0x01 // Read only file
24 #define _A_HIDDEN 0x02 // Hidden file
25 #define _A_SYSTEM 0x04 // System file
26 #define _A_SUBDIR 0x10 // Subdirectory
27 #define _A_ARCH   0x20 // Archive file
28 
29 #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
30 
31     #ifndef _DISKFREE_T_DEFINED
32         #define _DISKFREE_T_DEFINED
33 
34         struct _diskfree_t
35         {
36             unsigned total_clusters;
37             unsigned avail_clusters;
38             unsigned sectors_per_cluster;
39             unsigned bytes_per_sector;
40         };
41     #endif
42 
43     #if _CRT_FUNCTIONS_REQUIRED
44         _Success_(return == 0)
45         _Check_return_
46         _DCRTIMP unsigned __cdecl _getdiskfree(
47             _In_  unsigned            _Drive,
48             _Out_ struct _diskfree_t* _DiskFree
49             );
50     #endif
51 
52     #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
53         #define diskfree_t _diskfree_t
54     #endif
55 
56 #endif
57 
58 _CRT_END_C_HEADER
59 _UCRT_RESTORE_CLANG_WARNINGS
60 #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
61 #endif // _INC_DOS
62