Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / rcs / lib / conf.h
1 /* RCS compile-time configuration */
2
3 /* $FreeBSD: src/gnu/usr.bin/rcs/lib/conf.h,v 1.8.2.1 2001/05/12 10:29:42 kris Exp $ */
4 /* $DragonFly: src/gnu/usr.bin/rcs/lib/conf.h,v 1.2 2003/06/17 04:25:47 dillon Exp $ */
5
6 /*
7  * This file is generated automatically.
8  * If you edit it by hand your changes may be lost.
9  * Instead, please try to fix conf.sh,
10  * and send your fixes to rcs-bugs@cs.purdue.edu.
11  */
12
13 #define exitmain(n) return n /* how to exit from main() */
14 /* #define _POSIX_C_SOURCE 2147483647L */ /* if strict C + Posix 1003.1b-1993 or later */
15 /* #define _POSIX_SOURCE */ /* if strict C + Posix 1003.1-1990 */
16
17 #include <errno.h>
18 #include <stdio.h>
19 #include <time.h>
20
21 /* Comment out #include lines below that do not work.  */
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <dirent.h>
25 #include <fcntl.h>
26 #include <limits.h>
27 /* #include <mach/mach.h> */
28 /* #include <net/errno.h> */
29 #include <pwd.h>
30 /* #include <siginfo.h> */
31 #include <signal.h>
32 #include <stdlib.h>
33 #include <string.h>
34 #include <sys/mman.h>
35 #include <sys/wait.h>
36 /* #include <ucontext.h> */
37 #include <unistd.h>
38 #include <utime.h>
39 /* #include <vfork.h> */
40
41 /* Define boolean symbols to be 0 (false, the default), or 1 (true).  */
42 #define has_sys_param_h 1 /* Does #include <sys/param.h> work?  */
43 /* extern int errno; */ /* Uncomment if <errno.h> doesn't declare errno.  */
44 #define has_readlink 1 /* Does readlink() work?  */
45 #define readlink_isreg_errno EINVAL /* errno after readlink on regular file */
46
47 #if has_readlink && !defined(MAXSYMLINKS)
48 #       if has_sys_param_h
49 #               include <sys/param.h>
50 #       endif
51 #       ifndef MAXSYMLINKS
52 #               define MAXSYMLINKS 20 /* BSD; not standard yet */
53 #       endif
54 #endif
55
56 /* Comment out the typedefs below if the types are already declared.  */
57 /* Fix any uncommented typedefs that are wrong.  */
58 /* typedef int mode_t; */
59 /* typedef long off_t; */
60 /* typedef int pid_t; */
61 /* typedef int sig_atomic_t; */
62 /* typedef unsigned size_t; */
63 /* typedef int ssize_t; */
64 /* typedef long time_t; */
65 /* typedef int uid_t; */
66
67 /* Comment out the keyword definitions below if the keywords work.  */
68 /* #define const */
69 /* #define volatile */
70
71 /* Define boolean symbols to be 0 (false, the default), or 1 (true).  */
72 #define has_prototypes 1 /* Do function prototypes work?  */
73 #define has_stdarg 1 /* Does <stdarg.h> work?  */
74 /* #define has_varargs ? */ /* Does <varargs.h> work?  */
75 #define va_start_args 2 /* How many args does va_start() take?  */
76
77 #if O_BINARY
78         /* Text and binary i/o behave differently.  */
79         /* This is incompatible with Posix and Unix.  */
80 #       define FOPEN_RB "rb"
81 #       define FOPEN_R_WORK (Expand==BINARY_EXPAND ? "r" : "rb")
82 #       define FOPEN_WB "wb"
83 #       define FOPEN_W_WORK (Expand==BINARY_EXPAND ? "w" : "wb")
84 #       define FOPEN_WPLUS_WORK (Expand==BINARY_EXPAND ? "w+" : "w+b")
85 #       define OPEN_O_BINARY O_BINARY
86 #else
87         /*
88         * Text and binary i/o behave the same.
89         * Omit "b", since some nonstandard hosts reject it.
90         */
91 #       define FOPEN_RB "r"
92 #       define FOPEN_R_WORK "r"
93 #       define FOPEN_WB "w"
94 #       define FOPEN_W_WORK "w"
95 #       define FOPEN_WPLUS_WORK "w+"
96 #       define OPEN_O_BINARY 0
97 #endif
98
99 /* This may need changing on non-Unix systems (notably DOS).  */
100 #define OPEN_CREAT_READONLY (S_IRUSR|S_IRGRP|S_IROTH) /* lock file mode */
101 #define OPEN_O_LOCK 0 /* extra open flags for creating lock file */
102 #define OPEN_O_WRONLY O_WRONLY /* main open flag for creating a lock file */
103
104 /* Define or comment out the following symbols as needed.  */
105 #if has_prototypes
106 #       define P(params) params
107 #else
108 #       define P(params) ()
109 #endif
110 #if has_stdarg
111 #       include <stdarg.h>
112 #else
113 #       if has_varargs
114 #               include <varargs.h>
115 #       else
116                 typedef char *va_list;
117 #               define va_dcl int va_alist;
118 #               define va_start(ap) ((ap) = (va_list)&va_alist)
119 #               define va_arg(ap,t) (((t*) ((ap)+=sizeof(t)))  [-1])
120 #               define va_end(ap)
121 #       endif
122 #endif
123 #if va_start_args == 2
124 #       define vararg_start va_start
125 #else
126 #       define vararg_start(ap,p) va_start(ap)
127 #endif
128 #define bad_chmod_close 0 /* Can chmod() close file descriptors?  */
129 #define bad_creat0 0 /* Do writes fail after creat(f,0)?  */
130 #define bad_fopen_wplus 0 /* Does fopen(f,"w+") fail to truncate f?  */
131 #define getlogin_is_secure 0 /* Is getlogin() secure?  Usually it's not.  */
132 #define has_attribute_noreturn 1 /* Does __attribute__((noreturn)) work?  */
133 #if has_attribute_noreturn
134 #       define exiting __attribute__((noreturn))
135 #else
136 #       define exiting
137 #endif
138 #define has_dirent 1 /* Do opendir(), readdir(), closedir() work?  */
139 #define void_closedir 0 /* Does closedir() yield void?  */
140 #define has_fchmod 1 /* Does fchmod() work?  */
141 #define has_fflush_input 0 /* Does fflush() work on input files?  */
142 #define has_fputs 1 /* Does fputs() work?  */
143 #define has_ftruncate 1 /* Does ftruncate() work?  */
144 #define has_getuid 1 /* Does getuid() work?  */
145 #define has_getpwuid 1 /* Does getpwuid() work?  */
146 #define has_memcmp 1 /* Does memcmp() work?  */
147 #define has_memcpy 1 /* Does memcpy() work?  */
148 #define has_memmove 1 /* Does memmove() work?  */
149 #define has_map_fd 0 /* Does map_fd() work?  */
150 #define has_mmap 1 /* Does mmap() work on regular files?  */
151 #define has_madvise 0 /* Does madvise() work?  */
152 #define mmap_signal SIGBUS /* signal received if you reference nonexistent part of mmapped file */
153 #define has_rename 1 /* Does rename() work?  */
154 #define bad_a_rename 0 /* Does rename(A,B) fail if A is unwritable?  */
155 #define bad_b_rename 0 /* Does rename(A,B) fail if B is unwritable?  */
156 #define bad_NFS_rename 0 /* Can rename(A,B) falsely report success?  */
157 /* typedef int void; */ /* Some ancient compilers need this.  */
158 #define VOID (void) /* 'VOID e;' discards the value of an expression 'e'.  */
159 #define has_seteuid 1 /* Does seteuid() work?  See ../INSTALL.RCS.  */
160 #define has_setreuid 0 /* Does setreuid() work?  See ../INSTALL.RCS.  */
161 #define has_setuid 1 /* Does setuid() exist?  */
162 #define has_sigaction 1 /* Does struct sigaction work?  */
163 #define has_sa_sigaction 0 /* Does struct sigaction have sa_sigaction?  */
164 #define has_signal 1 /* Does signal() work?  */
165 #define signal_type void /* type returned by signal handlers */
166 #define sig_zaps_handler 0 /* Must a signal handler reinvoke signal()?  */
167 /* #define has_sigblock ? */ /* Does sigblock() work?  */
168 /* #define sigmask(s) (1 << ((s)-1)) */ /* Yield mask for signal number.  */
169 typedef size_t fread_type; /* type returned by fread() and fwrite() */
170 typedef size_t freadarg_type; /* type of their size arguments */
171 typedef void *malloc_type; /* type returned by malloc() */
172 #define has_getcwd 1 /* Does getcwd() work?  */
173 /* #define has_getwd ? */ /* Does getwd() work?  */
174 #define needs_getabsname 0 /* Must we define getabsname?  */
175 #define has_mktemp 1 /* Does mktemp() work?  */
176 #define has_mkstemp 1 /* Does mkstemp() work?  */
177 #define has_NFS 1 /* Might NFS be used?  */
178 #define has_psiginfo 0 /* Does psiginfo() work?  */
179 #define has_psignal 1 /* Does psignal() work?  */
180 /* #define has_si_errno ? */ /* Does siginfo_t have si_errno?  */
181 /* #define has_sys_siglist ? */ /* Does sys_siglist[] work?  */
182 /* #define strchr index */ /* Use old-fashioned name for strchr()?  */
183 /* #define strrchr rindex */ /* Use old-fashioned name for strrchr()?  */
184 #define bad_unlink 0 /* Does unlink() fail on unwritable files?  */
185 #define has_vfork 1 /* Does vfork() work?  */
186 #define has_fork 1 /* Does fork() work?  */
187 #define has_spawn 0 /* Does spawn*() work?  */
188 #define has_waitpid 1 /* Does waitpid() work?  */
189 #define bad_wait_if_SIGCHLD_ignored 0 /* Does ignoring SIGCHLD break wait()?  */
190 #define RCS_SHELL "/bin/sh" /* shell to run RCS subprograms */
191 #define has_printf_dot 1 /* Does "%.2d" print leading 0?  */
192 #define has_vfprintf 1 /* Does vfprintf() work?  */
193 #define has_attribute_format_printf 1 /* Does __attribute__((format(printf,N,N+1))) work?  */
194 #if has_attribute_format_printf
195 #       define printf_string(m, n) __attribute__((format(printf, m, n)))
196 #else
197 #       define printf_string(m, n)
198 #endif
199 #if has_attribute_format_printf && has_attribute_noreturn
200         /* Work around a bug in GCC 2.5.x.  */
201 #       define printf_string_exiting(m, n) __attribute__((format(printf, m, n), noreturn))
202 #else
203 #       define printf_string_exiting(m, n) printf_string(m, n) exiting
204 #endif
205 /* #define has__doprintf ? */ /* Does _doprintf() work?  */
206 /* #define has__doprnt ? */ /* Does _doprnt() work?  */
207 /* #undef EXIT_FAILURE */ /* Uncomment this if EXIT_FAILURE is broken.  */
208 #define large_memory 1 /* Can main memory hold entire RCS files?  */
209 #ifndef LONG_MAX
210 #define LONG_MAX 2147483647L /* long maximum */
211 #endif
212 /* Do struct stat s and t describe the same file?  Answer d if unknown.  */
213 #define same_file(s,t,d) ((s).st_ino==(t).st_ino && (s).st_dev==(t).st_dev)
214 #define has_utimbuf 1 /* Does struct utimbuf work?  */
215 #define CO "/usr/bin/co" /* name of 'co' program */
216 #define COMPAT2 0 /* Are version 2 files supported?  */
217 #define DIFF "/usr/bin/diff" /* name of 'diff' program */
218 #define DIFF3 "/usr/bin/diff3" /* name of 'diff3' program */
219 #define DIFF3_BIN 1 /* Is diff3 user-visible (not the /usr/lib auxiliary)?  */
220 #define DIFFFLAGS "-an" /* Make diff output suitable for RCS.  */
221 #define DIFF_L 1 /* Does diff -L work?  */
222 #define DIFF_SUCCESS 0 /* DIFF status if no differences are found */
223 #define DIFF_FAILURE 1 /* DIFF status if differences are found */
224 #define DIFF_TROUBLE 2 /* DIFF status if trouble */
225 #define ED "/bin/ed" /* name of 'ed' program (used only if !DIFF3_BIN) */
226 #define MERGE "/usr/bin/merge" /* name of 'merge' program */
227 #define TMPDIR "/tmp" /* default directory for temporary files */
228 #define SLASH '/' /* principal filename separator */
229 #define SLASHes '/' /* `case SLASHes:' labels all filename separators */
230 #define isSLASH(c) ((c) == SLASH) /* Is arg a filename separator?  */
231 #define ROOTPATH(p) isSLASH((p)[0]) /* Is p an absolute pathname?  */
232 #define X_DEFAULT ",v/" /* default value for -x option */
233 #define SLASHSLASH_is_SLASH 1 /* Are // and / the same directory?  */
234 #define ALL_ABSOLUTE 1 /* Do all subprograms satisfy ROOTPATH?  */
235 #define DIFF_ABSOLUTE 1 /* Is ROOTPATH(DIFF) true?  */
236 #define SENDMAIL "/usr/sbin/sendmail" /* how to send mail */
237 #define TZ_must_be_set 0 /* Must TZ be set for gmtime() to work?  */
238
239
240
241 /* Adjust the following declarations as needed.  */
242
243
244 /* The rest is for the benefit of non-standard, traditional hosts.  */
245 /* Don't bother to declare functions that in traditional hosts do not appear, */
246 /* or are declared in .h files, or return int or void.  */
247
248
249 /* traditional BSD */
250
251 #if has_sys_siglist && !defined(sys_siglist)
252         extern char const * const sys_siglist[];
253 #endif
254
255
256 /* Posix (ISO/IEC 9945-1: 1990 / IEEE Std 1003.1-1990) */
257
258 /* <fcntl.h> */
259 #ifdef O_CREAT
260 #       define open_can_creat 1
261 #else
262 #       define open_can_creat 0
263 #       define O_RDONLY 0
264 #       define O_WRONLY 1
265 #       define O_RDWR 2
266 #       define O_CREAT 01000
267 #       define O_TRUNC 02000
268 #endif
269 #ifndef O_EXCL
270 #define O_EXCL 0
271 #endif
272
273 /* <sys/stat.h> */
274 #ifndef S_IRUSR
275 #       ifdef S_IREAD
276 #               define S_IRUSR S_IREAD
277 #       else
278 #               define S_IRUSR 0400
279 #       endif
280 #       ifdef S_IWRITE
281 #               define S_IWUSR S_IWRITE
282 #       else
283 #               define S_IWUSR (S_IRUSR/2)
284 #       endif
285 #endif
286 #ifndef S_IRGRP
287 #       if has_getuid
288 #               define S_IRGRP (S_IRUSR / 0010)
289 #               define S_IWGRP (S_IWUSR / 0010)
290 #               define S_IROTH (S_IRUSR / 0100)
291 #               define S_IWOTH (S_IWUSR / 0100)
292 #       else
293                 /* single user OS -- not Posix or Unix */
294 #               define S_IRGRP 0
295 #               define S_IWGRP 0
296 #               define S_IROTH 0
297 #               define S_IWOTH 0
298 #       endif
299 #endif
300 #ifndef S_ISREG
301 #define S_ISREG(n) (((n) & S_IFMT) == S_IFREG)
302 #endif
303
304 /* <sys/wait.h> */
305 #ifndef WEXITSTATUS
306 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
307 #undef WIFEXITED /* Avoid 4.3BSD incompatibility with Posix.  */
308 #endif
309 #ifndef WIFEXITED
310 #define WIFEXITED(stat_val) (((stat_val)  &  0377) == 0)
311 #endif
312 #ifndef WTERMSIG
313 #define WTERMSIG(stat_val) ((stat_val) & 0177)
314 #undef WIFSIGNALED /* Avoid 4.3BSD incompatibility with Posix.  */
315 #endif
316 #ifndef WIFSIGNALED
317 #define WIFSIGNALED(stat_val) ((unsigned)(stat_val) - 1  <  0377)
318 #endif
319
320 /* <unistd.h> */
321 char *getlogin P((void));
322 #ifndef STDIN_FILENO
323 #       define STDIN_FILENO 0
324 #       define STDOUT_FILENO 1
325 #       define STDERR_FILENO 2
326 #endif
327 #if has_fork && !has_vfork
328 #       undef vfork
329 #       define vfork fork
330 #endif
331 #if has_getcwd || !has_getwd
332         char *getcwd P((char*,size_t));
333 #else
334         char *getwd P((char*));
335 #endif
336 #if has_setuid && !has_seteuid
337 #       undef seteuid
338 #       define seteuid setuid
339 #endif
340 #if has_spawn
341 #       if ALL_ABSOLUTE
342 #               define spawn_RCS spawnv
343 #       else
344 #               define spawn_RCS spawnvp
345 #       endif
346 #else
347 #       if ALL_ABSOLUTE
348 #               define exec_RCS execv
349 #       else
350 #               define exec_RCS execvp
351 #       endif
352 #endif
353
354 /* utime.h */
355 #if !has_utimbuf
356         struct utimbuf { time_t actime, modtime; };
357 #endif
358
359
360 /* Standard C library */
361
362 /* <stdio.h> */
363 #ifndef L_tmpnam
364 #define L_tmpnam 32 /* power of 2 > sizeof("/usr/tmp/xxxxxxxxxxxxxxx") */
365 #endif
366 #ifndef SEEK_SET
367 #define SEEK_SET 0
368 #endif
369 #ifndef SEEK_CUR
370 #define SEEK_CUR 1
371 #endif
372 #if has_mktemp
373         char *mktemp P((char*)); /* traditional */
374 #else
375         char *tmpnam P((char*));
376 #endif
377
378 /* <stdlib.h> */
379 char *getenv P((char const*));
380 void _exit P((int)) exiting;
381 void exit P((int)) exiting;
382 malloc_type malloc P((size_t));
383 malloc_type realloc P((malloc_type,size_t));
384 #ifndef EXIT_FAILURE
385 #define EXIT_FAILURE 1
386 #endif
387 #ifndef EXIT_SUCCESS
388 #define EXIT_SUCCESS 0
389 #endif
390
391 /* <string.h> */
392 char *strcpy P((char*,char const*));
393 char *strchr P((char const*,int));
394 char *strrchr P((char const*,int));
395 void *memcpy P((void*,void const*,size_t));
396 #if has_memmove
397         void *memmove P((void*,void const*,size_t));
398 #endif
399
400 /* <time.h> */
401 time_t time P((time_t*));