Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __INET_HEADERS_DEFS_H
00019 #define __INET_HEADERS_DEFS_H
00020
00021
00022
00023
00024 #if defined(_MSC_VER)
00025 typedef __int8 int8_t;
00026 typedef __int16 int16_t;
00027 typedef __int32 int32_t;
00028 typedef __int64 int64_t;
00029 typedef unsigned __int8 uint8_t;
00030 typedef unsigned __int16 uint16_t;
00031 typedef unsigned __int32 uint32_t;
00032 typedef unsigned __int64 uint64_t;
00033 #else
00034 #include <stdint.h>
00035 #endif
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #if defined(_WIN32)
00052 # define LITTLE_ENDIAN 1
00053 # define BIG_ENDIAN 2
00054 # define BYTE_ORDER LITTLE_ENDIAN
00055 #elif defined(linux)
00056 # include <endian.h>
00057 # define LITTLE_ENDIAN __LITTLE_ENDIAN
00058 # define BIG_ENDIAN __BIG_ENDIAN
00059 # define BYTE_ORDER __BYTE_ORDER
00060 #elif defined(__APPLE__)
00061 #include <machine/endian.h>
00062 #else
00063
00064 #include <machine/endian.h>
00065 #endif
00066
00067 #if !defined(LITTLE_ENDIAN) || !defined(BIG_ENDIAN) || !defined(BYTE_ORDER) || (BYTE_ORDER!=LITTLE_ENDIAN && BYTE_ORDER!=BIG_ENDIAN)
00068 #error Endian macros (LITTLE_ENDIAN, BIG_ENDIAN, BYTE_ORDER) are not set up correctly -- please fix this header file and report it.
00069 #endif
00070
00071 #endif
00072
00073