|
|
#ifdef UNIX_AUX | #ifdef UNIX_AUX |
#include <sys/mmu.h> /* for SHMLBA */ | #include <sys/mmu.h> /* for SHMLBA */ |
#endif | #endif |
#ifdef UNIX_LINUX |
#if defined(UNIX_LINUX) && !defined(UNIX_GNU) |
#include <asm/page.h> /* for SHMLBA on Linux 2.0 */ | #include <asm/page.h> /* for SHMLBA on Linux 2.0 */ |
#endif | #endif |
#if defined(UNIX_SUNOS4) || defined(UNIX_SUNOS5) | #if defined(UNIX_SUNOS4) || defined(UNIX_SUNOS5) |
|
|
#if defined(UNIX_MACOSX) && defined(HAVE_MSYNC) | #if defined(UNIX_MACOSX) && defined(HAVE_MSYNC) |
#define UNIX_DARWIN # MacOS X, a.k.a. Darwin | #define UNIX_DARWIN # MacOS X, a.k.a. Darwin |
#endif | #endif |
#if (__GLIBC__ >= 2) |
|
#define UNIX_GNU # glibc2 (may be UNIX_LINUX, UNIX_HURD or UNIX_FREEBSD) |
|
#endif |
|
| |
| |
# Choose the character set: | # Choose the character set: |
|
|
| |
#include <stdio.h> /* libc i/o */ | #include <stdio.h> /* libc i/o */ |
| |
|
# A more precise classification of the operating system: |
|
# (This test works only after at least one system header has been included.) |
|
#if (__GLIBC__ >= 2) |
|
#define UNIX_GNU # glibc2 (may be UNIX_LINUX, UNIX_HURD or UNIX_FREEBSD) |
|
#endif |
|
|
# Determine the offset of a component 'ident' in a struct of the type 'type': | # Determine the offset of a component 'ident' in a struct of the type 'type': |
# See 0 as pointer to 'type', put a struct 'type' there and determine the | # See 0 as pointer to 'type', put a struct 'type' there and determine the |
# address of its component 'ident' and return it as number: | # address of its component 'ident' and return it as number: |