1 /* Misc system-specific crap */
22 #include <sys/param.h>
24 #include <sys/types.h>
26 #ifdef __LDSO_LDD_SUPPORT__
27 # include <sys/wait.h>
30 #if defined(_WIN32) || defined(_WINNT)
31 # include "mmap-windows.c"
33 # include <sys/mman.h>
36 #ifdef BUILDING_LINKAGE
38 /* makefile will include elf.h for us */
49 # define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
54 #define PATH_MAX _POSIX_PATH_MAX
57 #ifndef UCLIBC_RUNTIME_PREFIX
58 # define UCLIBC_RUNTIME_PREFIX "/"
61 #undef UCLIBC_ENDIAN_HOST
62 #define UCLIBC_ENDIAN_LITTLE 1234
63 #define UCLIBC_ENDIAN_BIG 4321
64 #if defined(BYTE_ORDER)
65 # if BYTE_ORDER == LITTLE_ENDIAN
66 # define UCLIBC_ENDIAN_HOST UCLIBC_ENDIAN_LITTLE
67 # elif BYTE_ORDER == BIG_ENDIAN
68 # define UCLIBC_ENDIAN_HOST UCLIBC_ENDIAN_BIG
70 #elif defined(__BYTE_ORDER)
71 # if __BYTE_ORDER == __LITTLE_ENDIAN
72 # define UCLIBC_ENDIAN_HOST UCLIBC_ENDIAN_LITTLE
73 # elif __BYTE_ORDER == __BIG_ENDIAN
74 # define UCLIBC_ENDIAN_HOST UCLIBC_ENDIAN_BIG
77 #if !defined(UCLIBC_ENDIAN_HOST)
78 # error "Unknown host byte order!"
81 #if defined __GNUC__ || defined __ICC
82 # define attribute_noreturn __attribute__ ((__noreturn__))
84 # define attribute_noreturn