xref: /netbsd-src/crypto/external/cpl/trousers/dist/src/include/tss/platform.h (revision 2d5f7628c5531eb583b9313ac2fd1cf8582b4479)
1 /*++
2 
3 There are platform dependent and general defines.
4 
5 --*/
6 
7 #ifndef TSS_PLATFORM_H
8 #define TSS_PLATFORM_H
9 
10 
11 /* The default implementation is to use stdint.h, a part of the C99 standard.
12  * Systems that don't support this are handled on a case-by-case basis.
13  */
14 
15 #if !defined(WIN32)
16 #include <stdint.h>
17    typedef uint8_t            BYTE;
18    typedef int8_t             TSS_BOOL;
19    typedef uint16_t           UINT16;
20    typedef uint32_t           UINT32;
21    typedef uint64_t           UINT64;
22 
23    typedef uint16_t           TSS_UNICODE;
24    typedef void*              PVOID;
25 
26 #elif defined(WIN32)
27 #include <basetsd.h>
28    typedef  unsigned char    BYTE;
29    typedef  signed char      TSS_BOOL;
30 #ifndef _BASETSD_H_
31    // basetsd.h provides definitions of UINT16, UINT32 and UINT64.
32    typedef  unsigned short   UINT16;
33    typedef  unsigned long    UINT32;
34    typedef  unsigned __int64 UINT64;
35 #endif
36    typedef  unsigned short   TSS_UNICODE;
37    typedef  void*            PVOID;
38 #endif
39 
40 
41 /* Include this so that applications that use names as defined in the
42  * 1.1 TSS specification can still compile
43  */
44 #include <tss/compat11b.h>
45 
46 #endif // TSS_PLATFORM_H
47