home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / cvs-1.8.7-src.tgz / tar.out / fsf / cvs / os2 / config.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  12KB  |  372 lines

  1. /* config.h --- configuration file for OS/2
  2.    Karl Fogel <kfogel@cyclic.com> --- Oct 1995  */
  3.  
  4. /* This file lives in the os2/ subdirectory, which is only included
  5.  * in your header search path if you're working under IBM C++,
  6.  * and use os2/makefile (with GNU make for OS/2).  Thus, this is the
  7.  * right place to put configuration information for OS/2.
  8.  */
  9.  
  10.  
  11. /* You bet! */
  12. #define __STDC__ 1
  13.  
  14. /* Define if on AIX 3.
  15.    System headers sometimes define this.
  16.    We just want to avoid a redefinition error message.  */
  17. #undef _ALL_SOURCE
  18.  
  19. /* Define to empty if the keyword does not work.  */
  20. /* Const is working.  */
  21. #undef const
  22.  
  23. /* Define to `int' if <sys/types.h> doesn't define.  */
  24. /* OS/2 doesn't have gid_t.  It doesn't even really have group
  25.    numbers, I think.  This will take more thought to get right, but
  26.    let's get it running first.  */
  27. #define gid_t int
  28.  
  29. /* Define if you support file names longer than 14 characters.  */
  30. /* We support long file names, but not long corporate acronyms. */
  31. #define HAVE_LONG_FILE_NAMES 1
  32.  
  33. /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
  34. /* If POSIX.1 requires this, why doesn't WNT have it?  */
  35. /* Maybe POSIX only says that if it is present, it must behave a
  36.    certain way, but that it can simply be not present too.  I
  37.    dunno. */
  38. /* Anyway, OS/2 ain't got it. */
  39. #undef HAVE_SYS_WAIT_H
  40.  
  41. /* Define if utime(file, NULL) sets file's timestamp to the present.  */
  42. /* Documentation says yup; haven't verified experimentally. */
  43. #define HAVE_UTIME_NULL 1
  44.  
  45. /* Define if on MINIX.  */
  46. /* Hah.  */
  47. #undef _MINIX
  48.  
  49. /* Define to `int' if <sys/types.h> doesn't define.  */
  50. #define mode_t int
  51.  
  52. /* Define to `int' if <sys/types.h> doesn't define.  */
  53. #define pid_t int
  54.  
  55. /* Define if the system does not provide POSIX.1 features except
  56.    with this defined.  */
  57. /* This string doesn't appear anywhere in the system header files,
  58.    so I assume it's irrelevant.  */
  59. #undef _POSIX_1_SOURCE
  60.  
  61. /* Define if you need to in order for stat and other things to work.  */
  62. /* Same as for _POSIX_1_SOURCE, above.  */
  63. #undef _POSIX_SOURCE
  64.  
  65. /* Define as the return type of signal handlers (int or void).  */
  66. /* IBMCPP manual indicates they are void.  */
  67. #define RETSIGTYPE void
  68.  
  69. /* Define to `unsigned' if <sys/types.h> doesn't define.  */
  70. /* sys/types.h doesn't define it, but stdio.h does, which cvs.h
  71.    #includes, so things should be okay.  */
  72. /* #undef size_t */
  73.  
  74. /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
  75. /* sys/stat.h apparently doesn't even have them; setting this will let
  76.    ../lib/system.h define them. */
  77. #define STAT_MACROS_BROKEN 1
  78.  
  79. /* Define if you have the ANSI C header files.  */
  80. /* We have at least a reasonable facsimile thereof. */
  81. #define STDC_HEADERS 1
  82.  
  83. /* Define if you can safely include both <sys/time.h> and <time.h>.  */
  84. /* We don't have <sys/time.h> at all.  Why isn't there a definition
  85.    for HAVE_SYS_TIME_H anywhere in config.h.in?  */
  86. #undef TIME_WITH_SYS_TIME
  87.  
  88. /* Define to `int' if <sys/types.h> doesn't define.  */
  89. #define uid_t int
  90.  
  91. /* Define if you have MIT Kerberos version 4 available.  */
  92. /* We don't. */
  93. #undef HAVE_KERBEROS
  94.  
  95. /* Define if you want CVS to be able to be a remote repository client.  */
  96. /* That's all we want.  */
  97. #define CLIENT_SUPPORT
  98.  
  99. /* Define if you want CVS to be able to serve repositories to remote
  100.    clients.  */
  101. /* No server support yet.  Note that you don't have to define
  102.    CLIENT_SUPPORT or SERVER_SUPPORT to enable the non-remote code;
  103.    that's always there.  */
  104. #undef SERVER_SUPPORT
  105.  
  106. /* the path to the gnu diff program on your system  */
  107. /* We don't need this for CLIENT side.  */
  108. #undef DIFF
  109.  
  110. /* the path to the gnu grep program on your system  */
  111. /* We don't need this for CLIENT side.  */
  112. #undef GREP
  113.  
  114. /* The number of bytes in a int.  */
  115. #define SIZEOF_INT 4
  116.  
  117. /* The number of bytes in a long.  */
  118. #define SIZEOF_LONG 4
  119.  
  120. /* Define if you have the connect function.  */
  121. /* Not used?  */
  122. /* It appears to be used in client.c now... don't know yet it OS/2 has it. */
  123. #define HAVE_CONNECT
  124.  
  125. /* Define if you have the fchdir function.  */
  126. #undef HAVE_FCHDIR
  127.  
  128. /* Define if you have the fchmod function.  */
  129. #undef HAVE_FCHMOD
  130.  
  131. /* Define if you have the fsync function.  */
  132. #undef HAVE_FSYNC
  133.  
  134. /* Define if you have the ftime function.  */
  135. #define HAVE_FTIME 1
  136.  
  137. /* Define if you have the ftruncate function.  */
  138. #undef HAVE_FTRUNCATE
  139.  
  140. /* Define if you have the getpagesize function.  */
  141. #undef HAVE_GETPAGESIZE
  142.  
  143. /* Define if you have the krb_get_err_text function.  */
  144. #undef HAVE_KRB_GET_ERR_TEXT
  145.  
  146. /* Define if you have the mkfifo function.  */
  147. #undef HAVE_MKFIFO
  148.  
  149. /* Define if you have the putenv function.  */
  150. #define HAVE_PUTENV 1
  151.  
  152. /* Define if you have the setvbuf function.  */
  153. #define HAVE_SETVBUF 1
  154.  
  155. /* Define if you have the sigaction function.  */
  156. #undef HAVE_SIGACTION
  157.  
  158. /* Define if you have the sigblock function.  */
  159. #undef HAVE_SIGBLOCK
  160.  
  161. /* Define if you have the sigprocmask function.  */
  162. #undef HAVE_SIGPROCMASK
  163.  
  164. /* Define if you have the sigsetmask function.  */
  165. #undef HAVE_SIGSETMASK
  166.  
  167. /* Define if you have the sigvec function.  */
  168. #undef HAVE_SIGVEC
  169.  
  170. /* Define if you have the timezone function.  */
  171. /* Hmm, I actually rather think it's an extern long
  172.    variable; that message was mechanically generated
  173.    by autoconf.  And I don't see any actual uses of
  174.    this function in the code anyway, hmm.  */
  175. #undef HAVE_TIMEZONE
  176.  
  177. /* Define if you have the vfork function.  */
  178. #undef HAVE_VFORK
  179.  
  180. /* Define if you have the vprintf function.  */
  181. #define HAVE_VPRINTF 1
  182.  
  183. /* Define if you have the <direct.h> header file.  */
  184. #define HAVE_DIRECT_H 1
  185.  
  186. /* Define if you have the <dirent.h> header file.  */
  187. /* We have our own dirent.h and dirent.c. */
  188. #define HAVE_DIRENT_H 1
  189.  
  190. /* Define if you have the <errno.h> header file.  */
  191. #define HAVE_ERRNO_H 1
  192.  
  193. /* Define if you have the <fcntl.h> header file.  */
  194. #define HAVE_FCNTL_H 1
  195.  
  196. /* Define if you have the <io.h> header file.  */
  197. /* Low-level Unix I/O routines like open, creat, etc.  */
  198. #define HAVE_IO_H 1
  199.  
  200. /* Define if you have the <memory.h> header file.  */
  201. #define HAVE_MEMORY_H 1
  202.  
  203. /* Define if you have the <ndbm.h> header file.  */
  204. #undef HAVE_NDBM_H
  205.  
  206. /* Define if you have the <ndir.h> header file.  */
  207. #undef HAVE_NDIR_H
  208.  
  209. /* Define if you have the <string.h> header file.  */
  210. #define HAVE_STRING_H 1
  211.  
  212. /* Define if you have the <sys/bsdtypes.h> header file.  */
  213. #undef HAVE_SYS_BSDTYPES_H
  214.  
  215. /* Define if you have the <sys/dir.h> header file.  */
  216. #undef HAVE_SYS_DIR_H
  217.  
  218. /* Define if you have the <sys/ndir.h> header file.  */
  219. #undef HAVE_SYS_NDIR_H
  220.  
  221. /* Define if you have the <sys/param.h> header file.  */    
  222. #undef HAVE_SYS_PARAM_H
  223.  
  224. /* Define if you have the <sys/select.h> header file.  */
  225. #undef HAVE_SYS_SELECT_H
  226.  
  227. /* Define if you have the <sys/time.h> header file.  */
  228. #undef HAVE_SYS_TIME_H
  229.  
  230. /* Define if you have the <sys/timeb.h> header file.  */
  231. #define HAVE_SYS_TIMEB_H 1
  232.  
  233. /* Define if you have the <unistd.h> header file.  */
  234. #undef HAVE_UNISTD_H
  235.  
  236. /* Define if you have the <utime.h> header file.  */
  237. #undef HAVE_UTIME_H
  238.  
  239. /* Define if you have the <sys/utime.h> header file.  */
  240. #define HAVE_SYS_UTIME_H 1
  241.  
  242. /* Define if you have the inet library (-linet).  */
  243. #undef HAVE_LIBINET
  244.  
  245. /* Define if you have the nsl library (-lnsl).  */
  246. /* This is not used anywhere in the source code.  */
  247. #undef HAVE_LIBNSL
  248.  
  249. /* Define if you have the nsl_s library (-lnsl_s).  */
  250. #undef HAVE_LIBNSL_S
  251.  
  252. /* Define if you have the socket library (-lsocket).  */
  253. /* This isn't ever used either.  */
  254. #undef HAVE_LIBSOCKET
  255.  
  256. /* Under OS/2, mkdir only takes one argument.  */
  257. #define CVS_MKDIR os2_mkdir
  258. extern int os2_mkdir (const char *PATH, int MODE);
  259.  
  260. /* This function doesn't exist under OS/2; we provide a stub. */
  261. extern int readlink (char *path, char *buf, int buf_size);
  262.  
  263. /* This is just a call to GetCurrentProcessID.  */
  264. extern pid_t getpid (void);
  265.  
  266. /* We definitely have prototypes.  */
  267. #define USE_PROTOTYPES 1
  268.  
  269. /* Under OS/2, filenames are case-insensitive, and both / and \
  270.    are path component separators.  */
  271. #define FOLD_FN_CHAR(c) (OS2_filename_classes[(unsigned char) (c)])
  272. extern unsigned char OS2_filename_classes[];
  273.  
  274. /* Is the character C a path name separator?  Under OS/2, you can use
  275.    either / or \.  */
  276. #define ISDIRSEP(c) (FOLD_FN_CHAR(c) == '/')
  277.  
  278. /* Like strcmp, but with the appropriate tweaks for file names.
  279.    Under OS/2, filenames are case-insensitive but case-preserving,
  280.    and both \ and / are path element separators.  */
  281. extern int fncmp (const char *n1, const char *n2);
  282.  
  283. /* Fold characters in FILENAME to their canonical forms.  
  284.    If FOLD_FN_CHAR is not #defined, the system provides a default
  285.    definition for this.  */
  286. extern void fnfold (char *FILENAME);
  287.  
  288. /* #define this if your system terminates lines in text files with
  289.    CRLF instead of plain LF, and your I/O functions automatically
  290.    translate between using LF in memory and CRLF on disk, unless you
  291.    specifically tell them not to.  */
  292. #define LINES_CRLF_TERMINATED 1
  293.  
  294. /* Read data from INFILE, and copy it to OUTFILE. 
  295.    Open INFILE using INFLAGS, and OUTFILE using OUTFLAGS.
  296.    This is useful for converting between CRLF and LF line formats.  */
  297. extern void convert_file (char *INFILE,  int INFLAGS,
  298.               char *OUTFILE, int OUTFLAGS);
  299.  
  300. /* This is where old bits go to die under OS/2 as well as WinNT.  */
  301. #define DEVNULL "nul"
  302.  
  303. /* Make sure that we don't try to perform operations on RCS files on the
  304.    local machine.  I think I neglected to apply some changes from
  305.    MHI's port in that area of code, or found some issues I didn't want
  306.    to deal with.  */
  307. #define CLIENT_ONLY
  308.  
  309. /* We actually do have a transparent rsh, whew. */
  310. #undef RSH_NOT_TRANSPARENT
  311. /* But it won't be transparent unless we ask it nicely! */
  312. #define RSH_NEEDS_BINARY_FLAG 1
  313.  
  314. /* OS/2 doesn't really have user/group permissions, at least not
  315.    according to the C library manual pages.  So we'll make decoys.
  316.    (This was partly introduced for an obsolete reason, now taken care
  317.    of by CHMOD_BROKEN, but I haven't carefully looked at every case
  318.    (in particular mode_to_string), so it might still be needed).  */
  319. #define NEED_DECOY_PERMISSIONS 1     /* see system.h */
  320.  
  321.  
  322.  
  323. /* For the access() function, for which OS/2 has no pre-defined
  324.    mnemonic masks. */
  325. #define R_OK 04
  326. #define W_OK 02
  327. #define F_OK 00
  328. #define X_OK R_OK  /* I think this is right for OS/2. */
  329.  
  330. /* For getpid() */
  331. #include <process.h>
  332.  
  333. /* So "tcpip.h" gets included in lib/system.h: */
  334. #define USE_OWN_TCPIP_H 1
  335. /* The IBM TCP/IP library gets initialized in main(): */
  336. #define SYSTEM_INITIALIZE(pargc,pargv) init_sockets()
  337. extern void init_sockets();
  338.  
  339. /* Under OS/2, we have our own popen() and pclose()... */
  340. #define USE_OWN_POPEN 1
  341. /* ... and we use popenRW to start the rsh server. */
  342. #define START_RSH_WITH_POPEN_RW 1
  343.  
  344. /*
  345.  * This tells the client that it must use send()/recv() to talk to the
  346.  * server if it is connected to the server via a socket.  Sigh.
  347.  * Windows 95 also cannot convert sockets to file descriptors,
  348.  * apparently.
  349.  */
  350. #define NO_SOCKET_TO_FD 1
  351.  
  352. /* chmod() doesn't seem to work -- IBM's own example program does not
  353.  * behave as its documentation claims, in fact!  I suspect that
  354.  * DosSetPathInfo is the way to go, but can't seem to make that work
  355.  * either.  For now, we can deal with some cases by invoking the DOS
  356.  * "attrib" command via system().  */
  357. #define CHMOD_BROKEN 1
  358.  
  359. /* Rule Number 1 of OS/2 Programming: If the function you're looking
  360.    for doesn't exist, try putting "Dos" in front of it. */
  361. #ifndef sleep
  362. #define sleep(x) DosSleep(((long)(x))*1000L)
  363. #endif /* sleep */
  364.  
  365. /* Set to 1 for some debugging messages. */
  366. #if 0
  367. #define KFF_DEBUG(call) printf("*** %s:%d: ", __FILE__, __LINE__); \
  368.                         call; fflush(stdout);
  369. #else
  370. #define KFF_DEBUG(call)
  371. #endif
  372.