1 /* @(#)port.h.in 8.13 (Berkeley) 6/12/96 */
6 * Declare the basic types, if they aren't already declared. Named and
7 * some system's db.h files protect them with __BIT_TYPES_DEFINED__.
9 #ifndef __BIT_TYPES_DEFINED__
10 #define __BIT_TYPES_DEFINED__
20 * Some versions of System V changed the number of arguments to gettimeofday
21 * without changing the name.
23 #ifdef HAVE_BROKEN_GETTIMEOFDAY
24 #define gettimeofday(tv, tz) gettimeofday(tv)
29 * If we don't have mmap, we fake it with read and write, but we'll
30 * still need the header information.
32 #ifndef HAVE_SYS_MMAN_H
33 #define MAP_SHARED 1 /* share changes */
34 #define MAP_PRIVATE 2 /* changes are private */
35 #define PROT_READ 0x1 /* pages can be read */
36 #define PROT_WRITE 0x2 /* pages can be written */
37 #define PROT_EXEC 0x4 /* pages can be executed */
42 * POSIX 1003.1 names for file descriptors.
45 #define STDIN_FILENO 0 /* ANSI C #defines */
46 #define STDOUT_FILENO 1
47 #define STDERR_FILENO 2
52 * POSIX 1003.1 names for seek settings.
55 #define SEEK_SET 0 /* POSIX 1003.1 seek values */
61 * Hack _POSIX_VDISABLE to \377 since Ultrix doesn't honor _POSIX_VDISABLE
62 * (treats it as ^@). The symptom is that the ^@ keystroke immediately
65 #ifdef HAVE_BROKEN_VDISABLE
66 #undef _POSIX_VDISABLE
67 #define _POSIX_VDISABLE ((unsigned char)'\377')
72 * POSIX 1003.1 tty disabling character.
74 #ifndef _POSIX_VDISABLE
75 #define _POSIX_VDISABLE 0 /* Some systems used 0. */
80 * 4.4BSD extension to only set the software termios bits.
82 #ifndef TCSASOFT /* 4.4BSD extension. */
88 * POSIX 1003.1 maximum path length.
92 #define MAXPATHLEN PATH_MAX
94 #define MAXPATHLEN 1024
100 * MIN, MAX, historically in <sys/param.h>
103 #define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
106 #define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
111 * "DB" isn't always portable, and we want the private information.
114 #undef pgno_t /* IRIX has its own version. */
115 #define pgno_t L__db_pgno_t
119 * 4.4BSD extension to provide lock values in the open(2) call.
131 * POSIX 1003.1 bad file format errno.
134 #define EFTYPE EINVAL
139 * POSIX 1003.2 RE length limit.
141 #ifndef _POSIX2_RE_DUP_MAX
142 #define _POSIX2_RE_DUP_MAX 255
147 * 4.4BSD extension to determine if a program dropped core from the exit
151 #define WCOREDUMP(a) 0
156 * Endian-ness of the machine.
158 #if !defined(LITTLE_ENDIAN)
159 #define LITTLE_ENDIAN 1234
161 #if !defined(BIG_ENDIAN)
162 #define BIG_ENDIAN 4321
164 #if !defined(BYTE_ORDER)
165 #if WORDS_BIGENDIAN == 1
166 #define BYTE_ORDER BIG_ENDIAN
168 #define BYTE_ORDER LITTLE_ENDIAN