home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / gnu / rcs-5.6.0.1-src.lha / rcs-5.6.0.1 / src / conf.heg < prev    next >
Text File  |  1993-03-25  |  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