0b20d90acd726b1094af14ef7f915f21c615ec8c
[oota-llvm.git] / include / Support / DataTypes.h
1 //===-- include/Support/DataTypes.h - Define fixed size types ----*- C++ -*--=//
2 //
3 // This file contains definitions to figure out the size of _HOST_ data types.
4 // This file is important because different host OS's define different macros,
5 // which makes portability tough.  This file exports the following definitions:
6 //
7 //   LITTLE_ENDIAN: is #define'd if the host is little endian
8 //   int64_t      : is a typedef for the signed 64 bit system type
9 //   uint64_t     : is a typedef for the unsigned 64 bit system type
10 //
11 // No library is required when using these functinons.
12 //
13 //===----------------------------------------------------------------------===//
14
15 // TODO: This file sucks.  Not only does it not work, but this stuff should be
16 // autoconfiscated anyways. Major FIXME
17
18
19 #ifndef LLVM_SUPPORT_DATATYPES_H
20 #define LLVM_SUPPORT_DATATYPES_H
21
22 #ifdef LINUX
23 #define __STDC_LIMIT_MACROS 1
24 #include <stdint.h>       // Defined by ISO C 99
25 #include <endian.h>
26
27 #else
28 #include <sys/types.h>
29 #ifdef _LITTLE_ENDIAN
30 #define LITTLE_ENDIAN 1
31 #endif
32 #endif
33
34 #endif