11e72d8d2Sderaadt /* config.h --- configuration file for Windows NT 21e72d8d2Sderaadt Jim Blandy <jimb@cyclic.com> --- July 1995 */ 31e72d8d2Sderaadt 41e72d8d2Sderaadt /* This file lives in the windows-NT subdirectory, which is only included 51e72d8d2Sderaadt in your header search path if you're working under Microsoft Visual C++, 61e72d8d2Sderaadt and use ../cvsnt.mak for your project. Thus, this is the right place to 71e72d8d2Sderaadt put configuration information for Windows NT. */ 81e72d8d2Sderaadt 902d9f452Stholo /* Define if on AIX 3. 1002d9f452Stholo System headers sometimes define this. 1102d9f452Stholo We just want to avoid a redefinition error message. */ 1202d9f452Stholo #undef _ALL_SOURCE 131e72d8d2Sderaadt 1402d9f452Stholo /* Define to empty if the keyword does not work. */ 1502d9f452Stholo /* Const is working. */ 1602d9f452Stholo #undef const 1702d9f452Stholo 181e72d8d2Sderaadt /* Define to `int' if <sys/types.h> doesn't define. */ 191e72d8d2Sderaadt /* Windows NT doesn't have gid_t. It doesn't even really have group 201e72d8d2Sderaadt numbers, I think. This will take more thought to get right, but 211e72d8d2Sderaadt let's get it running first. */ 221e72d8d2Sderaadt #define gid_t int 231e72d8d2Sderaadt 241e72d8d2Sderaadt /* Define if you support file names longer than 14 characters. */ 251e72d8d2Sderaadt /* Yes. Woo. */ 261e72d8d2Sderaadt #define HAVE_LONG_FILE_NAMES 1 271e72d8d2Sderaadt 281e72d8d2Sderaadt /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ 291e72d8d2Sderaadt /* If POSIX.1 requires this, why doesn't WNT have it? */ 301e72d8d2Sderaadt #undef HAVE_SYS_WAIT_H 311e72d8d2Sderaadt 321e72d8d2Sderaadt /* Define if utime(file, NULL) sets file's timestamp to the present. */ 331e72d8d2Sderaadt /* Experimentation says yes. Wish I had the full documentation, but 341e72d8d2Sderaadt I have neither the CD-ROM nor a CD-ROM drive to put it in. */ 351e72d8d2Sderaadt #define HAVE_UTIME_NULL 1 361e72d8d2Sderaadt 372286d8edStholo /* On Windows NT, when a file is being watched, utime expects a file 382286d8edStholo to be writable */ 392286d8edStholo #define UTIME_EXPECTS_WRITABLE 402286d8edStholo 411e72d8d2Sderaadt /* Define if on MINIX. */ 421e72d8d2Sderaadt /* Hah. */ 431e72d8d2Sderaadt #undef _MINIX 441e72d8d2Sderaadt 451e72d8d2Sderaadt /* Define to `int' if <sys/types.h> doesn't define. */ 461e72d8d2Sderaadt #define mode_t int 471e72d8d2Sderaadt 481e72d8d2Sderaadt /* Define to `int' if <sys/types.h> doesn't define. */ 491e72d8d2Sderaadt /* Under Windows NT, we use the process handle as the pid. 501e72d8d2Sderaadt We could #define pid_t to be HANDLE, but that would require 511e72d8d2Sderaadt us to #include <windows.h>, which I don't trust, and HANDLE 521e72d8d2Sderaadt is a pointer type anyway. */ 531e72d8d2Sderaadt #define pid_t int 541e72d8d2Sderaadt 551e72d8d2Sderaadt /* Define if the system does not provide POSIX.1 features except 561e72d8d2Sderaadt with this defined. */ 571e72d8d2Sderaadt /* This string doesn't appear anywhere in the system header files, 581e72d8d2Sderaadt so I assume it's irrelevant. */ 591e72d8d2Sderaadt #undef _POSIX_1_SOURCE 601e72d8d2Sderaadt 611e72d8d2Sderaadt /* Define if you need to in order for stat and other things to work. */ 621e72d8d2Sderaadt /* Same as for _POSIX_1_SOURCE, above. */ 631e72d8d2Sderaadt #undef _POSIX_SOURCE 641e72d8d2Sderaadt 651e72d8d2Sderaadt /* Define as the return type of signal handlers (int or void). */ 661e72d8d2Sderaadt /* The manual says they return void. */ 671e72d8d2Sderaadt #define RETSIGTYPE void 681e72d8d2Sderaadt 691e72d8d2Sderaadt /* Define to `unsigned' if <sys/types.h> doesn't define. */ 701e72d8d2Sderaadt /* sys/types.h doesn't define it, but stdio.h does, which cvs.h 711e72d8d2Sderaadt #includes, so things should be okay. */ 721e72d8d2Sderaadt /* #undef size_t */ 731e72d8d2Sderaadt 741e72d8d2Sderaadt /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ 751e72d8d2Sderaadt /* We don't seem to have them at all; let ../lib/system.h define them. */ 761e72d8d2Sderaadt #define STAT_MACROS_BROKEN 1 771e72d8d2Sderaadt 781e72d8d2Sderaadt /* Define if you have the ANSI C header files. */ 791e72d8d2Sderaadt /* We'd damn well better. */ 801e72d8d2Sderaadt #define STDC_HEADERS 1 811e72d8d2Sderaadt 821e72d8d2Sderaadt /* Define if you can safely include both <sys/time.h> and <time.h>. */ 831e72d8d2Sderaadt /* We don't have <sys/time.h> at all. Why isn't there a definition 841e72d8d2Sderaadt for HAVE_SYS_TIME_H anywhere in config.h.in? */ 851e72d8d2Sderaadt #undef TIME_WITH_SYS_TIME 861e72d8d2Sderaadt 871e72d8d2Sderaadt /* Define to `int' if <sys/types.h> doesn't define. */ 881e72d8d2Sderaadt #define uid_t int 891e72d8d2Sderaadt 901e72d8d2Sderaadt /* Define if you have MIT Kerberos version 4 available. */ 911e72d8d2Sderaadt /* We don't. Cygnus says they've ported it to Windows 3.1, but 921e72d8d2Sderaadt I don't know if that means that it works under Windows NT as 931e72d8d2Sderaadt well. */ 941e72d8d2Sderaadt #undef HAVE_KERBEROS 951e72d8d2Sderaadt 9602d9f452Stholo /* Define if you want CVS to be able to be a remote repository client. */ 9702d9f452Stholo /* We just want the client stuff. */ 9802d9f452Stholo #define CLIENT_SUPPORT 9902d9f452Stholo 10002d9f452Stholo /* Define if you want CVS to be able to serve repositories to remote 10102d9f452Stholo clients. */ 10202d9f452Stholo /* No server support yet. Note that you don't have to define 10302d9f452Stholo CLIENT_SUPPORT or SERVER_SUPPORT to enable the non-remote code; 10402d9f452Stholo that's always there. */ 10502d9f452Stholo #undef SERVER_SUPPORT 10602d9f452Stholo 10702d9f452Stholo /* Define if you have the connect function. */ 10802d9f452Stholo /* Not used? */ 10902d9f452Stholo #define HAVE_CONNECT 11002d9f452Stholo 1111e72d8d2Sderaadt /* Define if you have the fchdir function. */ 1121e72d8d2Sderaadt #undef HAVE_FCHDIR 1131e72d8d2Sderaadt 1141e72d8d2Sderaadt /* Define if you have the fchmod function. */ 1151e72d8d2Sderaadt #undef HAVE_FCHMOD 1161e72d8d2Sderaadt 1171e72d8d2Sderaadt /* Define if you have the fsync function. */ 1181e72d8d2Sderaadt #undef HAVE_FSYNC 1191e72d8d2Sderaadt 1201e72d8d2Sderaadt /* Define if you have the ftime function. */ 1211e72d8d2Sderaadt #define HAVE_FTIME 1 1221e72d8d2Sderaadt 1231e72d8d2Sderaadt /* Define if you have the ftruncate function. */ 1241e72d8d2Sderaadt #undef HAVE_FTRUNCATE 1251e72d8d2Sderaadt 1261e72d8d2Sderaadt /* Define if you have the getpagesize function. */ 1271e72d8d2Sderaadt #undef HAVE_GETPAGESIZE 1281e72d8d2Sderaadt 1291e72d8d2Sderaadt /* Define if you have the krb_get_err_text function. */ 1301e72d8d2Sderaadt #undef HAVE_KRB_GET_ERR_TEXT 1311e72d8d2Sderaadt 1321e72d8d2Sderaadt /* Define if you have the putenv function. */ 1331e72d8d2Sderaadt #define HAVE_PUTENV 1 1341e72d8d2Sderaadt 13502d9f452Stholo /* Define if you have the sigaction function. */ 13602d9f452Stholo #undef HAVE_SIGACTION 13702d9f452Stholo 13802d9f452Stholo /* Define if you have the sigblock function. */ 13902d9f452Stholo #undef HAVE_SIGBLOCK 14002d9f452Stholo 14102d9f452Stholo /* Define if you have the sigprocmask function. */ 14202d9f452Stholo #undef HAVE_SIGPROCMASK 14302d9f452Stholo 14402d9f452Stholo /* Define if you have the sigsetmask function. */ 14502d9f452Stholo #undef HAVE_SIGSETMASK 14602d9f452Stholo 14702d9f452Stholo /* Define if you have the sigvec function. */ 14802d9f452Stholo #undef HAVE_SIGVEC 14902d9f452Stholo 1501e72d8d2Sderaadt /* Define if you have the timezone function. */ 1511e72d8d2Sderaadt /* Hmm, I actually rather think it's an extern long 1521e72d8d2Sderaadt variable; that message was mechanically generated 1531e72d8d2Sderaadt by autoconf. And I don't see any actual uses of 1541e72d8d2Sderaadt this function in the code anyway, hmm. */ 1551e72d8d2Sderaadt #undef HAVE_TIMEZONE 1561e72d8d2Sderaadt 157*43c1707eStholo /* Define if you have the usleep function. */ 158*43c1707eStholo #define HAVE_USLEEP 1 159*43c1707eStholo 1601e72d8d2Sderaadt /* Define if you have the vfork function. */ 1611e72d8d2Sderaadt #undef HAVE_VFORK 1621e72d8d2Sderaadt 1631e72d8d2Sderaadt /* Define if you have the vprintf function. */ 1641e72d8d2Sderaadt #define HAVE_VPRINTF 1 1651e72d8d2Sderaadt 16602d9f452Stholo /* Define if you have the <direct.h> header file. */ 16702d9f452Stholo /* Windows NT wants this for mkdir and friends. */ 16802d9f452Stholo #define HAVE_DIRECT_H 1 16902d9f452Stholo 1701e72d8d2Sderaadt /* Define if you have the <dirent.h> header file. */ 1711e72d8d2Sderaadt /* No, but we have the <direct.h> header file... */ 1721e72d8d2Sderaadt #undef HAVE_DIRENT_H 1731e72d8d2Sderaadt 1741e72d8d2Sderaadt /* Define if you have the <errno.h> header file. */ 1751e72d8d2Sderaadt #define HAVE_ERRNO_H 1 1761e72d8d2Sderaadt 1771e72d8d2Sderaadt /* Define if you have the <fcntl.h> header file. */ 1781e72d8d2Sderaadt #define HAVE_FCNTL_H 1 1791e72d8d2Sderaadt 18002d9f452Stholo /* Define if you have the <io.h> header file. */ 18102d9f452Stholo /* Apparently this is where Windows NT declares all the low-level 18202d9f452Stholo Unix I/O routines like open and creat and stuff. */ 18302d9f452Stholo #define HAVE_IO_H 1 18402d9f452Stholo 1851e72d8d2Sderaadt /* Define if you have the <memory.h> header file. */ 1861e72d8d2Sderaadt #define HAVE_MEMORY_H 1 1871e72d8d2Sderaadt 1881e72d8d2Sderaadt /* Define if you have the <ndbm.h> header file. */ 1891e72d8d2Sderaadt #undef HAVE_NDBM_H 1901e72d8d2Sderaadt 1911e72d8d2Sderaadt /* Define if you have the <ndir.h> header file. */ 1921e72d8d2Sderaadt #define HAVE_NDIR_H 1 1931e72d8d2Sderaadt 1941e72d8d2Sderaadt /* Define if you have the <string.h> header file. */ 1951e72d8d2Sderaadt #define HAVE_STRING_H 1 1961e72d8d2Sderaadt 19702d9f452Stholo /* Define if you have the <sys/bsdtypes.h> header file. */ 19802d9f452Stholo #undef HAVE_SYS_BSDTYPES_H 19902d9f452Stholo 2001e72d8d2Sderaadt /* Define if you have the <sys/dir.h> header file. */ 2011e72d8d2Sderaadt #undef HAVE_SYS_DIR_H 2021e72d8d2Sderaadt 2031e72d8d2Sderaadt /* Define if you have the <sys/ndir.h> header file. */ 2041e72d8d2Sderaadt #undef HAVE_SYS_NDIR_H 2051e72d8d2Sderaadt 2061e72d8d2Sderaadt /* Define if you have the <sys/param.h> header file. */ 2071e72d8d2Sderaadt #undef HAVE_SYS_PARAM_H 2081e72d8d2Sderaadt 2091e72d8d2Sderaadt /* Define if you have the <sys/select.h> header file. */ 2101e72d8d2Sderaadt #undef HAVE_SYS_SELECT_H 2111e72d8d2Sderaadt 21202d9f452Stholo /* Define if you have the <sys/time.h> header file. */ 21302d9f452Stholo #undef HAVE_SYS_TIME_H 21402d9f452Stholo 2151e72d8d2Sderaadt /* Define if you have the <unistd.h> header file. */ 2161e72d8d2Sderaadt #undef HAVE_UNISTD_H 2171e72d8d2Sderaadt 2181e72d8d2Sderaadt /* Define if you have the <utime.h> header file. */ 2191e72d8d2Sderaadt #undef HAVE_UTIME_H 2201e72d8d2Sderaadt 22102d9f452Stholo /* Define if you have the inet library (-linet). */ 22202d9f452Stholo #undef HAVE_LIBINET 2231e72d8d2Sderaadt 2241e72d8d2Sderaadt /* Define if you have the nsl library (-lnsl). */ 2251e72d8d2Sderaadt /* This is not used anywhere in the source code. */ 2261e72d8d2Sderaadt #undef HAVE_LIBNSL 2271e72d8d2Sderaadt 22802d9f452Stholo /* Define if you have the nsl_s library (-lnsl_s). */ 22902d9f452Stholo #undef HAVE_LIBNSL_S 23002d9f452Stholo 2311e72d8d2Sderaadt /* Define if you have the socket library (-lsocket). */ 2321e72d8d2Sderaadt /* This isn't ever used either. */ 2331e72d8d2Sderaadt #undef HAVE_LIBSOCKET 2341e72d8d2Sderaadt 2351e72d8d2Sderaadt /* Under Windows NT, mkdir only takes one argument. */ 2361e72d8d2Sderaadt #define CVS_MKDIR wnt_mkdir 2371e72d8d2Sderaadt extern int wnt_mkdir (const char *PATH, int MODE); 238b2346922Stholo #define CVS_STAT wnt_stat 239b2346922Stholo extern int wnt_stat (); 240b2346922Stholo #define CVS_LSTAT wnt_lstat 241b2346922Stholo extern int wnt_lstat (); 2421e72d8d2Sderaadt 243c71bc7e2Stholo #define CVS_RENAME wnt_rename 244c71bc7e2Stholo extern int wnt_rename (const char *, const char *); 245c71bc7e2Stholo 2461e72d8d2Sderaadt /* This function doesn't exist under Windows NT; we 2471e72d8d2Sderaadt provide a stub. */ 2481e72d8d2Sderaadt extern int readlink (char *path, char *buf, int buf_size); 2491e72d8d2Sderaadt 2501e72d8d2Sderaadt /* This is just a call to GetCurrentProcessID. */ 2511e72d8d2Sderaadt extern pid_t getpid (void); 2521e72d8d2Sderaadt 2531e72d8d2Sderaadt /* We definitely have prototypes. */ 2541e72d8d2Sderaadt #define USE_PROTOTYPES 1 2551e72d8d2Sderaadt 2561e72d8d2Sderaadt /* This is just a call to the Win32 Sleep function. */ 25750bf276cStholo unsigned int sleep (unsigned int); 258*43c1707eStholo /* So is this */ 259*43c1707eStholo int usleep (unsigned long); 2601e72d8d2Sderaadt 2611e72d8d2Sderaadt /* Don't worry, Microsoft, it's okay for these functions to 2621e72d8d2Sderaadt be in our namespace. */ 2631e72d8d2Sderaadt #define popen _popen 2641e72d8d2Sderaadt #define pclose _pclose 2651e72d8d2Sderaadt 2662286d8edStholo /* When writing binary data to stdout, we better set 2672286d8edStholo stdout to binary mode using setmode. */ 2682286d8edStholo #define USE_SETMODE_STDOUT 1 2691e72d8d2Sderaadt 2702286d8edStholo /* Diff also has an ifdef for setmode, and it is HAVE_SETMODE. */ 2712286d8edStholo #define HAVE_SETMODE 1 2721e72d8d2Sderaadt 2732286d8edStholo /* Diff needs us to define this. I think it could always be 2742286d8edStholo -1 for CVS, because we pass temporary files to diff, but 2752286d8edStholo config.h seems like the easiest place to put this, so for 2762286d8edStholo now we put it here. */ 2772286d8edStholo #define same_file(s,t) (-1) 2781e72d8d2Sderaadt 2791e72d8d2Sderaadt /* This is where old bits go to die under Windows NT. */ 2801e72d8d2Sderaadt #define DEVNULL "nul" 2811e72d8d2Sderaadt 2821e72d8d2Sderaadt /* Don't use an rsh subprocess to connect to the server, because 2831e72d8d2Sderaadt the rsh does inappropriate translations on the data (CR-LF/LF). */ 2841e72d8d2Sderaadt #define RSH_NOT_TRANSPARENT 1 2851e72d8d2Sderaadt extern void wnt_start_server (int *tofd, int *fromfd, 2861e72d8d2Sderaadt char *client_user, 2871e72d8d2Sderaadt char *server_user, 2881e72d8d2Sderaadt char *server_host, 2891e72d8d2Sderaadt char *server_cvsroot); 2901e72d8d2Sderaadt extern void wnt_shutdown_server (int fd); 2911e72d8d2Sderaadt #define START_SERVER wnt_start_server 2921e72d8d2Sderaadt #define SHUTDOWN_SERVER wnt_shutdown_server 29302d9f452Stholo 29450bf276cStholo #define SYSTEM_INITIALIZE(pargc,pargv) init_winsock() 29502d9f452Stholo extern void init_winsock(); 296*43c1707eStholo #define SYSTEM_CLEANUP() wnt_cleanup() 297c71bc7e2Stholo extern void wnt_cleanup (void); 298c26070a5Stholo 299c26070a5Stholo #define HAVE_WINSOCK_H 30050bf276cStholo 30150bf276cStholo /* This tells the client that it must use send()/recv() to talk to the 30250bf276cStholo server if it is connected to the server via a socket; Win95 needs 30350bf276cStholo it because _open_osfhandle doesn't work. */ 30450bf276cStholo #define NO_SOCKET_TO_FD 1 30550bf276cStholo 306b6c02222Stholo /* This tells the client that, in addition to needing to use 307b6c02222Stholo send()/recv() to do socket I/O, the error codes for send()/recv() 308b6c02222Stholo and other socket operations are not available through errno. 309b6c02222Stholo Instead, this macro should be used to obtain an error code. */ 310b6c02222Stholo #define SOCK_ERRNO (WSAGetLastError ()) 311b6c02222Stholo 312b6c02222Stholo /* This tells the client that, in addition to needing to use 313b6c02222Stholo send()/recv() to do socket I/O, the error codes for send()/recv() 314b6c02222Stholo and other socket operations are not known to strerror. Instead, 315b6c02222Stholo this macro should be used to convert the error codes to strings. */ 316b6c02222Stholo #define SOCK_STRERROR sock_strerror 317b6c02222Stholo extern char *sock_strerror (int errnum); 318b6c02222Stholo 31950bf276cStholo /* The internal rsh client uses sockets not file descriptors. Note 32050bf276cStholo that as the code stands now, it often takes values from a SOCKET and 32150bf276cStholo puts them in an int. This is ugly but it seems like sizeof 32250bf276cStholo (SOCKET) <= sizeof (int) on win32, even the 64-bit variants. */ 32350bf276cStholo #define START_SERVER_RETURNS_SOCKET 1 32450bf276cStholo 32550bf276cStholo /* Is this true on NT? Seems like I remember reports that NT 3.51 has 32650bf276cStholo problems with 200K writes (of course, the issue of large writes is 32750bf276cStholo moot since the use of buffer.c ensures that writes will only be as big 32850bf276cStholo as the buffers). */ 32950bf276cStholo #define SEND_NEVER_PARTIAL 1 330e77048c1Stholo 331e77048c1Stholo /* Force lib/regex.c to use malloc instead of messing around with alloca 332e77048c1Stholo and define the old re_comp routines that we use. */ 333e77048c1Stholo #define REGEX_MALLOC 1 334e77048c1Stholo #define _REGEX_RE_COMP 1 335