comparison src/common.h @ 122:bdb38b434c0a

more changes from Fridrich Strba to avoid installing our config.h
author Carl Byington <carl@five-ten-sg.com>
date Mon, 02 Feb 2009 21:55:48 -0800
parents 6395ced2b8b2
children ab2a11e72250
comparison
equal deleted inserted replaced
121:8399ef94c11b 122:bdb38b434c0a
1 1
2 #ifndef __COMMON_H 2 #ifndef __COMMON_H
3 #define __COMMON_H 3 #define __COMMON_H
4
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <stdarg.h>
8
9
10 #ifndef _MSC_VER
11 #include <stdint.h>
12 #include <inttypes.h>
13 #else
14 typedef signed char int8_t;
15 typedef unsigned char uint8_t;
16 typedef unsigned short uint16_t;
17 typedef short int16_t;
18 typedef unsigned int uint32_t;
19 typedef int int32_t;
20 typedef unsigned long long uint64_t;
21 typedef long long int64_t;
22 #endif
23
4 24
5 #ifndef _WIN32 25 #ifndef _WIN32
6 typedef uint32_t DWORD; 26 typedef uint32_t DWORD;
7 typedef uint16_t WORD; 27 typedef uint16_t WORD;
8 typedef uint8_t BYTE; 28 typedef uint8_t BYTE;
9 typedef uint32_t UINT32; 29 typedef uint32_t UINT32;
10 30 typedef struct { // copied from wine
11 # pragma pack (1)
12
13 #ifndef FILETIME_DEFINED
14 #define FILETIME_DEFINED
15 /*Win32 Filetime struct - copied from WINE*/
16 typedef struct {
17 DWORD dwLowDateTime; 31 DWORD dwLowDateTime;
18 DWORD dwHighDateTime; 32 DWORD dwHighDateTime;
19 } FILETIME; 33 } FILETIME;
20 #endif // FILETIME_DEFINED 34 // According to Jan Wolter, sys/param.h is the most portable source of endian
35 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
36 #include <sys/param.h>
37 #else
38 #define BYTE_ORDER LITTLE_ENDIAN
39 #endif
21 40
22 #endif // _WIN32 41
23 #endif // __COMMON_H 42 #endif