Make the zlib compile against the tinycrt library.
[git-build-vc9.git] / tcrt / inc / tcrt.h
blob75e59c81fb5edf94c88b4038b47510ac57d70ccd
1 /*=============================================================================
2 tcrt.h :
4 Copyright © 2008 Bruno Santos <nayart3@gmail.com>
5 =============================================================================*/
7 #ifndef TCRT__H_
8 #define TCRT__H_
10 ///////////////////////////////////////////////////////////////////////////////
11 #define __STDC__ 1
12 #define __STDC_VERSION__ 199409
13 #define __STDC_HOSTED__ 1
14 #define __TINYCRT__ 1
15 #define PATH_MAX 260
17 #define TCRT_IMPORT __declspec(dllimport)
18 #define TCRT_THREAD_LOCAL __declspec(thread)
19 #define TCRT_NORETURN __declspec(noreturn)
20 #define TCRT_STATIC_ASSERT(x) typedef char __static_assert__[(x)]
21 #define TCRT_CONCAT_(a, b) a ## b
22 #define TCRT_STRINGIFY_(x) #x
23 #define TCRT_CONCAT(a, b) TCRT_CONCAT_(a, b)
24 #define TCRT_STRINGIFY(x) TCRT_STRINGIFY_(x)
26 #ifdef __cplusplus
27 # define TCRT_BEGIN_EXTERN_C extern "C" {
28 # define TCRT_END_EXTERN_C }
29 # ifndef NULL
30 # define NULL 0
31 # endif
32 #else
33 # define TCRT_BEGIN_EXTERN_C
34 # define TCRT_END_EXTERN_C
35 # ifndef NULL
36 # define NULL ((void*) 0)
37 # endif
38 #endif
40 #ifndef _SIZE_T_DEFINED
41 # ifdef _M_IX86
42 typedef unsigned int size_t;
43 # elif _M_X64
44 typedef unsigned __int64 size_t;
45 # else
46 # error unknown machine
47 # endif
48 # define _SIZE_T_DEFINED
49 #endif
51 #ifndef _PTRDIFF_T_DEFINED
52 # ifdef _M_IX86
53 typedef signed int ptrdiff_t;
54 # elif _M_X64
55 typedef signed __int64 ptrdiff_t;
56 # else
57 # error unknown machine
58 # endif
59 # define _PTRDIFF_T_DEFINED
60 #endif
62 #ifndef _WCHAR_T_DEFINED
63 typedef unsigned short wchar_t;
64 #define _WCHAR_T_DEFINED
65 #endif
67 #ifndef _CRT_ERRNO_DEFINED
68 #define _CRT_ERRNO_DEFINED
69 #else
70 #undef errno
71 #endif
73 #ifndef _ERRCODE_DEFINED
74 #define _ERRCODE_DEFINED
75 #endif
77 // EOF ////////////////////////////////////////////////////////////////////////
78 #endif /* TCRT__H_ */