*: Updated copyright to 2009 and normalized name & email.
[kbuild-mirror.git] / src / fastdep / os2fake.h
blob9007a0698e30bcb08ce5de94c4a759ed4ff08b86
1 /* $Id$
3 * Structures, defines and function prototypes for the OS/2 fake library.
5 * Copyright (c) 2001-2009 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
7 * GPL
9 */
12 #ifndef _os2fake_h_
13 #define _os2fake_h_
16 /*******************************************************************************
17 * Defined Constants And Macros *
18 *******************************************************************************/
19 #ifndef OS2ENTRY
20 #define OS2ENTRY
21 #endif
23 #ifndef CCHMAXPATHCOMP
24 #define CCHMAXPATHCOMP 256
25 #endif
27 #ifndef CCHMAXPATH
28 #define CCHMAXPATH 260
29 #endif
31 #ifndef FIL_STANDARD
32 #define FIL_STANDARD 1
33 #define FIL_QUERYEASIZE 2
34 #define FIL_QUERYEASFROMLIST 3
35 #define FIL_QUERYFULLNAME 5
36 #endif
38 #define FILE_NORMAL 0x0000
39 #define FILE_READONLY 0x0001
40 #define FILE_HIDDEN 0x0002
41 #define FILE_SYSTEM 0x0004
42 #define FILE_DIRECTORY 0x0010
43 #define FILE_ARCHIVED 0x0020
45 #ifndef HDIR_CREATE
46 #define HDIR_CREATE (-1)
47 #endif
49 #ifndef TRUE
50 #define TRUE 1
51 #endif
52 #ifndef FALSE
53 #define FALSE 0
54 #endif
56 #ifndef NO_ERROR
57 #define NO_ERROR 0
58 #endif
62 /*******************************************************************************
63 * Structures and Typedefs *
64 *******************************************************************************/
65 typedef char * PCH;
67 typedef char * PSZ;
68 typedef const char * PCSZ;
70 typedef unsigned long ULONG;
71 typedef ULONG * PULONG;
73 typedef unsigned short USHORT;
74 typedef USHORT * PUSHORT;
76 #if !defined(_WINDEF_)
77 typedef unsigned int UINT;
78 typedef UINT * PUINT;
80 typedef unsigned char UCHAR;
81 typedef UCHAR * PUCHAR;
83 #if !defined(CHAR)
84 typedef char CHAR;
85 typedef CHAR * PCHAR;
86 #endif
88 typedef unsigned long BOOL;
89 typedef BOOL * PBOOL;
90 #endif
92 #if !defined(VOID)
93 typedef void VOID;
94 #endif
95 #if !defined(_WINNT_) && !defined(PVOID)
96 typedef VOID * PVOID;
97 #endif
99 typedef unsigned long HDIR;
100 typedef HDIR * PHDIR;
102 typedef unsigned long APIRET;
105 typedef struct _FTIME /* ftime */
107 #if defined(__IBMC__) || defined(__IBMCPP__)
108 UINT twosecs : 5;
109 UINT minutes : 6;
110 UINT hours : 5;
111 #else
112 USHORT twosecs : 5;
113 USHORT minutes : 6;
114 USHORT hours : 5;
115 #endif
116 } FTIME;
117 typedef FTIME *PFTIME;
120 typedef struct _FDATE /* fdate */
122 #if defined(__IBMC__) || defined(__IBMCPP__)
123 UINT day : 5;
124 UINT month : 4;
125 UINT year : 7;
126 #else
127 USHORT day : 5;
128 USHORT month : 4;
129 USHORT year : 7;
130 #endif
131 } FDATE;
132 typedef FDATE *PFDATE;
135 typedef struct _FILESTATUS3 /* fsts3 */
137 FDATE fdateCreation;
138 FTIME ftimeCreation;
139 FDATE fdateLastAccess;
140 FTIME ftimeLastAccess;
141 FDATE fdateLastWrite;
142 FTIME ftimeLastWrite;
143 ULONG cbFile;
144 ULONG cbFileAlloc;
145 ULONG attrFile;
146 } FILESTATUS3;
147 typedef FILESTATUS3 *PFILESTATUS3;
149 typedef struct _FILEFINDBUF3 /* findbuf3 */
151 ULONG oNextEntryOffset;
152 FDATE fdateCreation;
153 FTIME ftimeCreation;
154 FDATE fdateLastAccess;
155 FTIME ftimeLastAccess;
156 FDATE fdateLastWrite;
157 FTIME ftimeLastWrite;
158 ULONG cbFile;
159 ULONG cbFileAlloc;
160 ULONG attrFile;
161 UCHAR cchName;
162 CHAR achName[CCHMAXPATHCOMP];
163 } FILEFINDBUF3;
164 typedef FILEFINDBUF3 *PFILEFINDBUF3;
167 /*******************************************************************************
168 * Function Prototypes *
169 *******************************************************************************/
170 APIRET OS2ENTRY DosQueryPathInfo(
171 PCSZ pszPathName,
172 ULONG ulInfoLevel,
173 PVOID pInfoBuf,
174 ULONG cbInfoBuf);
176 APIRET OS2ENTRY DosFindFirst(
177 PCSZ pszFileSpec,
178 PHDIR phdir,
179 ULONG flAttribute,
180 PVOID pFindBuf,
181 ULONG cbFindBuf,
182 PULONG pcFileNames,
183 ULONG ulInfoLevel);
185 APIRET OS2ENTRY DosFindNext(
186 HDIR hDir,
187 PVOID pFindBuf,
188 ULONG cbFindBuf,
189 PULONG pcFileNames);
191 APIRET OS2ENTRY DosFindClose(
192 HDIR hDir);
196 #endif