pcsc-lite  1.7.4
wintypes.h
Go to the documentation of this file.
00001 /*
00002  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
00003  *
00004  * Copyright (C) 1999
00005  *  David Corcoran <corcoran@linuxnet.com>
00006  * Copyright (C) 2002-2011
00007  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
00008  *
00009  * $Id: wintypes.h 5714 2011-05-05 09:26:47Z rousseau $
00010  */
00011 
00017 #ifndef __wintypes_h__
00018 #define __wintypes_h__
00019 
00020 #ifdef __cplusplus
00021 extern "C"
00022 {
00023 #endif
00024 
00025 #ifdef __APPLE__
00026 
00027 #include <stdint.h>
00028 
00029 #ifndef BYTE
00030     typedef uint8_t BYTE;
00031 #endif
00032     typedef uint8_t UCHAR;
00033     typedef uint8_t *PUCHAR;
00034     typedef uint16_t USHORT;
00035 
00036 #ifndef __COREFOUNDATION_CFPLUGINCOM__
00037     typedef uint32_t ULONG;
00038     typedef void *LPVOID;
00039     typedef int16_t BOOL;
00040 #endif
00041 
00042     typedef uint32_t *PULONG;
00043     typedef const void *LPCVOID;
00044     typedef uint32_t DWORD;
00045     typedef uint32_t *PDWORD;
00046     typedef uint16_t WORD;
00047     typedef int32_t LONG;
00048     typedef const char *LPCSTR;
00049     typedef const BYTE *LPCBYTE;
00050     typedef BYTE *LPBYTE;
00051     typedef DWORD *LPDWORD;
00052     typedef char *LPSTR;
00053 
00054 #else
00055 
00056 #ifndef BYTE
00057     typedef unsigned char BYTE;
00058 #endif
00059     typedef unsigned char UCHAR;
00060     typedef unsigned char *PUCHAR;
00061     typedef unsigned short USHORT;
00062 
00063 #ifndef __COREFOUNDATION_CFPLUGINCOM__
00064     typedef unsigned long ULONG;
00065     typedef void *LPVOID;
00066 #endif
00067 
00068     typedef const void *LPCVOID;
00069     typedef unsigned long DWORD;
00070     typedef unsigned long *PDWORD;
00071     typedef long LONG;
00072     typedef const char *LPCSTR;
00073     typedef const BYTE *LPCBYTE;
00074     typedef BYTE *LPBYTE;
00075     typedef DWORD *LPDWORD;
00076     typedef char *LPSTR;
00077 
00078     /* these types were deprecated but still used by old drivers and
00079      * applications. So just declare and use them. */
00080     typedef LPSTR LPTSTR;
00081     typedef LPCSTR LPCTSTR;
00082 
00083     /* types unused by pcsc-lite */
00084     typedef short BOOL;
00085     typedef unsigned short WORD;
00086     typedef unsigned long *PULONG;
00087 
00088 #endif
00089 
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093 
00094 #endif