home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / rcs57pc3.zip / diff / pc / config.h next >
C/C++ Source or Header  |  1999-03-29  |  6KB  |  229 lines

  1. /* emx configuration */
  2.  
  3. #ifdef __CRTRSXNT__
  4. #include <crtrsxnt.h>
  5. #undef optarg
  6. #undef optind
  7. #undef opterr
  8. #endif
  9.  
  10. #include <malloc.h>
  11.  
  12. #ifdef __EMX__
  13. #include <sys/emxload.h>
  14. #ifdef __RSXNT__
  15. #define _emxload_env(x)
  16. #endif
  17. #define arginit(pargc, pargv) \
  18.     _response (pargc, pargv); \
  19.     _wildcard (pargc, pargv); \
  20.     _emxload_env ("RCSLOAD");
  21. #else
  22. #define arginit(pargc, pargv)
  23. #endif
  24.  
  25. #define initialize_main(pargc, pargv) \
  26.   { \
  27.     arginit(pargc, pargv); \
  28.     setvbuf (stdout, NULL, _IOFBF, BUFSIZ); \
  29.     if (*pargc == 1) { \
  30.       program_name = (*pargv)[0]; \
  31.       printf ("\n%s\n\n", version_string); \
  32.       usage (); exit(0); \
  33.     } \
  34.   }
  35.  
  36. /* diffutils doesn't need re_comp,
  37.    but the shared library that diffutils builds
  38.    is used by other (old-fashioned) programs that need re_comp.  */
  39. #define _REGEX_RE_COMP
  40.  
  41. #define STAT_BLOCKSIZE(s) 65536
  42.  
  43. /* config.h for PC operating systems */
  44.  
  45. /* Define if using alloca.c.  */
  46. #undef C_ALLOCA
  47.  
  48. /* Define if the closedir function returns void instead of int.  */
  49. #undef CLOSEDIR_VOID
  50.  
  51. /* Define to empty if the keyword does not work.  */
  52. #undef const
  53.  
  54. /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
  55.    This function is required for alloca.c support on those systems.  */
  56. #undef CRAY_STACKSEG_END
  57.  
  58. /* Define if you have alloca, as a function or macro.  */
  59. #undef HAVE_ALLOCA
  60.  
  61. /* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
  62. #undef HAVE_ALLOCA_H
  63.  
  64. /* Define if you don't have vprintf but do have _doprnt.  */
  65. #undef HAVE_DOPRNT
  66.  
  67. /* Define if your struct stat has st_blksize.  */
  68. #undef HAVE_ST_BLKSIZE
  69.  
  70. /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
  71. #undef HAVE_SYS_WAIT_H
  72.  
  73. /* Define if you have <vfork.h>.  */
  74. #undef HAVE_VFORK_H
  75.  
  76. /* Define if you have the vprintf function.  */
  77. #define HAVE_VPRINTF 1
  78.  
  79. /* Define if on MINIX.  */
  80. #undef _MINIX
  81.  
  82. /* Define to `int' if <sys/types.h> doesn't define.  */
  83. #undef pid_t
  84.  
  85. /* Define if the system does not provide POSIX.1 features except
  86.    with this defined.  */
  87. #undef _POSIX_1_SOURCE
  88.  
  89. /* Define if you need to in order for stat and other things to work.  */
  90. #undef _POSIX_SOURCE
  91.  
  92. /* Define as the return type of signal handlers (int or void).  */
  93. #define RETSIGTYPE void
  94.  
  95. /* If using the C implementation of alloca, define if you know the
  96.    direction of stack growth for your system; otherwise it will be
  97.    automatically deduced at run-time.
  98.     STACK_DIRECTION > 0 => grows toward higher addresses
  99.     STACK_DIRECTION < 0 => grows toward lower addresses
  100.     STACK_DIRECTION = 0 => direction of growth unknown
  101.  */
  102. #undef STACK_DIRECTION
  103.  
  104. /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly.  */
  105. #undef STAT_MACROS_BROKEN
  106.  
  107. /* Define if you have the ANSI C header files.  */
  108. #define STDC_HEADERS 1
  109.  
  110. /* Define vfork as fork if vfork does not work.  */
  111. #define vfork fork
  112.  
  113. /* Define if you have the dup2 function.  */
  114. #define HAVE_DUP2 1
  115.  
  116. /* Define if you have the memchr function.  */
  117. #define HAVE_MEMCHR 1
  118.  
  119. /* Define if you have the sigaction function.  */
  120. #undef HAVE_SIGACTION
  121.  
  122. /* Define if you have the strchr function.  */
  123. #define HAVE_STRCHR 1
  124.  
  125. /* Define if you have the strerror function.  */
  126. #define HAVE_STRERROR 1
  127.  
  128. /* Define if you have the tmpnam function.  */
  129. #define HAVE_TMPNAM 1
  130.  
  131. /* Define if you have the <dirent.h> header file.  */
  132. #ifndef _MSC_VER
  133. #define HAVE_DIRENT_H 1
  134. #endif
  135.  
  136. /* Define if you have the <fcntl.h> header file.  */
  137. #define HAVE_FCNTL_H 1
  138.  
  139. /* Define if you have the <libintl.h> header file.  */
  140. #undef HAVE_LIBINTL_H
  141.  
  142. /* Define if you have the <limits.h> header file.  */
  143. #define HAVE_LIMITS_H 1
  144.  
  145. /* Define if you have the <locale.h> header file.  */
  146. #undef HAVE_LOCALE_H
  147.  
  148. /* Define if you have the <ndir.h> header file.  */
  149. #ifdef _MSC_VER
  150. #define HAVE_NDIR_H 1
  151. #endif
  152.  
  153. /* Define if you have the <stdlib.h> header file.  */
  154. #define HAVE_STDLIB_H 1
  155.  
  156. /* Define if you have the <string.h> header file.  */
  157. #define HAVE_STRING_H 1
  158.  
  159. /* Define if you have the <sys/dir.h> header file.  */
  160. #ifndef _MSC_VER
  161. #define HAVE_SYS_DIR_H 1
  162. #endif
  163.  
  164. /* Define if you have the <sys/file.h> header file.  */
  165. #define HAVE_SYS_FILE_H 1
  166.  
  167. /* Define if you have the <sys/ndir.h> header file.  */
  168. #undef HAVE_SYS_NDIR_H
  169.  
  170. /* Define if you have the <time.h> header file.  */
  171. #define HAVE_TIME_H 1
  172.  
  173. /* Define if you have the <unistd.h> header file.  */
  174. #if !defined(_MSC_VER) && !defined(__IBMC__)
  175. #define HAVE_UNISTD_H 1
  176. #endif
  177.  
  178. /* Define if you have the intl library (-lintl).  */
  179. #undef HAVE_LIBINTL
  180.  
  181.  
  182. /* PC specific definitions */
  183.  
  184. #include <io.h>
  185. #include <process.h>
  186.  
  187. /* The PC tradition is that file names that differ only in case are the same,
  188.    and using `stricmp' is required for proper behavior with HPFS.
  189.    OS/2 does not strictly forbid case sensitive file systems like NFS,
  190.    but it's too painful to get this right, unfortunately.  */
  191. #define filename_cmp(a, b) stricmp (a, b)
  192.  
  193. char *filename_lastdirchar (char const *);
  194. #define filename_lastdirchar (filename_lastdirchar)
  195.  
  196. #define HAVE_FORK 0
  197.  
  198. #define HAVE_SETMODE 1
  199. #ifndef _MSC_VER
  200. int setmode (int, int);
  201. #endif
  202.  
  203. #define same_file(s,t) (-1)
  204.  
  205. #define TMPDIR_ENV "TEMP"
  206.  
  207. #define PR_PROGRAM "pr"
  208. #define DIFF_PROGRAM "diff.exe"
  209. #define NULL_DEVICE "nul"
  210. #define DEFAULT_EDITOR_PROGRAM "edit"
  211.  
  212. #ifdef _MSC_VER
  213. #define alloca _alloca
  214. #define getenv getenv
  215. #endif
  216.  
  217. #ifdef __IBMC__
  218.  
  219. #define S_IFMT 0xF000
  220. #define EISDIR EINVAL
  221.  
  222. #define WEXITSTATUS(stat_val) ((stat_val) & 0xFF)
  223. #define WIFEXITED(stat_val) (((stat_val) & 0xFF00) == 0)
  224.  
  225. #endif
  226.  
  227. #include <stdio.h>
  228. #include <popen.h>
  229.