home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / rcs-5.6.0.1-src.lha / rcs-5.6.0.1 / src / conf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-02  |  14.6 KB  |  499 lines

  1. /* ***NOTE***  This file cannot yet be easily generated on the Amiga.  -fnf */
  2.  
  3. /* RCS compile-time configuration */
  4.  
  5.     /* $Id: conf.sh,v 5.14.0.1 1993/03/25 04:24:49 eggert Exp $ */
  6.  
  7. /*
  8.  * This file is generated automatically.
  9.  * If you edit it by hand your changes may be lost.
  10.  * Instead, please try to fix conf.sh,
  11.  * and send your fixes to rcs-bugs@cs.purdue.edu.
  12.  */
  13.  
  14. #define exitmain(n) return n /* how to exit from main() */
  15. /* #define _POSIX_SOURCE */ /* Define this if Posix + strict Standard C.  */
  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 <pwd.h>
  28. #include <signal.h>
  29. #include <stdlib.h>
  30. #include <string.h>
  31. /* #include <sys/mman.h> */
  32. #include <sys/wait.h>
  33. #include <unistd.h>
  34. #include <utime.h>
  35. /* #include <vfork.h> */
  36.  
  37. /* Define the following symbols to be 1 or 0.  */
  38. #define has_sys_dir_h 1 /* Does #include <sys/dir.h> work?  */
  39. #define has_sys_param_h 1 /* Does #include <sys/param.h> work?  */
  40. #define has_readlink 1 /* Does readlink() work?  */
  41.  
  42. /* #undef NAME_MAX */ /* Uncomment this if NAME_MAX is broken.  */
  43.  
  44. #if !defined(NAME_MAX) && !defined(_POSIX_NAME_MAX)
  45. #    if has_sys_dir_h
  46. #        include <sys/dir.h>
  47. #    endif
  48. #    ifndef NAME_MAX
  49. #        ifndef MAXNAMLEN
  50. #            define MAXNAMLEN 14
  51. #        endif
  52. #        define NAME_MAX MAXNAMLEN
  53. #    endif
  54. #endif
  55. #if !defined(PATH_MAX) && !defined(_POSIX_PATH_MAX)
  56. #    if has_sys_param_h
  57. #        include <sys/param.h>
  58. #        define included_sys_param_h 1
  59. #    endif
  60. #    ifndef PATH_MAX
  61. #        ifndef MAXPATHLEN
  62. #            define MAXPATHLEN 1024
  63. #        endif
  64. #        define PATH_MAX (MAXPATHLEN-1)
  65. #    endif
  66. #endif
  67. #if has_readlink && !defined(MAXSYMLINKS)
  68. #    if has_sys_param_h && !included_sys_param_h
  69. #        include <sys/param.h>
  70. #    endif
  71. #    ifndef MAXSYMLINKS
  72. #        define MAXSYMLINKS 20 /* BSD; not standard yet */
  73. #    endif
  74. #endif
  75.  
  76. /* Comment out the keyword definitions below if the keywords work.  */
  77. /* #define const */
  78. /* #define volatile */
  79.  
  80. /* Comment out the typedefs below if the types are already declared.  */
  81. /* Fix any uncommented typedefs that are wrong.  */
  82. /* typedef int mode_t; */
  83. /* typedef int pid_t; */
  84. typedef int sig_atomic_t;
  85. /* typedef unsigned size_t; */
  86. /* typedef int ssize_t; */
  87. /* typedef long time_t; */
  88. /* typedef int uid_t; */
  89.  
  90. /* Define the following symbols to be 1 or 0.  */
  91. #define has_prototypes 1 /* Do function prototypes work?  */
  92. #define has_stdarg 1 /* Does <stdarg.h> work?  */
  93. #define has_varargs 0 /* Does <varargs.h> work?  */
  94. #define va_start_args 2 /* How many args does va_start() take?  */
  95. #if has_prototypes
  96. #    define P(params) params
  97. #else
  98. #    define P(params) ()
  99. #endif
  100. #if has_stdarg
  101. #    include <stdarg.h>
  102. #else
  103. #    if has_varargs
  104. #        include <varargs.h>
  105. #    else
  106.         typedef char *va_list;
  107. #        define va_dcl int va_alist;
  108. #        define va_start(ap) ((ap) = (va_list)&va_alist)
  109. #        define va_arg(ap,t) (((t*) ((ap)+=sizeof(t)))  [-1])
  110. #        define va_end(ap)
  111. #    endif
  112. #endif
  113. #if va_start_args == 2
  114. #    define vararg_start va_start
  115. #else
  116. #    define vararg_start(ap,p) va_start(ap)
  117. #endif
  118.  
  119. #define text_equals_binary_stdio 1 /* Does stdio treat text like binary?  */
  120. #define text_work_stdio 0 /* Text i/o for working file, binary for RCS file?  */
  121. #if text_equals_binary_stdio
  122.     /* Text and binary i/o behave the same, or binary i/o does not work.  */
  123. #    define FOPEN_R "r"
  124. #    define FOPEN_W "w"
  125. #    define FOPEN_WPLUS "w+"
  126. #else
  127.     /* Text and binary i/o behave differently.  */
  128.     /* This is incompatible with Posix and Unix.  */
  129. #    define FOPEN_R "rb"
  130. #    define FOPEN_W "wb"
  131. #    define FOPEN_WPLUS "w+b"
  132. #endif
  133. #if text_work_stdio
  134. #    define FOPEN_R_WORK "r"
  135. #    define FOPEN_W_WORK "w"
  136. #    define FOPEN_WPLUS_WORK "w+"
  137. #else
  138. #    define FOPEN_R_WORK FOPEN_R
  139. #    define FOPEN_W_WORK FOPEN_W
  140. #    define FOPEN_WPLUS_WORK FOPEN_WPLUS
  141. #endif
  142.  
  143. /* Define or comment out the following symbols as needed.  */
  144. #define bad_fopen_wplus 0 /* Does fopen(f,FOPEN_WPLUS) fail to truncate f?  */
  145. #define getlogin_is_secure 0 /* Is getlogin() secure?  Usually it's not.  */
  146. #define has_dirent 1 /* Do opendir(), readdir(), closedir() work?  */
  147. #define has_fchmod 1 /* Does fchmod() work?  */
  148. #define has_fputs 0 /* Does fputs() work?  */
  149. #define has_ftruncate 0 /* Does ftruncate() work?  */
  150. #define has_getuid 1 /* Does getuid() work?  */
  151. #define has_getpwuid 1 /* Does getpwuid() work?  */
  152. #define has_link 1 /* Does link() work?  */
  153. #define has_memcmp 1 /* Does memcmp() work?  */
  154. #define has_memcpy 1 /* Does memcpy() work?  */
  155. #define has_memmove 1 /* Does memmove() work?  */
  156. #define has_madvise 0 /* Does madvise() work?  */
  157. #define has_mmap 0 /* Does mmap() work on regular files?  */
  158. #define has_rename 1 /* Does rename() work?  */
  159. #define bad_a_rename 0 /* Does rename(A,B) fail if A is unwritable?  */
  160. #define bad_b_rename 0 /* Does rename(A,B) fail if B is unwritable?  */
  161. #define VOID (void) /* 'VOID e;' discards the value of an expression 'e'.  */
  162. #define has_seteuid 0 /* Does seteuid() work?  See README.  */
  163. #define has_setuid 1 /* Does setuid() exist?  */
  164. #define has_signal 1 /* Does signal() work?  */
  165. #define signal_args P((int)) /* arguments of signal handlers */
  166. #define signal_type void /* type returned by signal handlers */
  167. #define sig_zaps_handler 0 /* Must a signal handler reinvoke signal()?  */
  168. #define has_sigaction 0 /* Does struct sigaction work?  */
  169. #define has_sigblock 1 /* Does sigblock() work?  */
  170. /* #define sigmask(s) (1 << ((s)-1)) */ /* Yield mask for signal number.  */
  171. #define has_sys_siglist 0 /* Does sys_siglist[] work?  */
  172. typedef ssize_t fread_type; /* type returned by fread() and fwrite() */
  173. typedef size_t freadarg_type; /* type of their size arguments */
  174. typedef void *malloc_type; /* type returned by malloc() */
  175. #define has_getcwd 1 /* Does getcwd() work?  */
  176. /* #define has_getwd ? */ /* Does getwd() work?  */
  177. #define has_mktemp 1 /* Does mktemp() work?  */
  178. #define has_NFS 1 /* Might NFS be used?  */
  179. /* #define strchr index */ /* Use old-fashioned name for strchr()?  */
  180. /* #define strrchr rindex */ /* Use old-fashioned name for strrchr()?  */
  181. #define bad_unlink 0 /* Does unlink() fail on unwritable files?  */
  182. #define has_vfork 1 /* Does vfork() work?  */
  183. #define has_fork 1 /* Does fork() work?  */
  184. #define has_spawn 0 /* Does spawn*() work?  */
  185. #define has_wait 1 /* Does wait() work?  */
  186. #define has_waitpid 1 /* Does waitpid() work?  */
  187. #define RCS_SHELL "/bin/sh" /* shell to run RCS subprograms */
  188. #define has_vfprintf 1 /* Does vfprintf() work?  */
  189. /* #define has__doprintf ? */ /* Does _doprintf() work?  */
  190. /* #define has__doprnt ? */ /* Does _doprnt() work?  */
  191. /* #undef EXIT_FAILURE */ /* Uncomment this if EXIT_FAILURE is broken.  */
  192. #define large_memory 0 /* Can main memory hold entire RCS files?  */
  193. /* #undef ULONG_MAX */ /* Uncomment this if ULONG_MAX is broken (e.g. < 0).  */
  194. /* struct utimbuf { time_t actime, modtime; }; */ /* Uncomment this if needed.  */
  195. #define CO "/gnu/bin/co" /* name of 'co' program */
  196. #define COMPAT2 0 /* Are version 2 files supported?  */
  197. #define DATEFORM "%.2d.%.2d.%.2d.%.2d.%.2d.%.2d" /* e.g. 01.01.01.01.01.01 */
  198. #define DIFF "/gnu/bin/diff" /* name of 'diff' program */
  199. #define DIFF3 "/gnu/bin/diff3" /* name of 'diff3' program */
  200. #define DIFF3_A 1 /* Does diff3 have an -A option?  */
  201. #define DIFF3_BIN 1 /* Is diff3 user-visible (not the /usr/lib auxiliary)?  */
  202. #define DIFF_FLAGS , "-an" /* Make diff output suitable for RCS.  */
  203. #define DIFF_L 1 /* Does diff -L work? */
  204. #define DIFF_SUCCESS 0 /* DIFF status if no differences are found */
  205. #define DIFF_FAILURE 1 /* DIFF status if differences are found */
  206. #define DIFF_TROUBLE 2 /* DIFF status if trouble */
  207. #define ED "/gnu/bin/ed" /* name of 'ed' program (used only if !DIFF3_BIN) */
  208. #define MERGE "/gnu/bin/merge" /* name of 'merge' program */
  209. #define TMPDIR "/tmp" /* default directory for temporary files */
  210. #define SLASH '/' /* principal pathname separator */
  211. #define SLASHes '/' /* `case SLASHes:' labels all pathname separators */
  212. #define isSLASH(c) ((c) == SLASH) /* Is arg a pathname separator?  */
  213. #define ROOTPATH(p) isSLASH((p)[0]) /* Is p an absolute pathname?  */
  214. #define X_DEFAULT ",v/" /* default value for -x option */
  215. #define DIFF_ABSOLUTE 1 /* Is ROOTPATH(DIFF) true?  */
  216. #define ALL_ABSOLUTE 1 /* Are all subprograms absolute pathnames?  */
  217. /* #define SENDMAIL  */ /* how to send mail */
  218. #define TZ_must_be_set 0 /* Must TZ be set for gmtime() to work?  */
  219.  
  220.  
  221.  
  222. /* Adjust the following declarations as needed.  */
  223.  
  224.  
  225. #if __GNUC__ && !__STRICT_ANSI__
  226. #    define exiting volatile /* GCC extension: function cannot return */
  227. #else
  228. #    define exiting
  229. #endif
  230.  
  231. #if has_ftruncate
  232.     int ftruncate P((int,off_t));
  233. #endif
  234.  
  235. /* <sys/mman.h> */
  236. #if has_madvise
  237.     int madvise P((caddr_t,size_t,int));
  238. #endif
  239. #if has_mmap
  240.     caddr_t mmap P((caddr_t,size_t,int,int,int,off_t));
  241.     int munmap P((caddr_t,size_t));
  242. #endif
  243.  
  244.  
  245. /* Posix (ISO/IEC 9945-1: 1990 / IEEE Std 1003.1-1990) */
  246. /* These definitions are for the benefit of non-Posix hosts, and */
  247. /* Posix hosts that have Standard C compilers but traditional include files.  */
  248. /* Unfortunately, mixed-up hosts are all too common.  */
  249.  
  250. /* <fcntl.h> */
  251. #ifdef F_DUPFD
  252.     int fcntl P((int,int,...));
  253. #else
  254.     int dup2 P((int,int));
  255. #endif
  256. #ifndef O_BINARY /* some non-Posix hosts need O_BINARY */
  257. #    define O_BINARY 0 /* no effect on Posix */
  258. #endif
  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.     int creat P((char const*,mode_t));
  269. #endif
  270. #ifndef O_EXCL
  271. #    define O_EXCL 0
  272. #endif
  273.  
  274. /* <pwd.h> */
  275. #if has_getpwuid
  276.     struct passwd *getpwuid P((uid_t));
  277. #endif
  278.  
  279. /* <signal.h> */
  280. #if has_sigaction
  281.     int sigaction P((int,struct sigaction const*,struct sigaction*));
  282.     int sigaddset P((sigset_t*,int));
  283.     int sigemptyset P((sigset_t*));
  284. #else
  285. #if has_sigblock
  286.     /* BSD */
  287.     int sigblock P((int));
  288.     int sigmask P((int));
  289.     int sigsetmask P((int));
  290. #endif
  291. #endif
  292.  
  293. /* <stdio.h> */
  294. FILE *fdopen P((int,char const*));
  295. int fileno P((FILE*));
  296.  
  297. /* <sys/stat.h> */
  298. int chmod P((char const*,mode_t));
  299. int fstat P((int,struct stat*));
  300. int stat P((char const*,struct stat*));
  301. mode_t umask P((mode_t));
  302. #if has_fchmod
  303.     int fchmod P((int,mode_t));
  304. #endif
  305. #ifndef S_IRUSR
  306. #    ifdef S_IREAD
  307. #        define S_IRUSR S_IREAD
  308. #    else
  309. #        define S_IRUSR 0400
  310. #    endif
  311. #    ifdef S_IWRITE
  312. #        define S_IWUSR S_IWRITE
  313. #    else
  314. #        define S_IWUSR (S_IRUSR/2)
  315. #    endif
  316. #endif
  317. #ifndef S_IRGRP
  318. #    if has_getuid
  319. #        define S_IRGRP (S_IRUSR / 0010)
  320. #        define S_IWGRP (S_IWUSR / 0010)
  321. #        define S_IROTH (S_IRUSR / 0100)
  322. #        define S_IWOTH (S_IWUSR / 0100)
  323. #    else
  324.         /* single user OS -- not Posix or Unix */
  325. #        define S_IRGRP 0
  326. #        define S_IWGRP 0
  327. #        define S_IROTH 0
  328. #        define S_IWOTH 0
  329. #    endif
  330. #endif
  331. #ifndef S_ISREG
  332. #    define S_ISREG(n) (((n) & S_IFMT) == S_IFREG)
  333. #endif
  334.  
  335. /* <sys/wait.h> */
  336. #if has_wait
  337.     pid_t wait P((int*));
  338. #endif
  339. #ifndef WEXITSTATUS
  340. #    define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  341. #    undef WIFEXITED /* Avoid 4.3BSD incompatibility with Posix.  */
  342. #endif
  343. #ifndef WIFEXITED
  344. #    define WIFEXITED(stat_val) (!((stat_val) & 255))
  345. #endif
  346.  
  347. /* <unistd.h> */
  348. char *getlogin P((void));
  349. int close P((int));
  350. int isatty P((int));
  351. int link P((char const*,char const*));
  352. int open P((char const*,int,...));
  353. int unlink P((char const*));
  354. int _filbuf P((FILE*)); /* keeps lint quiet in traditional C */
  355. int _flsbuf P((int,FILE*)); /* keeps lint quiet in traditional C */
  356. long pathconf P((char const*,int));
  357. ssize_t write P((int,void const*,size_t));
  358. #ifndef STDIN_FILENO
  359. #    define STDIN_FILENO 0
  360. #    define STDOUT_FILENO 1
  361. #    define STDERR_FILENO 2
  362. #endif
  363. #if has_fork
  364. #    if !has_vfork
  365. #        undef vfork
  366. #        define vfork fork
  367. #    endif
  368.     pid_t vfork P((void)); /* vfork is nonstandard but faster */
  369. #endif
  370. #if has_getcwd || !has_getwd
  371.     char *getcwd P((char*,size_t));
  372. #else
  373.     char *getwd P((char*));
  374. #endif
  375. #if has_getuid
  376.     uid_t getuid P((void));
  377. #endif
  378. #if has_readlink
  379.     ssize_t readlink P((char const*,char*,size_t)); /* BSD; not standard yet */
  380. #endif
  381. #if has_setuid
  382. #    if !has_seteuid
  383. #        undef seteuid
  384. #        define seteuid setuid
  385. #    endif
  386.     int seteuid P((uid_t));
  387.     uid_t geteuid P((void));
  388. #endif
  389. #if has_spawn
  390.     int spawnv P((int,char const*,char*const*));
  391. #    if ALL_ABSOLUTE
  392. #        define spawn_RCS spawnv
  393. #    else
  394. #        define spawn_RCS spawnvp
  395.         int spawnvp P((int,char const*,char*const*));
  396. #    endif
  397. #else
  398.     int execv P((char const*,char*const*));
  399. #    if ALL_ABSOLUTE
  400. #        define exec_RCS execv
  401. #    else
  402. #        define exec_RCS execvp
  403.         int execvp P((char const*,char*const*));
  404. #    endif
  405. #endif
  406.  
  407. /* utime.h */
  408. int utime P((char const*,struct utimbuf const*));
  409.  
  410.  
  411. /* Standard C library */
  412. /* These definitions are for the benefit of hosts that have */
  413. /* traditional C include files, possibly with Standard C compilers.  */
  414. /* Unfortunately, mixed-up hosts are all too common.  */
  415.  
  416. /* <errno.h> */
  417. extern int errno;
  418.  
  419. /* <limits.h> */
  420. #ifndef ULONG_MAX
  421.     /* This does not work in #ifs, but it's good enough for us.  */
  422. #    define ULONG_MAX ((unsigned long)-1)
  423. #endif
  424.  
  425. /* <signal.h> */
  426. #if has_signal
  427.     signal_type (*signal P((int,signal_type(*)signal_args)))signal_args;
  428. #endif
  429.  
  430. /* <stdio.h> */
  431. FILE *fopen P((char const*,char const*));
  432. fread_type fread P((void*,freadarg_type,freadarg_type,FILE*));
  433. fread_type fwrite P((void const*,freadarg_type,freadarg_type,FILE*));
  434. int fclose P((FILE*));
  435. int feof P((FILE*));
  436. int ferror P((FILE*));
  437. int fflush P((FILE*));
  438. int fprintf P((FILE*,char const*,...));
  439. int fputs P((char const*,FILE*));
  440. int fseek P((FILE*,long,int));
  441. int printf P((char const*,...));
  442. int rename P((char const*,char const*));
  443. int sprintf P((char*,char const*,...));
  444. /*long ftell P((FILE*));*/
  445. void clearerr P((FILE*));
  446. void perror P((char const*));
  447. #ifndef L_tmpnam
  448. #    define L_tmpnam 32 /* power of 2 > sizeof("/tmp/xxxxxxxxxxxxxxx") */
  449. #endif
  450. #ifndef SEEK_SET
  451. #    define SEEK_SET 0
  452. #endif
  453. #if has_mktemp
  454.     char *mktemp P((char*)); /* traditional */
  455. #else
  456.     char *tmpnam P((char*));
  457. #endif
  458. #if has_vfprintf
  459. /*    int vfprintf P((FILE*,char const*,va_list));*/
  460. #else
  461. #if has__doprintf
  462.     void _doprintf P((FILE*,char const*,va_list)); /* Minix */
  463. #else
  464.     void _doprnt P((char const*,va_list,FILE*)); /* BSD */
  465. #endif
  466. #endif
  467.  
  468. /* <stdlib.h> */
  469. char *getenv P((char const*));
  470. /* exiting void _exit P((int)); */
  471. /* exiting void exit P((int)); */
  472. malloc_type malloc P((size_t));
  473. malloc_type realloc P((malloc_type,size_t));
  474. void free P((malloc_type));
  475. #ifndef EXIT_FAILURE
  476. #    define EXIT_FAILURE 1
  477. #endif
  478. #ifndef EXIT_SUCCESS
  479. #    define EXIT_SUCCESS 0
  480. #endif
  481. #if !has_fork && !has_spawn
  482.     int system P((char const*));
  483. #endif
  484.  
  485. /* <string.h> */
  486. char *strcpy P((char*,char const*));
  487. char *strchr P((char const*,int));
  488. char *strrchr P((char const*,int));
  489. int memcmp P((void const*,void const*,size_t));
  490. int strcmp P((char const*,char const*));
  491. size_t strlen P((char const*));
  492. void *memcpy P((void*,void const*,size_t));
  493. #if has_memmove
  494.     void *memmove P((void*,void const*,size_t));
  495. #endif
  496.  
  497. /* <time.h> */
  498. time_t time P((time_t*));
  499.