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