/boot/defaults/loader.conf: Adjust a comment.
[dragonfly.git] / usr.bin / vi / port.h
1 /* @(#)port.h.in        8.13 (Berkeley) 6/12/96 */
2
3 /*
4  * $DragonFly: src/usr.bin/vi/port.h,v 1.2 2003/11/06 19:30:04 eirikn Exp $
5  */
6
7 /*
8  * Declare the basic types, if they aren't already declared.  Named and
9  * some system's db.h files protect them with __BIT_TYPES_DEFINED__.
10  */
11 #ifndef __BIT_TYPES_DEFINED__
12 #define __BIT_TYPES_DEFINED__
13
14
15
16
17
18 #endif
19
20
21
22
23
24
25 /*
26  * XXX
27  * Some versions of System V changed the number of arguments to gettimeofday
28  * without changing the name.
29  */
30 #ifdef HAVE_BROKEN_GETTIMEOFDAY
31 #define gettimeofday(tv, tz)    gettimeofday(tv)
32 #endif
33
34 /* 
35  * XXX
36  * If we don't have mmap, we fake it with read and write, but we'll
37  * still need the header information.
38  */
39 #ifndef HAVE_SYS_MMAN_H
40 #define MAP_SHARED      1               /* share changes */
41 #define MAP_PRIVATE     2               /* changes are private */
42 #define PROT_READ       0x1             /* pages can be read */
43 #define PROT_WRITE      0x2             /* pages can be written */
44 #define PROT_EXEC       0x4             /* pages can be executed */
45 #endif
46
47 /*
48  * XXX
49  * POSIX 1003.1 names for file descriptors.
50  */
51 #ifndef STDERR_FILENO
52 #define STDIN_FILENO    0               /* ANSI C #defines */
53 #define STDOUT_FILENO   1
54 #define STDERR_FILENO   2
55 #endif
56
57 /*
58  * XXX
59  * POSIX 1003.1 names for seek settings.
60  */
61 #ifndef SEEK_END
62 #define SEEK_SET        0               /* POSIX 1003.1 seek values */
63 #define SEEK_CUR        1
64 #define SEEK_END        2
65 #endif
66
67 /*
68  * Hack _POSIX_VDISABLE to \377 since Ultrix doesn't honor _POSIX_VDISABLE
69  * (treats it as ^@).  The symptom is that the ^@ keystroke immediately
70  * drops core.
71  */
72 #ifdef HAVE_BROKEN_VDISABLE
73 #undef  _POSIX_VDISABLE
74 #define _POSIX_VDISABLE ((unsigned char)'\377')
75 #endif
76
77 /*
78  * XXX
79  * POSIX 1003.1 tty disabling character.
80  */
81 #ifndef _POSIX_VDISABLE
82 #define _POSIX_VDISABLE 0               /* Some systems used 0. */
83 #endif
84
85 /*
86  * XXX
87  * 4.4BSD extension to only set the software termios bits.
88  */
89 #ifndef TCSASOFT                        /* 4.4BSD extension. */
90 #define TCSASOFT        0
91 #endif
92
93 /*
94  * XXX
95  * POSIX 1003.1 maximum path length.
96  */
97 #ifndef MAXPATHLEN
98 #ifdef PATH_MAX
99 #define MAXPATHLEN      PATH_MAX
100 #else
101 #define MAXPATHLEN      1024
102 #endif
103 #endif
104
105 /*
106  * XXX
107  * MIN, MAX, historically in <sys/param.h>
108  */
109 #ifndef MAX
110 #define MAX(_a,_b)      ((_a)<(_b)?(_b):(_a))
111 #endif
112 #ifndef MIN
113 #define MIN(_a,_b)      ((_a)<(_b)?(_a):(_b))
114 #endif
115
116 /*
117  * XXX
118  * "DB" isn't always portable, and we want the private information.
119  */
120 #define DB      L__DB
121 #undef  pgno_t                  /* IRIX has its own version. */
122 #define pgno_t  L__db_pgno_t
123
124 /*
125  * XXX
126  * 4.4BSD extension to provide lock values in the open(2) call.
127  */
128 #ifndef O_EXLOCK
129 #define O_EXLOCK        0
130 #endif
131
132 #ifndef O_SHLOCK
133 #define O_SHLOCK        0
134 #endif
135
136 /*
137  * XXX
138  * POSIX 1003.1 bad file format errno.
139  */
140 #ifndef EFTYPE
141 #define EFTYPE          EINVAL
142 #endif
143
144 /*
145  * XXX
146  * POSIX 1003.2 RE length limit.
147  */
148 #ifndef _POSIX2_RE_DUP_MAX
149 #define _POSIX2_RE_DUP_MAX      255
150 #endif
151
152 /*
153  * XXX
154  * 4.4BSD extension to determine if a program dropped core from the exit
155  * status.
156  */
157 #ifndef WCOREDUMP
158 #define WCOREDUMP(a)    0
159 #endif
160
161 /*
162  * XXX
163  * Endian-ness of the machine.
164  */
165 #if !defined(LITTLE_ENDIAN)
166 #define LITTLE_ENDIAN   1234
167 #endif
168 #if !defined(BIG_ENDIAN)
169 #define BIG_ENDIAN      4321
170 #endif
171 #if !defined(BYTE_ORDER)
172 #if WORDS_BIGENDIAN == 1
173 #define BYTE_ORDER      BIG_ENDIAN
174 #else
175 #define BYTE_ORDER      LITTLE_ENDIAN
176 #endif
177 #endif