aboutsummaryrefslogtreecommitdiff
path: root/include/Support/DataTypes.h
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2003-06-30 21:59:07 +0000
committerJohn Criswell <criswell@uiuc.edu>2003-06-30 21:59:07 +0000
commit7a73b80b9052136c8cd2234eb3433a07df7cf38e (patch)
treef7be65b4a1f3c25d8f5dfc42f6ea73f7bbfec00d /include/Support/DataTypes.h
parenteb093fbf6fd2878c842f2f215362597475ef1817 (diff)
Merged in autoconf branch. This provides configuration via the autoconf
system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/Support/DataTypes.h')
-rw-r--r--include/Support/DataTypes.h58
1 files changed, 6 insertions, 52 deletions
diff --git a/include/Support/DataTypes.h b/include/Support/DataTypes.h
index 80543c6140..2f6724c4fb 100644
--- a/include/Support/DataTypes.h
+++ b/include/Support/DataTypes.h
@@ -13,65 +13,19 @@
//
//===----------------------------------------------------------------------===//
-// TODO: This file sucks. Not only does it not work, but this stuff should be
-// autoconfiscated anyways. Major FIXME
-
#ifndef SUPPORT_DATATYPES_H
#define SUPPORT_DATATYPES_H
-#define __STDC_LIMIT_MACROS 1
-#include <inttypes.h>
-
-#ifdef __linux__
-# include <endian.h>
-# if BYTE_ORDER == LITTLE_ENDIAN
-# undef BIG_ENDIAN
-# else
-# undef LITTLE_ENDIAN
-# endif
-#endif
-
-#ifdef __FreeBSD__
-# include <machine/endian.h>
-# if _BYTE_ORDER == _LITTLE_ENDIAN
-# ifndef LITTLE_ENDIAN
-# define LITTLE_ENDIAN 1
-# endif
-# ifdef BIG_ENDIAN
-# undef BIG_ENDIAN
-# endif
-# else
-# ifndef BIG_ENDIAN
-# define BIG_ENDIAN 1
-# endif
-# ifdef LITTLE_ENDIAN
-# undef LITTLE_ENDIAN
-# endif
-# endif
-#endif
+#include "Config/config.h"
-#ifdef __sparc__
-# include <sys/types.h>
-# ifdef _LITTLE_ENDIAN
-# define LITTLE_ENDIAN 1
-# else
-# define BIG_ENDIAN 1
-# endif
-#endif
+#define __STDC_LIMIT_MACROS 1
-//
-// Convert the information from the header files into our own local
-// endian macros. We do this because various strange systems define both
-// BIG_ENDIAN and LITTLE_ENDIAN, and we don't want to conflict with them.
-//
-// Don't worry; once we introduce autoconf, this will look a lot nicer.
-//
-#ifdef LITTLE_ENDIAN
-#define ENDIAN_LITTLE
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
#endif
-#ifdef BIG_ENDIAN
-#define ENDIAN_BIG
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
#endif
#if (defined(ENDIAN_LITTLE) && defined(ENDIAN_BIG))