Mercurial > hg
comparison mercurial/compat.h @ 29444:284d742e5611
internals: move the bitmanipulation routines into its own file
This is to allow more flexibility with the C sources -- now the
bitmanipulation routines can be safely imported without importing Python.h
author | Maciej Fijalkowski <fijall@gmail.com> |
---|---|
date | Mon, 06 Jun 2016 13:08:13 +0200 |
parents | |
children | 83147ff53112 |
comparison
equal
deleted
inserted
replaced
29443:cf092a3d202a | 29444:284d742e5611 |
---|---|
1 #ifndef _HG_COMPAT_H_ | |
2 #define _HG_COMPAT_H_ | |
3 | |
4 #ifdef _WIN32 | |
5 #ifdef _MSC_VER | |
6 /* msvc 6.0 has problems */ | |
7 #define inline __inline | |
8 typedef signed char int8_t; | |
9 typedef short int16_t; | |
10 typedef long int32_t; | |
11 typedef __int64 int64_t; | |
12 typedef unsigned char uint8_t; | |
13 typedef unsigned short uint16_t; | |
14 typedef unsigned long uint32_t; | |
15 typedef unsigned __int64 uint64_t; | |
16 #else | |
17 #include <stdint.h> | |
18 #endif | |
19 #else | |
20 /* not windows */ | |
21 #include <sys/types.h> | |
22 #if defined __BEOS__ && !defined __HAIKU__ | |
23 #include <ByteOrder.h> | |
24 #else | |
25 #include <arpa/inet.h> | |
26 #endif | |
27 #include <inttypes.h> | |
28 #endif | |
29 | |
30 #if defined __hpux || defined __SUNPRO_C || defined _AIX | |
31 #define inline | |
32 #endif | |
33 | |
34 #ifdef __linux | |
35 #define inline __inline | |
36 #endif | |
37 | |
38 #endif |