Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/elftoolchain/common/_elftc.h
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
** Per-OS configuration. | ** Per-OS configuration. | ||||
**/ | **/ | ||||
#if defined(__APPLE__) | #if defined(__APPLE__) | ||||
#include <libkern/OSByteOrder.h> | #include <libkern/OSByteOrder.h> | ||||
#define htobe32(x) OSSwapHostToBigInt32(x) | #define htobe32(x) OSSwapHostToBigInt32(x) | ||||
#define htole32(x) OSSwapHostToLittleInt32(x) | |||||
#ifndef roundup2 | |||||
#define roundup2 roundup | #define roundup2 roundup | ||||
#endif | |||||
#define ELFTC_BYTE_ORDER _BYTE_ORDER | #define ELFTC_BYTE_ORDER __DARWIN_BYTE_ORDER | ||||
#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN | #define ELFTC_BYTE_ORDER_LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN | ||||
#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN | #define ELFTC_BYTE_ORDER_BIG_ENDIAN __DARWIN_BIG_ENDIAN | ||||
#define ELFTC_HAVE_MMAP 1 | #define ELFTC_HAVE_MMAP 1 | ||||
#define ELFTC_HAVE_STRMODE 1 | #define ELFTC_HAVE_STRMODE 1 | ||||
#define ELFTC_NEED_BYTEORDER_EXTENSIONS 1 | #define ELFTC_NEED_BYTEORDER_EXTENSIONS 1 | ||||
#endif /* __APPLE__ */ | #endif /* __APPLE__ */ | ||||
Show All 23 Lines | |||||
/* | /* | ||||
* Debian GNU/Linux and Debian GNU/kFreeBSD do not have strmode(3). | * Debian GNU/Linux and Debian GNU/kFreeBSD do not have strmode(3). | ||||
*/ | */ | ||||
#define ELFTC_HAVE_STRMODE 0 | #define ELFTC_HAVE_STRMODE 0 | ||||
/* Whether we need to supply {be,le}32dec. */ | /* Whether we need to supply {be,le}32dec. */ | ||||
#define ELFTC_NEED_BYTEORDER_EXTENSIONS 1 | #define ELFTC_NEED_BYTEORDER_EXTENSIONS 1 | ||||
#ifndef roundup2 | |||||
#define roundup2 roundup | #define roundup2 roundup | ||||
#endif | |||||
#endif /* __GLIBC__ || __linux__ */ | #endif /* __GLIBC__ || __linux__ */ | ||||
#if defined(__FreeBSD__) | #if defined(__FreeBSD__) | ||||
#include <osreldate.h> | #include <osreldate.h> | ||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |