pcsc-lite  1.8.8
wintypes.h
Go to the documentation of this file.
1 /*
2  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
3  *
4  * Copyright (C) 1999
5  * David Corcoran <corcoran@linuxnet.com>
6  * Copyright (C) 2002-2011
7  * Ludovic Rousseau <ludovic.rousseau@free.fr>
8  *
9  * $Id: wintypes.h 5869 2011-07-09 12:04:18Z rousseau $
10  */
11 
17 #ifndef __wintypes_h__
18 #define __wintypes_h__
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 #ifdef __APPLE__
26 
27 #include <stdint.h>
28 
29 #ifndef BYTE
30  typedef uint8_t BYTE;
31 #endif
32  typedef uint8_t UCHAR;
33  typedef UCHAR *PUCHAR;
34  typedef uint16_t USHORT;
35 
36 #ifndef __COREFOUNDATION_CFPLUGINCOM__
37  typedef uint32_t ULONG;
38  typedef void *LPVOID;
39  typedef int16_t BOOL;
40 #endif
41 
42  typedef ULONG *PULONG;
43  typedef const void *LPCVOID;
44  typedef uint32_t DWORD;
45  typedef DWORD *PDWORD;
46  typedef uint16_t WORD;
47  typedef int32_t LONG;
48  typedef const char *LPCSTR;
49  typedef const BYTE *LPCBYTE;
50  typedef BYTE *LPBYTE;
51  typedef DWORD *LPDWORD;
52  typedef char *LPSTR;
53 
54 #else
55 
56 #ifndef BYTE
57  typedef unsigned char BYTE;
58 #endif
59  typedef unsigned char UCHAR;
60  typedef UCHAR *PUCHAR;
61  typedef unsigned short USHORT;
62 
63 #ifndef __COREFOUNDATION_CFPLUGINCOM__
64  typedef unsigned long ULONG;
65  typedef void *LPVOID;
66 #endif
67 
68  typedef const void *LPCVOID;
69  typedef unsigned long DWORD;
70  typedef DWORD *PDWORD;
71  typedef long LONG;
72  typedef const char *LPCSTR;
73  typedef const BYTE *LPCBYTE;
74  typedef BYTE *LPBYTE;
75  typedef DWORD *LPDWORD;
76  typedef char *LPSTR;
77 
78  /* these types were deprecated but still used by old drivers and
79  * applications. So just declare and use them. */
80  typedef LPSTR LPTSTR;
81  typedef LPCSTR LPCTSTR;
82 
83  /* types unused by pcsc-lite */
84  typedef short BOOL;
85  typedef unsigned short WORD;
86  typedef ULONG *PULONG;
87 
88 #endif
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif