1/* config.h --- configuration file for Windows NT
2   Jim Blandy <jimb@cyclic.com> --- July 1995  */
3
4/* This file lives in the windows-NT subdirectory, which is only included
5   in your header search path if you're working under Microsoft Visual C++,
6   and use ../cvsnt.mak for your project.  Thus, this is the right place to
7   put configuration information for Windows NT.  */
8
9/* Define if on AIX 3.
10   System headers sometimes define this.
11   We just want to avoid a redefinition error message.  */
12#undef _ALL_SOURCE
13
14/* Define to empty if the keyword does not work.  */
15/* Const is working.  */
16#undef const
17
18/* Define to `int' if <sys/types.h> doesn't define.  */
19/* Windows NT doesn't have gid_t.  It doesn't even really have group
20   numbers, I think.  This will take more thought to get right, but
21   let's get it running first.  */
22#define gid_t int
23
24/* Define if you support file names longer than 14 characters.  */
25/* Yes.  Woo.  */
26#define HAVE_LONG_FILE_NAMES 1
27
28/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
29/* If POSIX.1 requires this, why doesn't WNT have it?  */
30#undef HAVE_SYS_WAIT_H
31
32/* Define if utime(file, NULL) sets file's timestamp to the present.  */
33/* Experimentation says yes.  Wish I had the full documentation, but
34   I have neither the CD-ROM nor a CD-ROM drive to put it in.  */
35#define HAVE_UTIME_NULL 1
36
37/* On Windows NT, when a file is being watched, utime expects a file
38   to be writable */
39#define UTIME_EXPECTS_WRITABLE
40
41/* Define if on MINIX.  */
42/* Hah.  */
43#undef _MINIX
44
45/* Define to `int' if <sys/types.h> doesn't define.  */
46#define mode_t int
47
48/* Define to `int' if <sys/types.h> doesn't define.  */
49/* Under Windows NT, we use the process handle as the pid.
50   We could #define pid_t to be HANDLE, but that would require
51   us to #include <windows.h>, which I don't trust, and HANDLE
52   is a pointer type anyway.  */
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/* The manual says they return 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/* We don't seem to have them at all; let ../lib/system.h define them.  */
76#define STAT_MACROS_BROKEN 1
77
78/* Define if you have the ANSI C header files.  */
79/* We'd damn well better.  */
80#define STDC_HEADERS 1
81
82/* Define if you can safely include both <sys/time.h> and <time.h>.  */
83/* We don't have <sys/time.h> at all.  Why isn't there a definition
84   for HAVE_SYS_TIME_H anywhere in config.h.in?  */
85#undef TIME_WITH_SYS_TIME
86
87/* Define to `int' if <sys/types.h> doesn't define.  */
88#define uid_t int
89
90/* Define if you have MIT Kerberos version 4 available.  */
91/* We don't.  Cygnus says they've ported it to Windows 3.1, but
92   I don't know if that means that it works under Windows NT as
93   well.  */
94#undef HAVE_KERBEROS
95
96/* Define if you want CVS to be able to be a remote repository client.  */
97/* We just want the client stuff.  */
98#define CLIENT_SUPPORT
99
100/* Define if you want CVS to be able to serve repositories to remote
101   clients.  */
102/* No server support yet.  Note that you don't have to define
103   CLIENT_SUPPORT or SERVER_SUPPORT to enable the non-remote code;
104   that's always there.  */
105#undef SERVER_SUPPORT
106
107/* Define if you have the connect function.  */
108/* Not used?  */
109#define HAVE_CONNECT
110
111/* Define if you have the fchdir function.  */
112#undef HAVE_FCHDIR
113
114/* Define if you have the fchmod function.  */
115#undef HAVE_FCHMOD
116
117/* Define if you have the fsync function.  */
118#undef HAVE_FSYNC
119
120/* Define if you have the ftime function.  */
121#define HAVE_FTIME 1
122
123/* Define if you have the ftruncate function.  */
124#undef HAVE_FTRUNCATE
125
126/* Define if you have the getpagesize function.  */
127#undef HAVE_GETPAGESIZE
128
129/* Define if you have the krb_get_err_text function.  */
130#undef HAVE_KRB_GET_ERR_TEXT
131
132/* Define if you have the putenv function.  */
133#define HAVE_PUTENV 1
134
135/* Define if you have the sigaction function.  */
136#undef HAVE_SIGACTION
137
138/* Define if you have the sigblock function.  */
139#undef HAVE_SIGBLOCK
140
141/* Define if you have the sigprocmask function.  */
142#undef HAVE_SIGPROCMASK
143
144/* Define if you have the sigsetmask function.  */
145#undef HAVE_SIGSETMASK
146
147/* Define if you have the sigvec function.  */
148#undef HAVE_SIGVEC
149
150/* Define if you have the timezone function.  */
151/* Hmm, I actually rather think it's an extern long
152   variable; that message was mechanically generated
153   by autoconf.  And I don't see any actual uses of
154   this function in the code anyway, hmm.  */
155#undef HAVE_TIMEZONE
156
157/* Define if you have the usleep function.  */
158#define HAVE_USLEEP 1
159
160/* Define if you have the vfork function.  */
161#undef HAVE_VFORK
162
163/* Define if you have the vprintf function.  */
164#define HAVE_VPRINTF 1
165
166/* Define if you have the <direct.h> header file.  */
167/* Windows NT wants this for mkdir and friends.  */
168#define HAVE_DIRECT_H 1
169
170/* Define if you have the <dirent.h> header file.  */
171/* No, but we have the <direct.h> header file...  */
172#undef HAVE_DIRENT_H
173
174/* Define if you have the <errno.h> header file.  */
175#define HAVE_ERRNO_H 1
176
177/* Define if you have the <fcntl.h> header file.  */
178#define HAVE_FCNTL_H 1
179
180/* Define if you have the <io.h> header file.  */
181/* Apparently this is where Windows NT declares all the low-level
182   Unix I/O routines like open and creat and stuff.  */
183#define HAVE_IO_H 1
184
185/* Define if you have the <memory.h> header file.  */
186#define HAVE_MEMORY_H 1
187
188/* Define if you have the <ndbm.h> header file.  */
189#undef HAVE_NDBM_H
190
191/* Define if you have the <ndir.h> header file.  */
192#define HAVE_NDIR_H 1
193
194/* Define if you have the <string.h> header file.  */
195#define HAVE_STRING_H 1
196
197/* Define if you have the <sys/bsdtypes.h> header file.  */
198#undef HAVE_SYS_BSDTYPES_H
199
200/* Define if you have the <sys/dir.h> header file.  */
201#undef HAVE_SYS_DIR_H
202
203/* Define if you have the <sys/ndir.h> header file.  */
204#undef HAVE_SYS_NDIR_H
205
206/* Define if you have the <sys/param.h> header file.  */
207#undef HAVE_SYS_PARAM_H
208
209/* Define if you have the <sys/select.h> header file.  */
210#undef HAVE_SYS_SELECT_H
211
212/* Define if you have the <sys/time.h> header file.  */
213#undef HAVE_SYS_TIME_H
214
215/* Define if you have the <unistd.h> header file.  */
216#undef HAVE_UNISTD_H
217
218/* Define if you have the <utime.h> header file.  */
219#undef HAVE_UTIME_H
220
221/* Define if you have the inet library (-linet).  */
222#undef HAVE_LIBINET
223
224/* Define if you have the nsl library (-lnsl).  */
225/* This is not used anywhere in the source code.  */
226#undef HAVE_LIBNSL
227
228/* Define if you have the nsl_s library (-lnsl_s).  */
229#undef HAVE_LIBNSL_S
230
231/* Define if you have the socket library (-lsocket).  */
232/* This isn't ever used either.  */
233#undef HAVE_LIBSOCKET
234
235/* Under Windows NT, mkdir only takes one argument.  */
236#define CVS_MKDIR wnt_mkdir
237extern int wnt_mkdir (const char *PATH, int MODE);
238#define CVS_STAT wnt_stat
239extern int wnt_stat ();
240#define CVS_LSTAT wnt_lstat
241extern int wnt_lstat ();
242
243#define CVS_RENAME wnt_rename
244extern int wnt_rename (const char *, const char *);
245
246/* This function doesn't exist under Windows NT; we
247   provide a stub.  */
248extern int readlink (char *path, char *buf, int buf_size);
249
250/* This is just a call to GetCurrentProcessID.  */
251extern pid_t getpid (void);
252
253/* We definitely have prototypes.  */
254#define USE_PROTOTYPES 1
255
256/* This is just a call to the Win32 Sleep function.  */
257unsigned int sleep (unsigned int);
258/* So is this */
259int usleep (unsigned long);
260
261/* Don't worry, Microsoft, it's okay for these functions to
262   be in our namespace.  */
263#define popen _popen
264#define pclose _pclose
265
266/* When writing binary data to stdout, we better set
267   stdout to binary mode using setmode.  */
268#define USE_SETMODE_STDOUT 1
269
270/* Diff also has an ifdef for setmode, and it is HAVE_SETMODE.  */
271#define HAVE_SETMODE 1
272
273/* Diff needs us to define this.  I think it could always be
274   -1 for CVS, because we pass temporary files to diff, but
275   config.h seems like the easiest place to put this, so for
276   now we put it here.  */
277#define same_file(s,t) (-1)
278
279/* This is where old bits go to die under Windows NT.  */
280#define DEVNULL "nul"
281
282/* Don't use an rsh subprocess to connect to the server, because
283   the rsh does inappropriate translations on the data (CR-LF/LF).  */
284#define RSH_NOT_TRANSPARENT 1
285extern void wnt_start_server (int *tofd, int *fromfd,
286			      char *client_user,
287			      char *server_user,
288			      char *server_host,
289			      char *server_cvsroot);
290extern void wnt_shutdown_server (int fd);
291#define START_SERVER wnt_start_server
292#define SHUTDOWN_SERVER wnt_shutdown_server
293
294#define SYSTEM_INITIALIZE(pargc,pargv) init_winsock()
295extern void init_winsock();
296#define SYSTEM_CLEANUP() wnt_cleanup()
297extern void wnt_cleanup (void);
298
299#define HAVE_WINSOCK_H
300
301/* This tells the client that it must use send()/recv() to talk to the
302   server if it is connected to the server via a socket; Win95 needs
303   it because _open_osfhandle doesn't work.  */
304#define NO_SOCKET_TO_FD 1
305
306/* This tells the client that, in addition to needing to use
307   send()/recv() to do socket I/O, the error codes for send()/recv()
308   and other socket operations are not available through errno.
309   Instead, this macro should be used to obtain an error code. */
310#define SOCK_ERRNO (WSAGetLastError ())
311
312/* This tells the client that, in addition to needing to use
313   send()/recv() to do socket I/O, the error codes for send()/recv()
314   and other socket operations are not known to strerror.  Instead,
315   this macro should be used to convert the error codes to strings. */
316#define SOCK_STRERROR sock_strerror
317extern char *sock_strerror (int errnum);
318
319/* The internal rsh client uses sockets not file descriptors.  Note
320   that as the code stands now, it often takes values from a SOCKET and
321   puts them in an int.  This is ugly but it seems like sizeof
322   (SOCKET) <= sizeof (int) on win32, even the 64-bit variants.  */
323#define START_SERVER_RETURNS_SOCKET 1
324
325/* Is this true on NT?  Seems like I remember reports that NT 3.51 has
326   problems with 200K writes (of course, the issue of large writes is
327   moot since the use of buffer.c ensures that writes will only be as big
328   as the buffers).  */
329#define SEND_NEVER_PARTIAL 1
330
331/* Force lib/regex.c to use malloc instead of messing around with alloca
332   and define the old re_comp routines that we use.  */
333#define REGEX_MALLOC 1
334#define _REGEX_RE_COMP 1
335