diff options
Diffstat (limited to 'src/include/port')
-rw-r--r-- | src/include/port/BSD44_derived.h | 30 | ||||
-rw-r--r-- | src/include/port/aix.h | 18 | ||||
-rw-r--r-- | src/include/port/alpha.h | 14 | ||||
-rw-r--r-- | src/include/port/bsdi.h | 18 | ||||
-rw-r--r-- | src/include/port/dgux.h | 17 | ||||
-rw-r--r-- | src/include/port/hpux.h | 28 | ||||
-rw-r--r-- | src/include/port/i386_solaris.h | 54 | ||||
-rw-r--r-- | src/include/port/irix5.h | 14 | ||||
-rw-r--r-- | src/include/port/linux.h | 59 | ||||
-rw-r--r-- | src/include/port/nextstep.h | 36 | ||||
-rw-r--r-- | src/include/port/sco.h | 8 | ||||
-rw-r--r-- | src/include/port/sparc_solaris.h | 28 | ||||
-rw-r--r-- | src/include/port/sunos4.h | 16 | ||||
-rw-r--r-- | src/include/port/svr4.h | 16 | ||||
-rw-r--r-- | src/include/port/ultrix4.h | 79 | ||||
-rw-r--r-- | src/include/port/univel.h | 38 | ||||
-rw-r--r-- | src/include/port/win32.h | 16 |
17 files changed, 249 insertions, 240 deletions
diff --git a/src/include/port/BSD44_derived.h b/src/include/port/BSD44_derived.h index e89c0094170..867246f3b86 100644 --- a/src/include/port/BSD44_derived.h +++ b/src/include/port/BSD44_derived.h @@ -1,15 +1,15 @@ -# define USE_POSIX_TIME -# if defined(i386) -# define NEED_I386_TAS_ASM -# endif -# if defined(sparc) -# define NEED_SPARC_TAS_ASM -# endif -# if defined(ns32k) -# define NEED_NS32k_TAS_ASM -# endif -# define HAS_TEST_AND_SET -# if defined(__mips__) -/* # undef HAS_TEST_AND_SET */ -# endif - typedef unsigned char slock_t; +#define USE_POSIX_TIME +#if defined(i386) +#define NEED_I386_TAS_ASM +#endif +#if defined(sparc) +#define NEED_SPARC_TAS_ASM +#endif +#if defined(ns32k) +#define NEED_NS32k_TAS_ASM +#endif +#define HAS_TEST_AND_SET +#if defined(__mips__) +/* # undef HAS_TEST_AND_SET */ +#endif +typedef unsigned char slock_t; diff --git a/src/include/port/aix.h b/src/include/port/aix.h index 25d33eb87b8..a329e967f43 100644 --- a/src/include/port/aix.h +++ b/src/include/port/aix.h @@ -1,8 +1,10 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define CLASS_CONFLICT -# define DISABLE_XOPEN_NLS -# define HAVE_ANSI_CPP -# define HAS_TEST_AND_SET - typedef unsigned int slock_t; -#include <sys/machine.h> /* ENDIAN definitions for network communication */ +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define CLASS_CONFLICT +#define DISABLE_XOPEN_NLS +#define HAVE_ANSI_CPP +#define HAS_TEST_AND_SET +typedef unsigned int slock_t; + +#include <sys/machine.h> /* ENDIAN definitions for network + * communication */ diff --git a/src/include/port/alpha.h b/src/include/port/alpha.h index 5ac7ba167a0..40dfbfa9496 100644 --- a/src/include/port/alpha.h +++ b/src/include/port/alpha.h @@ -1,7 +1,7 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define DISABLE_XOPEN_NLS -# define HAS_LONG_LONG -# define HAS_TEST_AND_SET -# include <sys/mman.h> /* for msemaphore */ - typedef msemaphore slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define DISABLE_XOPEN_NLS +#define HAS_LONG_LONG +#define HAS_TEST_AND_SET +#include <sys/mman.h> /* for msemaphore */ +typedef msemaphore slock_t; diff --git a/src/include/port/bsdi.h b/src/include/port/bsdi.h index 022c41dbd6a..617ef6768ae 100644 --- a/src/include/port/bsdi.h +++ b/src/include/port/bsdi.h @@ -1,9 +1,9 @@ -# if defined(i386) -# define NEED_I386_TAS_ASM -# endif -# if defined(sparc) -# define NEED_SPARC_TAS_ASM -# endif -# define USE_POSIX_TIME -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#if defined(i386) +#define NEED_I386_TAS_ASM +#endif +#if defined(sparc) +#define NEED_SPARC_TAS_ASM +#endif +#define USE_POSIX_TIME +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; diff --git a/src/include/port/dgux.h b/src/include/port/dgux.h index 4d95ea3160f..447d16f77df 100644 --- a/src/include/port/dgux.h +++ b/src/include/port/dgux.h @@ -2,16 +2,15 @@ #define USE_POSIX_SIGNALS #define USE_POSIX_TIME -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif - diff --git a/src/include/port/hpux.h b/src/include/port/hpux.h index 0315f79d629..ec0859e521c 100644 --- a/src/include/port/hpux.h +++ b/src/include/port/hpux.h @@ -1,18 +1,20 @@ -# define JMP_BUF -# define USE_POSIX_TIME -# define HAS_TEST_AND_SET - typedef struct { int sem[4]; } slock_t; +#define JMP_BUF +#define USE_POSIX_TIME +#define HAS_TEST_AND_SET +typedef struct +{ + int sem[4]; +} slock_t; -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif - diff --git a/src/include/port/i386_solaris.h b/src/include/port/i386_solaris.h index 92d276985d0..b2df1ba5e2c 100644 --- a/src/include/port/i386_solaris.h +++ b/src/include/port/i386_solaris.h @@ -1,42 +1,42 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; #include <sys/isa_defs.h> -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN #endif -#ifndef NAN +#ifndef NAN -#ifndef __nan_bytes -#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } -#endif /* __nan_bytes */ +#ifndef __nan_bytes +#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } +#endif /* __nan_bytes */ -#ifdef __GNUC__ +#ifdef __GNUC__ #define NAN \ - (__extension__ ((union { unsigned char __c[8]; \ - double __d; }) \ - { __nan_bytes }).__d) + (__extension__ ((union { unsigned char __c[8]; \ + double __d; }) \ + { __nan_bytes }).__d) -#else /* Not GCC. */ -#define NAN (*(__const double *) __nan) -#endif /* GCC. */ -#endif /* NAN */ +#else /* Not GCC. */ +#define NAN (*(__const double *) __nan) +#endif /* GCC. */ +#endif /* NAN */ -#ifndef index +#ifndef index #define index strchr #endif diff --git a/src/include/port/irix5.h b/src/include/port/irix5.h index c995eb671fb..83c7837584f 100644 --- a/src/include/port/irix5.h +++ b/src/include/port/irix5.h @@ -1,7 +1,7 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT -# define HAS_TEST_AND_SET -# include <abi_mutex.h> - typedef abilock_t slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT +#define HAS_TEST_AND_SET +#include <abi_mutex.h> +typedef abilock_t slock_t; diff --git a/src/include/port/linux.h b/src/include/port/linux.h index 99d8eb65aef..b04e45bebab 100644 --- a/src/include/port/linux.h +++ b/src/include/port/linux.h @@ -4,31 +4,34 @@ __USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to be used. */ -# define JMP_BUF -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NEED_I386_TAS_ASM -# define HAS_TEST_AND_SET - -# if defined(PPC) - typedef unsigned int slock_t; -# endif - -# if defined(PPC) -# undef NEED_I386_TAS_ASM -# undef HAVE_INT_TIMEZONE -# endif - -# if defined(sparc) -# undef NEED_I386_TAS_ASM -# endif - - -# if defined(__alpha__) -# undef NEED_I386_TAS_ASM -# endif -# if defined(__alpha__) - typedef long int slock_t; -# else - typedef unsigned char slock_t; -# endif +#define JMP_BUF +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NEED_I386_TAS_ASM +#define HAS_TEST_AND_SET + +#if defined(PPC) +typedef unsigned int slock_t; + +#endif + +#if defined(PPC) +#undef NEED_I386_TAS_ASM +#undef HAVE_INT_TIMEZONE +#endif + +#if defined(sparc) +#undef NEED_I386_TAS_ASM +#endif + + +#if defined(__alpha__) +#undef NEED_I386_TAS_ASM +#endif +#if defined(__alpha__) +typedef long int slock_t; + +#else +typedef unsigned char slock_t; + +#endif diff --git a/src/include/port/nextstep.h b/src/include/port/nextstep.h index ca078ab10d4..f893b48b03c 100644 --- a/src/include/port/nextstep.h +++ b/src/include/port/nextstep.h @@ -1,18 +1,20 @@ -# include <libc.h> -# include <sys/ioctl.h> -# if defined(__STRICT_ANSI__) -# define isascii(c) ((unsigned)(c)<=0177) -# endif - extern char* strdup (const char* string); -# ifndef _POSIX_SOURCE - typedef unsigned short mode_t; - typedef int sigset_t; -# define SIG_BLOCK 00 -# define SIG_UNBLOCK 01 -# define SIG_SETMASK 02 -# define NEED_SIG_JMP -# endif +#include <libc.h> +#include <sys/ioctl.h> +#if defined(__STRICT_ANSI__) +#define isascii(c) ((unsigned)(c)<=0177) +#endif +extern char *strdup(const char *string); -# define JMP_BUF -# define NO_WAITPID - typedef struct mutex slock_t; +#ifndef _POSIX_SOURCE +typedef unsigned short mode_t; +typedef int sigset_t; + +#define SIG_BLOCK 00 +#define SIG_UNBLOCK 01 +#define SIG_SETMASK 02 +#define NEED_SIG_JMP +#endif + +#define JMP_BUF +#define NO_WAITPID +typedef struct mutex slock_t; diff --git a/src/include/port/sco.h b/src/include/port/sco.h index 0792d7d4e27..5bc74f7279c 100644 --- a/src/include/port/sco.h +++ b/src/include/port/sco.h @@ -1,6 +1,6 @@ -#include <limits.h> /* For _POSIX_PATH_MAX */ +#include <limits.h> /* For _POSIX_PATH_MAX */ -#define MAXPATHLEN _POSIX_PATH_MAX -#define SIGURG SIGUSR1 +#define MAXPATHLEN _POSIX_PATH_MAX +#define SIGURG SIGUSR1 -#define NOFILE NOFILES_MIN +#define NOFILE NOFILES_MIN diff --git a/src/include/port/sparc_solaris.h b/src/include/port/sparc_solaris.h index 9e7a6b7775c..8383215b708 100644 --- a/src/include/port/sparc_solaris.h +++ b/src/include/port/sparc_solaris.h @@ -1,19 +1,19 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif diff --git a/src/include/port/sunos4.h b/src/include/port/sunos4.h index d395cbdbe12..f08580cfafc 100644 --- a/src/include/port/sunos4.h +++ b/src/include/port/sunos4.h @@ -1,14 +1,14 @@ #define USE_POSIX_TIME -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif diff --git a/src/include/port/svr4.h b/src/include/port/svr4.h index 0910fe2d298..56e7dbd9e2d 100644 --- a/src/include/port/svr4.h +++ b/src/include/port/svr4.h @@ -1,10 +1,10 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT -#ifndef BYTE_ORDER -#ifdef MIPSEB -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#ifdef MIPSEB +#define BYTE_ORDER BIG_ENDIAN +#endif #endif -#endif diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h index 38cce4d257f..87678df9ba2 100644 --- a/src/include/port/ultrix4.h +++ b/src/include/port/ultrix4.h @@ -1,17 +1,17 @@ -# define USE_POSIX_TIME -# define NEED_STRDUP +#define USE_POSIX_TIME +#define NEED_STRDUP -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN #endif /* @@ -23,50 +23,51 @@ * warning-free compilation. */ -#include <sys/types.h> /* Declare various types, e.g. size_t, fd_set */ +#include <sys/types.h> /* Declare various types, e.g. size_t, + * fd_set */ -extern int strcasecmp(const char *, const char *); -extern void bzero(void *, size_t); +extern int strcasecmp(const char *, const char *); +extern void bzero(void *, size_t); -extern int fp_class_d(double); -extern long random(void); +extern int fp_class_d(double); +extern long random(void); struct rusage; -extern int getrusage(int, struct rusage *); +extern int getrusage(int, struct rusage *); -extern int ioctl(int, unsigned long, ...); +extern int ioctl(int, unsigned long,...); -extern int socket(int, int, int); +extern int socket(int, int, int); struct sockaddr; -extern int connect(int, const struct sockaddr *, int); -typedef int ssize_t; -extern ssize_t send(int, const void *, size_t, int); -extern ssize_t recv(int, void*, size_t, int); -extern int setsockopt(int, int, int, const void *, int); -extern int bind(int, const struct sockaddr *, int); -extern int listen(int, int); -extern int accept(int, struct sockaddr *, int *); -extern int getsockname(int, struct sockaddr *, int *); -extern ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, int *); -extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, int); +extern int connect(int, const struct sockaddr *, int); +typedef int ssize_t; +extern ssize_t send(int, const void *, size_t, int); +extern ssize_t recv(int, void *, size_t, int); +extern int setsockopt(int, int, int, const void *, int); +extern int bind(int, const struct sockaddr *, int); +extern int listen(int, int); +extern int accept(int, struct sockaddr *, int *); +extern int getsockname(int, struct sockaddr *, int *); +extern ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, int *); +extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, int); struct timeval; -extern int select(int, fd_set*, fd_set*, fd_set*, struct timeval *); +extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -extern int gethostname(char *, int); +extern int gethostname(char *, int); -extern int getopt(int, char * const *, const char *); -extern int putenv(const char *); +extern int getopt(int, char *const *, const char *); +extern int putenv(const char *); -extern pid_t vfork(void); +extern pid_t vfork(void); struct itimerval; -extern int setitimer(int, const struct itimerval*, struct itimerval *); +extern int setitimer(int, const struct itimerval *, struct itimerval *); struct timezone; -extern int gettimeofday(struct timeval *, struct timezone *); +extern int gettimeofday(struct timeval *, struct timezone *); -extern int fsync(int); -extern int ftruncate(int, off_t); +extern int fsync(int); +extern int ftruncate(int, off_t); -extern char *crypt(char *, char *); +extern char *crypt(char *, char *); /* End of ultrix4.h */ diff --git a/src/include/port/univel.h b/src/include/port/univel.h index 9ce1fef1ccd..c0bc9821867 100644 --- a/src/include/port/univel.h +++ b/src/include/port/univel.h @@ -1,28 +1,28 @@ -# define USE_POSIX_TIME -# define NO_EMPTY_STMTS -# define USE_POSIX_SIGNALS -# define SYSV_DIRENT +#define USE_POSIX_TIME +#define NO_EMPTY_STMTS +#define USE_POSIX_SIGNALS +#define SYSV_DIRENT #if 0 -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; + #endif -extern long random(void); -extern void srandom(int seed); -extern int strcasecmp(char *s1,char *s2); -extern int gethostname(char *name,int namelen); +extern long random(void); +extern void srandom(int seed); +extern int strcasecmp(char *s1, char *s2); +extern int gethostname(char *name, int namelen); -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN #endif - diff --git a/src/include/port/win32.h b/src/include/port/win32.h index 7f4c97c582e..d343f606924 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -1,8 +1,8 @@ -# define JMP_BUF -# define NEED_SIG_JMP -# define NO_UNISTD_H -# define USES_WINSOCK -# define NOFILE 100 -# ifndef MAXPATHLEN -# define MAXPATHLEN 250 -# endif +#define JMP_BUF +#define NEED_SIG_JMP +#define NO_UNISTD_H +#define USES_WINSOCK +#define NOFILE 100 +#ifndef MAXPATHLEN +#define MAXPATHLEN 250 +#endif |