2003-09-30 18:37:50 +00:00
|
|
|
//===-- include/Support/DataTypes.h - Define fixed size types ---*- C++ -*-===//
|
2003-10-20 19:46:57 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2001-07-23 18:26:21 +00:00
|
|
|
//
|
|
|
|
// This file contains definitions to figure out the size of _HOST_ data types.
|
|
|
|
// This file is important because different host OS's define different macros,
|
|
|
|
// which makes portability tough. This file exports the following definitions:
|
|
|
|
//
|
2003-06-16 21:18:20 +00:00
|
|
|
// ENDIAN_LITTLE : is #define'd if the host is little endian
|
|
|
|
// int64_t : is a typedef for the signed 64 bit system type
|
|
|
|
// uint64_t : is a typedef for the unsigned 64 bit system type
|
|
|
|
// INT64_MAX : is a #define specifying the max value for int64_t's
|
2001-07-23 18:26:21 +00:00
|
|
|
//
|
|
|
|
// No library is required when using these functinons.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2001-06-06 20:29:01 +00:00
|
|
|
|
2003-06-17 00:35:55 +00:00
|
|
|
#ifndef SUPPORT_DATATYPES_H
|
|
|
|
#define SUPPORT_DATATYPES_H
|
2001-06-06 20:29:01 +00:00
|
|
|
|
2003-06-30 21:59:07 +00:00
|
|
|
#include "Config/config.h"
|
2001-06-06 20:29:01 +00:00
|
|
|
|
2003-06-30 21:59:07 +00:00
|
|
|
#define __STDC_LIMIT_MACROS 1
|
2002-09-14 19:52:49 +00:00
|
|
|
|
2003-06-30 21:59:07 +00:00
|
|
|
#ifdef HAVE_INTTYPES_H
|
|
|
|
#include <inttypes.h>
|
2003-06-16 21:18:20 +00:00
|
|
|
#endif
|
|
|
|
|
2003-06-30 21:59:07 +00:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
2003-06-16 21:18:20 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (defined(ENDIAN_LITTLE) && defined(ENDIAN_BIG))
|
|
|
|
#error "Cannot define both ENDIAN_LITTLE and ENDIAN_BIG!"
|
2001-06-06 20:29:01 +00:00
|
|
|
#endif
|
|
|
|
|
2003-08-11 20:04:57 +00:00
|
|
|
#if (!defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG))
|
2002-09-13 21:51:25 +00:00
|
|
|
#error "include/Support/DataTypes.h could not determine endianness!"
|
2001-06-06 20:29:01 +00:00
|
|
|
#endif
|
2002-09-13 21:51:25 +00:00
|
|
|
|
2003-08-11 20:04:57 +00:00
|
|
|
#if !defined(INT64_MAX)
|
|
|
|
/* We couldn't determine INT64_MAX; default it. */
|
|
|
|
#define INT64_MAX 9223372036854775807LL
|
|
|
|
#endif
|
|
|
|
#if !defined(UINT64_MAX)
|
|
|
|
#define UINT64_MAX 0xffffffffffffffffULL
|
|
|
|
#endif
|
|
|
|
|
2003-06-17 00:35:55 +00:00
|
|
|
#endif /* SUPPORT_DATATYPES_H */
|