home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / rcs-5.6.0.1.tar.gz / rcs-5.6.0.1.tar / rcs5.6.0.1 / src / conf.heg < prev    next >
Text File  |  1993-03-24  |  15KB  |  497 lines

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