blob: 1236e5d5827e3da70f40f56603b158b39a0c371c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/*
* THIS FILE IS NOT IDENTICAL TO THE ORIGINAL
* FROM THE BZIP2 DISTRIBUTION.
*
* It has been modified, mainly to break the library
* into smaller pieces.
*
* Russ Cox
* rsc@plan9.bell-labs.com
* July 2000
*/
/*---------------------------------------------*/
/*--
Place a 1 beside your platform, and 0 elsewhere.
Attempts to autosniff this even if you don't.
--*/
/*--
Generic 32-bit Unix.
Also works on 64-bit Unix boxes.
--*/
#define BZ_UNIX 1
/*--
Win32, as seen by Jacob Navia's excellent
port of (Chris Fraser & David Hanson)'s excellent
lcc compiler.
--*/
#define BZ_LCCWIN32 0
#if defined(_WIN32) && !defined(__CYGWIN__)
#undef BZ_LCCWIN32
#define BZ_LCCWIN32 1
#undef BZ_UNIX
#define BZ_UNIX 0
#endif
/*--
Plan 9 from Bell Labs
--*/
#define BZ_PLAN9 0
#if defined(PLAN9)
#undef BZ_UNIX
#define BZ_UNIX 0
#undef BZ_PLAN9
#define BZ_PLAN9 1
#endif
#if BZ_UNIX
# include "unix.h"
#elif BZ_LCCWIN32
# include "lccwin32.h"
#elif BZ_PLAN9
# include "plan9.h"
#endif
#ifdef __GNUC__
# define NORETURN __attribute__ ((noreturn))
#else
# define NORETURN /**/
#endif
/*--
Some more stuff for all platforms :-)
This might have to get moved into the platform-specific
header files if we encounter a machine with different sizes.
--*/
typedef char Char;
typedef unsigned char Bool;
typedef unsigned char UChar;
typedef int Int32;
typedef unsigned int UInt32;
typedef short Int16;
typedef unsigned short UInt16;
#define True ((Bool)1)
#define False ((Bool)0)
/*--
IntNative is your platform's `native' int size.
Only here to avoid probs with 64-bit platforms.
--*/
typedef int IntNative;
|