Skip to content

Latest commit

 

History

History
83 lines (69 loc) · 2.32 KB

os2types.h

File metadata and controls

83 lines (69 loc) · 2.32 KB
 
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef _INCL_OS2TYPES_H_
#define _INCL_OS2TYPES_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef APIENTRY
#define APIENTRY
#endif
Oct 2, 2016
Oct 2, 2016
14
15
16
17
#ifndef OS2EXPORT
#define OS2EXPORT __attribute__((visibility("default")))
#endif
18
#ifndef OS2API
Oct 2, 2016
Oct 2, 2016
19
#define OS2API APIENTRY OS2EXPORT
20
21
#endif
Oct 27, 2016
Oct 27, 2016
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Note that we never export actual 16-bit APIs from these headers, even if
// we have them marked as OS2API16. This is just for documentation's sake at
// the moment. If you compile against these headers and link against an
// OS2API16 function, they will be exist and operate in a linear address
// space. If you call them from an LX executable, though, the system assumes
// you're calling in from 16-bit code and exports something that cleans up
// the details behind the scenes.
// For developing against this API directly on Linux, you should assume this
// works like OS/2's PowerPC port, and the same 16-bit APIs you used on x86
// were made 32-bit clean by default for the new platform.
#ifndef OS2API16
#define OS2API16 OS2API
#endif
36
37
38
39
typedef uint32_t APIRET;
typedef uint16_t APIRET16;
typedef uint32_t APIRET32;
Oct 6, 2016
Oct 6, 2016
40
41
42
43
44
45
46
typedef void VOID;
typedef VOID *PVOID;
typedef PVOID *PPVOID;
typedef char CHAR, *PCHAR;
typedef uint8_t UCHAR, *PUCHAR;
typedef int16_t SHORT, *PSHORT;
typedef uint16_t USHORT, *PUSHORT;
Oct 2, 2016
Oct 2, 2016
47
typedef int32_t LONG, *PLONG;
48
typedef uint32_t ULONG, *PULONG;
Oct 6, 2016
Oct 6, 2016
49
typedef uint32_t BOOL32, *PBOOL32;
Oct 16, 2016
Oct 16, 2016
50
51
typedef int64_t LONGLONG, *PLONGLONG;
typedef uint64_t ULONGLONG, *PULONGLONG;
Oct 14, 2016
Oct 14, 2016
52
53
54
55
56
57
58
59
60
typedef uint8_t BYTE, *PBYTE;
// !!! FIXME: HANDLE should either be 64-bits on x86_64, or we need to
// !!! FIXME: refactor and mutex a bunch of stuff...if it has to be a 32-bit
// !!! FIXME: int, it needs to be an index into a resizable array, but at the
// !!! FIXME: native word size, these handles can just be pointers cast to ints.
typedef uint16_t SHANDLE, *PSHANDLE;
typedef uint32_t LHANDLE, *PLHANDLE;
typedef LHANDLE HANDLE, *PHANDLE;
Oct 6, 2016
Oct 6, 2016
61
62
typedef HANDLE HMODULE, *PHMODULE;
typedef HANDLE HFILE, *PHFILE;
Oct 17, 2016
Oct 17, 2016
63
typedef HANDLE HDIR, *PHDIR;
Oct 6, 2016
Oct 6, 2016
64
65
typedef HANDLE HEV, *PHEV;
typedef HANDLE HMTX, *PHMTX;
Oct 30, 2016
Oct 30, 2016
66
typedef HANDLE HQUEUE, *PHQUEUE;
Oct 14, 2016
Oct 14, 2016
67
68
typedef HANDLE PID, *PPID;
typedef HANDLE TID, *PTID;
Oct 27, 2016
Oct 27, 2016
69
typedef SHANDLE HVIO, *PHVIO;
Oct 27, 2016
Oct 27, 2016
70
typedef SHANDLE HKBD, *PHKBD;
71
typedef PCHAR PSZ;
Oct 29, 2016
Oct 29, 2016
72
typedef PCHAR PCH;
Oct 16, 2016
Oct 16, 2016
74
75
typedef int (APIENTRY *PFN)(void);
76
77
78
79
80
81
82
#ifdef __cplusplus
}
#endif
#endif
// end of os2types.h ...