summaryrefslogtreecommitdiff
path: root/utils/porting.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-09 21:48:48 +0000
committerMike Frysinger <vapier@gentoo.org>2009-02-09 21:48:48 +0000
commit32242e7e10276157533def1c92c4c720945510fc (patch)
treea91c4ec4e0a229c959c65d6f41f59c8c29648728 /utils/porting.h
parent98f6d6a8ebd80e9223a4e213a85fd3d0cf1c4190 (diff)
unify the headers/random defines into porting.h to avoid duplication/rot
Diffstat (limited to 'utils/porting.h')
-rw-r--r--utils/porting.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/utils/porting.h b/utils/porting.h
new file mode 100644
index 000000000..9a47851d4
--- /dev/null
+++ b/utils/porting.h
@@ -0,0 +1,57 @@
+/* Misc system-specific crap */
+
+#ifndef _PORTING_H_
+#define _PORTING_H_
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include <link.h>
+#include <sys/mman.h>
+/* makefile will include elf.h for us */
+
+#include "bswap.h"
+#include "dl-defs.h"
+
+#ifdef DMALLOC
+#include <dmalloc.h>
+#endif
+
+/* For SunOS */
+#ifndef PATH_MAX
+#define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+#ifndef UCLIBC_RUNTIME_PREFIX
+# define UCLIBC_RUNTIME_PREFIX "/"
+#endif
+
+#define UCLIBC_ENDIAN_LITTLE 1234
+#define UCLIBC_ENDIAN_BIG 4321
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define UCLIBC_ENDIAN_HOST UCLIBC_ENDIAN_LITTLE
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define UCLIBC_ENDIAN_HOST UCLIBC_ENDIAN_BIG
+#else
+# error "Unknown host byte order!"
+#endif
+
+#endif