-
Notifications
You must be signed in to change notification settings - Fork 7
/
bin_pack_def.h
53 lines (48 loc) · 1.88 KB
/
bin_pack_def.h
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
/*
+----------------------------------------------------------------------+
| BinPack for PHP |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Huqiu Liao <[email protected]> |
+----------------------------------------------------------------------+
*/
#ifndef BIN_PACK_DEF_H_
#define BIN_PACK_DEF_H_ 1
#ifndef __bool_true_false_are_defined
#ifdef _Bool
#define bool _Bool
#else
#define bool int
#endif
#define true 1
#define false 0
#define __bool_true_false_are_defined 1
#endif
/*
* for long max
*/
#if LONG_MAX == 0x7FFFFFFFL
#define BIN_LONG_MAX 0x7FFFFFFFUL
#define BIN_LONG_MIN 0x80000000UL
#else
#define BIN_LONG_MAX 0X7FFFFFFFFFFFFFFFUL
#define BIN_LONG_MIN 0X8000000000000000UL
#endif
/*
* Use inlined functions for supported systems.
*/
#if defined(__GNUC__) || defined(__DMC__) || defined(__POCC__) || defined(__WATCOMC__) || defined(__SUNPRO_C)
#define BINPACK_INLINE inline
#elif defined(__BORLANDC__) || defined(_MSC_VER) || defined(__LCC__)
#define BINPACK_INLINE __inline
#else
#define BINPACK_INLINE
#endif
#endif