summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cvs
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2013-12-03 01:32:50 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2013-12-03 01:32:50 +0000
commit82b0f46689d4efd0df582b92c1ab7f40379876e5 (patch)
tree5a3b40fa8d5f01197e088a605c30eb492e878b9f /gnu/usr.bin/cvs
parentc03457c962774adb61df6f322aab67b9888b4a68 (diff)
Kill usage of timeb.h for upcoming removal of libcompat. OK deraadt@
Diffstat (limited to 'gnu/usr.bin/cvs')
-rw-r--r--gnu/usr.bin/cvs/config.h.in223
-rw-r--r--gnu/usr.bin/cvs/configure2
-rw-r--r--gnu/usr.bin/cvs/configure.in2
-rw-r--r--gnu/usr.bin/cvs/emx/config.h18
-rw-r--r--gnu/usr.bin/cvs/lib/getdate.c75
-rw-r--r--gnu/usr.bin/cvs/lib/getdate.y75
-rw-r--r--gnu/usr.bin/cvs/lib/xtime.h19
-rw-r--r--gnu/usr.bin/cvs/os2/config.h169
-rw-r--r--gnu/usr.bin/cvs/src/client.c2
-rw-r--r--gnu/usr.bin/cvs/src/cvs.h2
-rw-r--r--gnu/usr.bin/cvs/src/history.c2
-rw-r--r--gnu/usr.bin/cvs/src/main.c2
-rw-r--r--gnu/usr.bin/cvs/src/rcs.c2
-rw-r--r--gnu/usr.bin/cvs/src/server.c2
-rw-r--r--gnu/usr.bin/cvs/src/subr.c3
-rw-r--r--gnu/usr.bin/cvs/vms/config.h57
-rw-r--r--gnu/usr.bin/cvs/windows-NT/config.h217
17 files changed, 471 insertions, 401 deletions
diff --git a/gnu/usr.bin/cvs/config.h.in b/gnu/usr.bin/cvs/config.h.in
index b8b42f0b38c..41f7052b232 100644
--- a/gnu/usr.bin/cvs/config.h.in
+++ b/gnu/usr.bin/cvs/config.h.in
@@ -7,41 +7,35 @@
#undef _ALL_SOURCE
#endif
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define if type char is unsigned and you are not using gcc. */
-#ifndef __CHAR_UNSIGNED__
-#undef __CHAR_UNSIGNED__
-#endif
+/* Define if the closedir function returns void instead of int. */
+#undef CLOSEDIR_VOID
/* Define to empty if the keyword does not work. */
#undef const
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
-
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
+/* Define if your system has a working fnmatch function. */
+#undef HAVE_FNMATCH
/* Define if you support file names longer than 14 characters. */
#undef HAVE_LONG_FILE_NAMES
+/* Define if your struct stat has st_blksize. */
+#undef HAVE_ST_BLKSIZE
+
+/* Define if your struct stat has st_rdev. */
+#undef HAVE_ST_RDEV
+
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define if utime(file, NULL) sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define if you have <vfork.h>. */
+#undef HAVE_VFORK_H
/* Define if on MINIX. */
#undef _MINIX
@@ -65,15 +59,6 @@
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
@@ -86,13 +71,12 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
+/* Define vfork as fork if vfork does not work. */
+#undef vfork
+
/* Define if you have MIT Kerberos version 4 available. */
#undef HAVE_KERBEROS
-/* This is always defined; it tells some library files to include
- CVS-specific features. */
-#undef CVS_SUPPORT
-
/* Define if you want CVS to be able to be a remote repository client. */
#undef CLIENT_SUPPORT
@@ -100,21 +84,47 @@
clients. */
#undef SERVER_SUPPORT
-/* the path to the gnu diff program on your system */
-#undef DIFF
-
-/* the path to the gnu grep program on your system */
-#undef GREP
-
-/* The number of bytes in a int. */
-#undef SIZEOF_INT
+/* Define if you want to use the password authenticated server. */
+#undef AUTH_SERVER_SUPPORT
-/* The number of bytes in a long. */
-#undef SIZEOF_LONG
+/* Define if you want encryption support. */
+#undef ENCRYPTION
/* Define if you have the connect function. */
#undef HAVE_CONNECT
+/* Define if you have memchr (always for CVS). */
+#undef HAVE_MEMCHR
+
+/* Define if you have strchr (always for CVS). */
+#undef HAVE_STRCHR
+
+/* Define if utime requires write access to the file (true on Windows,
+ but not Unix). */
+#undef UTIME_EXPECTS_WRITABLE
+
+/* Define if setmode is required when writing binary data to stdout. */
+#undef USE_SETMODE_STDOUT
+
+/* Define if the diff library should use setmode for binary files.
+ FIXME: Why two different macros for setmode? */
+#undef HAVE_SETMODE
+
+/* Define if you have the crypt function. */
+#undef HAVE_CRYPT
+
+/* Define if you have the getspnam function. */
+#undef HAVE_GETSPNAM
+
+/* Define to force lib/regex.c to use malloc instead of alloca. */
+#undef REGEX_MALLOC
+
+/* Define to force lib/regex.c to define re_comp et al. */
+#undef _REGEX_RE_COMP
+
+/* Define if you have the dup2 function. */
+#undef HAVE_DUP2
+
/* Define if you have the fchdir function. */
#undef HAVE_FCHDIR
@@ -130,30 +140,102 @@
/* Define if you have the ftruncate function. */
#undef HAVE_FTRUNCATE
+/* Define if you have the getgroups function. */
+#undef HAVE_GETGROUPS
+
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
+/* Define if you have the getpassphrase function. */
+#undef HAVE_GETPASSPHRASE
+
+/* Define if you have the gettimeofday function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define if you have the initgroups function. */
+#undef HAVE_INITGROUPS
+
/* Define if you have the krb_get_err_text function. */
#undef HAVE_KRB_GET_ERR_TEXT
-/* Define if you have the mkfifo function. */
-#undef HAVE_MKFIFO
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
+/* Define if you have the mkdir function. */
+#undef HAVE_MKDIR
+
+/* Define if you have the mknod function. */
+#undef HAVE_MKNOD
+
+/* Define if you have the mkstemp function. */
+#undef HAVE_MKSTEMP
+
+/* Define if you have the mktemp function. */
+#undef HAVE_MKTEMP
+
+/* Define if you have the nanosleep function. */
+#undef HAVE_NANOSLEEP
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
-/* Define if you have the setvbuf function. */
-#undef HAVE_SETVBUF
+/* Define if you have the readlink function. */
+#undef HAVE_READLINK
+
+/* Define if you have the rename function. */
+#undef HAVE_RENAME
+
+/* Define if you have the select function. */
+#undef HAVE_SELECT
+
+/* Define if you have the sigaction function. */
+#undef HAVE_SIGACTION
+
+/* Define if you have the sigblock function. */
+#undef HAVE_SIGBLOCK
+
+/* Define if you have the sigprocmask function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define if you have the sigsetmask function. */
+#undef HAVE_SIGSETMASK
+
+/* Define if you have the sigvec function. */
+#undef HAVE_SIGVEC
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the strstr function. */
+#undef HAVE_STRSTR
+
+/* Define if you have the strtoul function. */
+#undef HAVE_STRTOUL
+
+/* Define if you have the tempnam function. */
+#undef HAVE_TEMPNAM
/* Define if you have the timezone function. */
#undef HAVE_TIMEZONE
-/* Define if you have the vfork function. */
-#undef HAVE_VFORK
+/* Define if you have the tzset function. */
+#undef HAVE_TZSET
+
+/* Define if you have the usleep function. */
+#undef HAVE_USLEEP
+
+/* Define if you have the valloc function. */
+#undef HAVE_VALLOC
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
+/* Define if you have the wait3 function. */
+#undef HAVE_WAIT3
+
+/* Define if you have the waitpid function. */
+#undef HAVE_WAITPID
+
/* Define if you have the <direct.h> header file. */
#undef HAVE_DIRECT_H
@@ -166,9 +248,24 @@
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define if you have the <gssapi.h> header file. */
+#undef HAVE_GSSAPI_H
+
+/* Define if you have the <gssapi/gssapi.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_H
+
+/* Define if you have the <gssapi/gssapi_generic.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
+
/* Define if you have the <io.h> header file. */
#undef HAVE_IO_H
+/* Define if you have the <krb5.h> header file. */
+#undef HAVE_KRB5_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -187,20 +284,26 @@
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
+/* Define if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+/* Define if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <sys/timeb.h> header file. */
-#undef HAVE_SYS_TIMEB_H
+/* Define if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -208,14 +311,20 @@
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
-/* Define if you have the inet library (-linet). */
-#undef HAVE_LIBINET
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Path to the pr utility */
+#undef PR_PROGRAM
-/* Define if you have the nsl library (-lnsl). */
-#undef HAVE_LIBNSL
+/* Define if you have GSSAPI with Kerberos version 5 available. */
+#undef HAVE_GSSAPI
-/* Define if you have the nsl_s library (-lnsl_s). */
-#undef HAVE_LIBNSL_S
+/* Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only relevant
+when using GSSAPI. */
+#undef GSS_C_NT_HOSTBASED_SERVICE
-/* Define if you have the socket library (-lsocket). */
-#undef HAVE_LIBSOCKET
diff --git a/gnu/usr.bin/cvs/configure b/gnu/usr.bin/cvs/configure
index 954721dd9ba..3dec4059d30 100644
--- a/gnu/usr.bin/cvs/configure
+++ b/gnu/usr.bin/cvs/configure
@@ -2323,7 +2323,7 @@ fi
for ac_hdr in errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
limits.h sys/file.h \
- sys/param.h sys/select.h sys/time.h sys/timeb.h \
+ sys/param.h sys/select.h sys/time.h \
io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
diff --git a/gnu/usr.bin/cvs/configure.in b/gnu/usr.bin/cvs/configure.in
index 0f6cc741dc5..ebabc1b4347 100644
--- a/gnu/usr.bin/cvs/configure.in
+++ b/gnu/usr.bin/cvs/configure.in
@@ -79,7 +79,7 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
limits.h sys/file.h \
- sys/param.h sys/select.h sys/time.h sys/timeb.h \
+ sys/param.h sys/select.h sys/time.h \
io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h)
AC_HEADER_STAT
AC_HEADER_TIME
diff --git a/gnu/usr.bin/cvs/emx/config.h b/gnu/usr.bin/cvs/emx/config.h
index f9ec55f7672..a0887ba8774 100644
--- a/gnu/usr.bin/cvs/emx/config.h
+++ b/gnu/usr.bin/cvs/emx/config.h
@@ -211,9 +211,6 @@
/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
-/* Define if you have the <sys/timeb.h> header file. */
-#define HAVE_SYS_TIMEB_H 1
-
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
@@ -257,18 +254,6 @@ extern int fncmp (const char *n1, const char *n2);
definition for this. */
extern void fnfold (char *FILENAME);
-/* #define this if your system terminates lines in text files with
- CRLF instead of plain LF, and your I/O functions automatically
- translate between using LF in memory and CRLF on disk, unless you
- specifically tell them not to. */
-#define LINES_CRLF_TERMINATED 1
-
-/* Read data from INFILE, and copy it to OUTFILE.
- Open INFILE using INFLAGS, and OUTFILE using OUTFLAGS.
- This is useful for converting between CRLF and LF line formats. */
-extern void convert_file (char *INFILE, int INFLAGS,
- char *OUTFILE, int OUTFLAGS);
-
/* This is where old bits go to die under OS/2 as well as WinNT. */
#define DEVNULL "nul"
@@ -323,3 +308,6 @@ extern int os2_fnmatch(const char *pattern, const char *name, int flags);
/* See above; we can't use rsh without -b. */
#define RSH_NOT_TRANSPARENT 1
+
+/* See discussion at xchmod in filesubr.c. */
+#define CHMOD_BROKEN 1
diff --git a/gnu/usr.bin/cvs/lib/getdate.c b/gnu/usr.bin/cvs/lib/getdate.c
index a94d7ed3def..65da187b818 100644
--- a/gnu/usr.bin/cvs/lib/getdate.c
+++ b/gnu/usr.bin/cvs/lib/getdate.c
@@ -1899,59 +1899,50 @@ difftm (a, b)
}
time_t
-get_date(p, now)
- char *p;
- struct timeb *now;
+get_date(p)
+ char *p;
{
- struct tm *tm, gmt;
- struct timeb ftz;
+ struct tm *tm, *gmt, gmtbuf;
time_t Start;
time_t tod;
- time_t nowtime;
+ time_t now;
+ time_t timezone;
yyInput = p;
- if (now == NULL) {
- struct tm *gmt_ptr;
+ (void)time (&now);
- now = &ftz;
- (void)time (&nowtime);
-
- gmt_ptr = gmtime (&nowtime);
- if (gmt_ptr != NULL)
- {
- /* Make a copy, in case localtime modifies *tm (I think
- that comment now applies to *gmt_ptr, but I am too
- lazy to dig into how gmtime and locatime allocate the
- structures they return pointers to). */
- gmt = *gmt_ptr;
- }
+ gmt = gmtime (&now);
+ if (gmt != NULL)
+ {
+ /* Make a copy, in case localtime modifies *tm (I think
+ that comment now applies to *gmt, but I am too
+ lazy to dig into how gmtime and locatime allocate the
+ structures they return pointers to). */
+ gmtbuf = *gmt;
+ gmt = &gmtbuf;
+ }
- if (! (tm = localtime (&nowtime)))
- return -1;
+ if (! (tm = localtime (&now)))
+ return -1;
- if (gmt_ptr != NULL)
- ftz.timezone = difftm (&gmt, tm) / 60;
- else
- /* We are on a system like VMS, where the system clock is
- in local time and the system has no concept of timezones.
- Hopefully we can fake this out (for the case in which the
- user specifies no timezone) by just saying the timezone
- is zero. */
- ftz.timezone = 0;
-
- if(tm->tm_isdst)
- ftz.timezone += 60;
- }
+ if (gmt != NULL)
+ timezone = difftm (gmt, tm) / 60;
else
- {
- nowtime = now->time;
- }
+ /* We are on a system like VMS, where the system clock is
+ in local time and the system has no concept of timezones.
+ Hopefully we can fake this out (for the case in which the
+ user specifies no timezone) by just saying the timezone
+ is zero. */
+ timezone = 0;
+
+ if(tm->tm_isdst)
+ timezone += 60;
- tm = localtime(&nowtime);
+ tm = localtime(&now);
yyYear = tm->tm_year + 1900;
yyMonth = tm->tm_mon + 1;
yyDay = tm->tm_mday;
- yyTimezone = now->timezone;
+ yyTimezone = timezone;
yyDSTmode = DSTmaybe;
yyHour = 0;
yyMinutes = 0;
@@ -1976,7 +1967,7 @@ get_date(p, now)
return -1;
}
else {
- Start = nowtime;
+ Start = now;
if (!yyHaveRel)
Start -= ((tm->tm_hour * 60L + tm->tm_min) * 60L) + tm->tm_sec;
}
@@ -2009,7 +2000,7 @@ main(ac, av)
(void)printf("Enter date, or blank line to exit.\n\t> ");
(void)fflush(stdout);
while (gets(buff) && buff[0]) {
- d = get_date(buff, (struct timeb *)NULL);
+ d = get_date(buff);
if (d == -1)
(void)printf("Bad format - couldn't convert.\n");
else
diff --git a/gnu/usr.bin/cvs/lib/getdate.y b/gnu/usr.bin/cvs/lib/getdate.y
index eb293763f39..789ae032c12 100644
--- a/gnu/usr.bin/cvs/lib/getdate.y
+++ b/gnu/usr.bin/cvs/lib/getdate.y
@@ -885,59 +885,50 @@ difftm (a, b)
}
time_t
-get_date(p, now)
- char *p;
- struct timeb *now;
+get_date(p)
+ char *p;
{
- struct tm *tm, gmt;
- struct timeb ftz;
+ struct tm *tm, *gmt, gmtbuf;
time_t Start;
time_t tod;
- time_t nowtime;
+ time_t now;
+ time_t timezone;
yyInput = p;
- if (now == NULL) {
- struct tm *gmt_ptr;
+ (void)time (&now);
- now = &ftz;
- (void)time (&nowtime);
-
- gmt_ptr = gmtime (&nowtime);
- if (gmt_ptr != NULL)
- {
- /* Make a copy, in case localtime modifies *tm (I think
- that comment now applies to *gmt_ptr, but I am too
- lazy to dig into how gmtime and locatime allocate the
- structures they return pointers to). */
- gmt = *gmt_ptr;
- }
+ gmt = gmtime (&now);
+ if (gmt != NULL)
+ {
+ /* Make a copy, in case localtime modifies *tm (I think
+ that comment now applies to *gmt, but I am too
+ lazy to dig into how gmtime and locatime allocate the
+ structures they return pointers to). */
+ gmtbuf = *gmt;
+ gmt = &gmtbuf;
+ }
- if (! (tm = localtime (&nowtime)))
- return -1;
+ if (! (tm = localtime (&now)))
+ return -1;
- if (gmt_ptr != NULL)
- ftz.timezone = difftm (&gmt, tm) / 60;
- else
- /* We are on a system like VMS, where the system clock is
- in local time and the system has no concept of timezones.
- Hopefully we can fake this out (for the case in which the
- user specifies no timezone) by just saying the timezone
- is zero. */
- ftz.timezone = 0;
-
- if(tm->tm_isdst)
- ftz.timezone += 60;
- }
+ if (gmt != NULL)
+ timezone = difftm (gmt, tm) / 60;
else
- {
- nowtime = now->time;
- }
+ /* We are on a system like VMS, where the system clock is
+ in local time and the system has no concept of timezones.
+ Hopefully we can fake this out (for the case in which the
+ user specifies no timezone) by just saying the timezone
+ is zero. */
+ timezone = 0;
+
+ if(tm->tm_isdst)
+ timezone += 60;
- tm = localtime(&nowtime);
+ tm = localtime(&now);
yyYear = tm->tm_year + 1900;
yyMonth = tm->tm_mon + 1;
yyDay = tm->tm_mday;
- yyTimezone = now->timezone;
+ yyTimezone = timezone;
yyDSTmode = DSTmaybe;
yyHour = 0;
yyMinutes = 0;
@@ -962,7 +953,7 @@ get_date(p, now)
return -1;
}
else {
- Start = nowtime;
+ Start = now;
if (!yyHaveRel)
Start -= ((tm->tm_hour * 60L + tm->tm_min) * 60L) + tm->tm_sec;
}
@@ -995,7 +986,7 @@ main(ac, av)
(void)printf("Enter date, or blank line to exit.\n\t> ");
(void)fflush(stdout);
while (gets(buff) && buff[0]) {
- d = get_date(buff, (struct timeb *)NULL);
+ d = get_date(buff);
if (d == -1)
(void)printf("Bad format - couldn't convert.\n");
else
diff --git a/gnu/usr.bin/cvs/lib/xtime.h b/gnu/usr.bin/cvs/lib/xtime.h
index 00d9fae874c..9cfcf589208 100644
--- a/gnu/usr.bin/cvs/lib/xtime.h
+++ b/gnu/usr.bin/cvs/lib/xtime.h
@@ -27,25 +27,6 @@
# endif /* !HAVE_SYS_TIME_H */
# endif /* !TIME_WITH_SYS_TIME */
-# ifdef HAVE_SYS_TIMEB_H
-# include <sys/timeb.h>
-# else /* HAVE_SYS_TIMEB_H */
-/*
- * We use the obsolete `struct timeb' as part of our interface!
- * Since the system doesn't have it, we define it here;
- * our callers must do likewise.
- *
- * At the least we were using this in lib/getdate.y, but lib/system.h used to
- * define it too, so maybe CVS is using it elsewhere.
- */
-struct timeb {
- time_t time; /* Seconds since the epoch */
- unsigned short millitm; /* Field not used */
- short timezone; /* Minutes west of GMT */
- short dstflag; /* Field not used */
-};
-# endif /* !HAVE_SYS_TIMEB_H */
-
# ifdef timezone
# undef timezone /* needed for sgi */
# endif /* timezone */
diff --git a/gnu/usr.bin/cvs/os2/config.h b/gnu/usr.bin/cvs/os2/config.h
index 052e565482d..aa489c79a1f 100644
--- a/gnu/usr.bin/cvs/os2/config.h
+++ b/gnu/usr.bin/cvs/os2/config.h
@@ -1,6 +1,16 @@
/* config.h --- configuration file for OS/2
Karl Fogel <kfogel@cyclic.com> --- Oct 1995 */
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
/* This file lives in the os2/ subdirectory, which is only included
* in your header search path if you're working under IBM C++,
* and use os2/makefile (with GNU make for OS/2). Thus, this is the
@@ -8,50 +18,57 @@
*/
+/* We need some system header files here since we evaluate values from
+ * these files below.
+ */
+#include <stdio.h>
+#include <errno.h>
+
+
+
+#ifndef __STDC__
/* You bet! */
#define __STDC__ 1
+#endif
+
+/* The IBM compiler uses the (non-standard) error code EACCESS instead of
+ EACCES (note: one 'S'). Define EACCESS to be EACCES and use the standard
+ name in the code. */
+#ifndef EACCES
+#define EACCES EACCESS
+#endif
+
+/* Handle some other name differences between the IBM and the Watcom
+ * compiler.
+ */
+#ifdef __WATCOMC__
+#define _setmode setmode
+#define _cwait cwait
+#endif
+
+/* Some more WATCOM stuff: The watcom compiler defines va_list as an array,
+ * not as a pointer, which will make the vasprintf code break without the
+ * following define:
+ */
+#ifdef __WATCOMC__
+#define VA_LIST_IS_ARRAY
+#endif
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#undef _ALL_SOURCE
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define if type char is unsigned and you are not using gcc. */
-/* We wrote a little test program whose output suggests that char is
- signed on this system. Go back and check the verdict when CVS
- is configured on floss... */
-#undef __CHAR_UNSIGNED__
-
/* Define to empty if the keyword does not work. */
/* Const is working. */
#undef const
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* This shouldn't matter, but pro forma: */
-#undef CRAY_STACKSEG_END
-
/* Define to `int' if <sys/types.h> doesn't define. */
/* OS/2 doesn't have gid_t. It doesn't even really have group
numbers, I think. This will take more thought to get right, but
let's get it running first. */
#define gid_t int
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
-/* OS/2 has alloca() in <stdlib.h>! */
-#define ALLOCA_IN_STDLIB 1
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* but calls it _alloca and says it returns void *. We provide our
- own header file. */
-/* OS/2 declares alloca in `stdlib.h'. */
-/* #define HAVE_ALLOCA_H 1 */
-#undef HAVE_ALLOCA_H
-
/* Define if you support file names longer than 14 characters. */
/* We support long file names, but not long corporate acronyms. */
#define HAVE_LONG_FILE_NAMES 1
@@ -68,10 +85,6 @@
/* Documentation says yup; haven't verified experimentally. */
#define HAVE_UTIME_NULL 1
-/* We don't appear to have inline functions, so just expand "inline"
- to "". */
-#define inline
-
/* Define if on MINIX. */
/* Hah. */
#undef _MINIX
@@ -101,16 +114,6 @@
#includes, so things should be okay. */
/* #undef size_t */
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* This shouldn't matter, but pro forma: */
-#undef STACK_DIRECTION
-
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* sys/stat.h apparently doesn't even have them; setting this will let
../lib/system.h define them. */
@@ -143,20 +146,6 @@
that's always there. */
#undef SERVER_SUPPORT
-/* the path to the gnu diff program on your system */
-/* We don't need this for CLIENT side. */
-#undef DIFF
-
-/* the path to the gnu grep program on your system */
-/* We don't need this for CLIENT side. */
-#undef GREP
-
-/* The number of bytes in a int. */
-#define SIZEOF_INT 4
-
-/* The number of bytes in a long. */
-#define SIZEOF_LONG 4
-
/* Define if you have the connect function. */
/* Not used? */
/* It appears to be used in client.c now... don't know yet it OS/2 has it. */
@@ -183,15 +172,9 @@
/* Define if you have the krb_get_err_text function. */
#undef HAVE_KRB_GET_ERR_TEXT
-/* Define if you have the mkfifo function. */
-#undef HAVE_MKFIFO
-
/* Define if you have the putenv function. */
#define HAVE_PUTENV 1
-/* Define if you have the setvbuf function. */
-#define HAVE_SETVBUF 1
-
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
@@ -214,6 +197,9 @@
this function in the code anyway, hmm. */
#undef HAVE_TIMEZONE
+/* Define if you have the tzset function. */
+#define HAVE_TZSET 1
+
/* Define if you have the vfork function. */
#undef HAVE_VFORK
@@ -225,7 +211,11 @@
/* Define if you have the <dirent.h> header file. */
/* We have our own dirent.h and dirent.c. */
+#ifdef __WATCOMC__
+#undef HAVE_DIRENT_H
+#else
#define HAVE_DIRENT_H 1
+#endif
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
@@ -267,9 +257,6 @@
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <sys/timeb.h> header file. */
-#define HAVE_SYS_TIMEB_H 1
-
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -297,11 +284,17 @@
#define CVS_MKDIR os2_mkdir
extern int os2_mkdir (const char *PATH, int MODE);
+/* OS/2 needs a special chdir functions that handles drives */
+#define CVS_CHDIR os2_chdir
+extern int os2_chdir (const char *Dir);
+
/* This function doesn't exist under OS/2; we provide a stub. */
extern int readlink (char *path, char *buf, int buf_size);
/* This is just a call to GetCurrentProcessID. */
+#ifndef __WATCOMC__
extern pid_t getpid (void);
+#endif
/* We definitely have prototypes. */
#define USE_PROTOTYPES 1
@@ -325,30 +318,9 @@ extern int fncmp (const char *n1, const char *n2);
definition for this. */
extern void fnfold (char *FILENAME);
-/* #define this if your system terminates lines in text files with
- CRLF instead of plain LF, and your I/O functions automatically
- translate between using LF in memory and CRLF on disk, unless you
- specifically tell them not to. */
-#define LINES_CRLF_TERMINATED 1
-
-/* Read data from INFILE, and copy it to OUTFILE.
- Open INFILE using INFLAGS, and OUTFILE using OUTFLAGS.
- This is useful for converting between CRLF and LF line formats. */
-extern void convert_file (char *INFILE, int INFLAGS,
- char *OUTFILE, int OUTFLAGS);
-
/* This is where old bits go to die under OS/2 as well as WinNT. */
#define DEVNULL "nul"
-/* Comment markers for some OS/2-specific file types. */
-/* Actually, these come from WinNT, but what the heck. */
-#define SYSTEM_COMMENT_TABLE \
- "mak", "# ", /* makefile */ \
- "rc", " * ", /* MS Windows resource file */ \
- "dlg", " * ", /* MS Windows dialog file */ \
- "frm", "' ", /* Visual Basic form */ \
- "bas", "' ", /* Visual Basic code */
-
/* Make sure that we don't try to perform operations on RCS files on the
local machine. I think I neglected to apply some changes from
MHI's port in that area of code, or found some issues I didn't want
@@ -361,22 +333,29 @@ extern void convert_file (char *INFILE, int INFLAGS,
#define RSH_NEEDS_BINARY_FLAG 1
/* OS/2 doesn't really have user/group permissions, at least not
- according to the C library manual pages. So we'll make decoys. */
+ according to the C library manual pages. So we'll make decoys.
+ (This was partly introduced for an obsolete reason, now taken care
+ of by CHMOD_BROKEN, but I haven't carefully looked at every case
+ (in particular mode_to_string), so it might still be needed).
+ We do not need that for the watcom compiler since watcom already
+ all those permission bits defined. It would probably be better to
+ include the necessary system header files in system.h, and then make
+ each permission define only if it is not already defined.
+*/
+#ifndef __WATCOMC__
#define NEED_DECOY_PERMISSIONS 1 /* see system.h */
-
-/* See client.c. Setting execute bits with chmod seems to lose under
- OS/2, although in some places the documentation grudgingly admits
- to the existence of execute bits. */
-#define EXECUTE_PERMISSION_LOSES 1
+#endif
-/* For the access() function, for which OS/2 has no pre-defined
+/* For the access() function, for which IBM OS/2 compiler has no pre-defined
mnemonic masks. */
+#ifndef __WATCOMC__
#define R_OK 04
#define W_OK 02
#define F_OK 00
#define X_OK R_OK /* I think this is right for OS/2. */
+#endif
/* For getpid() */
#include <process.h>
@@ -384,7 +363,7 @@ extern void convert_file (char *INFILE, int INFLAGS,
/* So "tcpip.h" gets included in lib/system.h: */
#define USE_OWN_TCPIP_H 1
/* The IBM TCP/IP library gets initialized in main(): */
-#define INITIALIZE_SOCKET_SUBSYSTEM init_sockets
+#define SYSTEM_INITIALIZE(pargc,pargv) init_sockets()
extern void init_sockets();
/* Under OS/2, we have our own popen() and pclose()... */
@@ -395,7 +374,7 @@ extern void init_sockets();
/*
* This tells the client that it must use send()/recv() to talk to the
* server if it is connected to the server via a socket. Sigh.
- * Windows 95 also cannot convert sockets to file descriptors,
+ * Windows 95 and VMS cannot convert sockets to file descriptors either,
* apparently.
*/
#define NO_SOCKET_TO_FD 1
@@ -408,8 +387,10 @@ extern void init_sockets();
#define CHMOD_BROKEN 1
/* Rule Number 1 of OS/2 Programming: If the function you're looking
- for doesn't exist, try putting "Dos" in front of it. */
+ for doesn't exist, try putting "Dos" in front of it.
+ Do not forget to include the os2 header file if we use DosSleep. */
#ifndef sleep
+#include "os2inc.h"
#define sleep(x) DosSleep(((long)(x))*1000L)
#endif /* sleep */
diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c
index 0c0df1bc91d..f7abc83391f 100644
--- a/gnu/usr.bin/cvs/src/client.c
+++ b/gnu/usr.bin/cvs/src/client.c
@@ -1578,7 +1578,7 @@ handle_mod_time (args, len)
{
if (stored_modtime_valid)
error (0, 0, "protocol error: duplicate Mod-time");
- stored_modtime = get_date (args, NULL);
+ stored_modtime = get_date (args);
if (stored_modtime == (time_t) -1)
error (0, 0, "protocol error: cannot parse date %s", args);
else
diff --git a/gnu/usr.bin/cvs/src/cvs.h b/gnu/usr.bin/cvs/src/cvs.h
index 30ed9da4068..8755f570db7 100644
--- a/gnu/usr.bin/cvs/src/cvs.h
+++ b/gnu/usr.bin/cvs/src/cvs.h
@@ -518,7 +518,7 @@ int update PROTO((int argc, char *argv[]));
int xcmp PROTO((const char *file1, const char *file2));
int yesno PROTO((void));
void *valloc PROTO((size_t bytes));
-time_t get_date PROTO((char *date, struct timeb *now));
+time_t get_date PROTO((char *date));
extern int Create_Admin PROTO ((char *dir, char *update_dir,
char *repository, char *tag, char *date,
int nonbranch, int warn, int dotemplate));
diff --git a/gnu/usr.bin/cvs/src/history.c b/gnu/usr.bin/cvs/src/history.c
index 945b1e116a9..106e987b2a2 100644
--- a/gnu/usr.bin/cvs/src/history.c
+++ b/gnu/usr.bin/cvs/src/history.c
@@ -508,7 +508,7 @@ history (argc, argv)
char *buf = xmalloc (sizeof (f) - 2 + strlen (optarg));
time_t t;
sprintf (buf, f, optarg);
- t = get_date (buf, (struct timeb *) NULL);
+ t = get_date (buf);
free (buf);
if (t == (time_t) -1)
error (0, 0, "%s is not a known time zone", optarg);
diff --git a/gnu/usr.bin/cvs/src/main.c b/gnu/usr.bin/cvs/src/main.c
index 9c1f514afb0..aff26d56eb3 100644
--- a/gnu/usr.bin/cvs/src/main.c
+++ b/gnu/usr.bin/cvs/src/main.c
@@ -1078,7 +1078,7 @@ Make_Date (rawdate)
{
time_t unixtime;
- unixtime = get_date (rawdate, (struct timeb *) NULL);
+ unixtime = get_date (rawdate);
if (unixtime == (time_t) - 1)
error (1, 0, "Can't parse date/time: %s", rawdate);
return date_from_time_t (unixtime);
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c
index a21aba51234..5684a7e3dbf 100644
--- a/gnu/usr.bin/cvs/src/rcs.c
+++ b/gnu/usr.bin/cvs/src/rcs.c
@@ -3057,7 +3057,7 @@ RCS_getrevtime (rcs, rev, date, fudge)
ftm->tm_min, ftm->tm_sec);
/* turn it into seconds since the epoch */
- revdate = get_date (tdate, (struct timeb *) NULL);
+ revdate = get_date (tdate);
if (revdate != (time_t) -1)
{
revdate -= fudge; /* remove "fudge" seconds */
diff --git a/gnu/usr.bin/cvs/src/server.c b/gnu/usr.bin/cvs/src/server.c
index 8d7114256b8..91afd17918d 100644
--- a/gnu/usr.bin/cvs/src/server.c
+++ b/gnu/usr.bin/cvs/src/server.c
@@ -1919,7 +1919,7 @@ serve_checkin_time (arg)
return;
}
- checkin_time = get_date (arg, NULL);
+ checkin_time = get_date (arg);
if (checkin_time == (time_t)-1)
{
if (alloc_pending (80 + strlen (arg)))
diff --git a/gnu/usr.bin/cvs/src/subr.c b/gnu/usr.bin/cvs/src/subr.c
index 597b2f137f6..b9b8227ceda 100644
--- a/gnu/usr.bin/cvs/src/subr.c
+++ b/gnu/usr.bin/cvs/src/subr.c
@@ -382,9 +382,8 @@ getcaller ()
#ifndef __GNUC__
/* ARGSUSED */
time_t
-get_date (date, now)
+get_date (date)
char *date;
- struct timeb *now;
{
time_t foo = 0;
diff --git a/gnu/usr.bin/cvs/vms/config.h b/gnu/usr.bin/cvs/vms/config.h
index d115228e309..67470018f45 100644
--- a/gnu/usr.bin/cvs/vms/config.h
+++ b/gnu/usr.bin/cvs/vms/config.h
@@ -5,6 +5,14 @@
#define CLIENT_SUPPORT 1
#undef SERVER_SUPPORT
+/* Set up for other #if's which follow */
+#ifndef __DECC_VER
+#define __DECC_VER 0
+#endif
+#ifndef __VMS_VER
+#define __VMS_VER 0
+#endif
+
/* VMS is case insensitive */
/* #define FOLD_FN_CHAR(c) tolower(c) */
@@ -15,9 +23,6 @@
/* More issues with how VMS names files, kind of a kludge. See login.c. */
#define NO_SLASH_AFTER_HOME 1
-/* Only good for NT or DOS with hacked open */
-/* #undef LINES_CRLF_TERMINATED */
-
/* Define to empty if the keyword does not work. */
/* #undef const */
@@ -47,7 +52,7 @@
/* #undef mode_t */
/* Define if you don't have <dirent.h>, but have <ndir.h>. */
-/* #undef NDIR */
+#define HAVE_NDIR_H 1
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef pid_t */
@@ -83,18 +88,9 @@
/* Define if the closedir function returns void instead of int. */
/* #undef VOID_CLOSEDIR */
-/* Define if you want direct TCP access to server */
-#define USE_DIRECT_TCP 1
-
/* Define if you have MIT Kerberos version 4 available. */
/* #undef HAVE_KERBEROS */
-/* The number of bytes in a int. */
-#define SIZEOF_INT 4
-
-/* The number of bytes in a long. */
-#define SIZEOF_LONG 4
-
/* Define if you have the fchmod function. */
/* #undef HAVE_FCHMOD */
@@ -122,18 +118,9 @@
/* Define if you have the rename function */
#define HAVE_RENAME 1
-/* Define if you have the strdup function */
-#define HAVE_STRDUP 1
-
-/* Define if you have the mkfifo function. */
-/* #undef HAVE_MKFIFO */
-
/* Define if you have the putenv function. */
/* #undef HAVE_PUTENV */
-/* Define if you have the setvbuf function. */
-/* #undef HAVE_SETVBUF */
-
/* Define if you have the timezone function. */
/* #undef HAVE_TIMEZONE */
@@ -141,13 +128,15 @@
#define HAVE_VFORK
/* Define if you have the vprintf function. */
-/* #undef HAVE_VPRINTF */
+#define HAVE_VPRINTF
/* Define if you have the <errno.h> header file. */
/* #undef HAVE_ERRNO_H */
/* Define if you have the <fcntl.h> header file. */
-/* #undef HAVE_FCNTL_H */
+#if __DECC_VER >= 50700000
+# define HAVE_FCNTL_H 1
+#endif
/* Define if you have the <memory.h> header file. */
/* #undef HAVE_MEMORY_H */
@@ -158,16 +147,18 @@
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
+/* Define to force lib/regex.c to use malloc instead of alloca. */
+#define REGEX_MALLOC 1
+
+/* Define to force lib/regex.c to define re_comp et al. */
+#define _REGEX_RE_COMP 1
+
/* Define if you have the <sys/select.h> header file. */
/* #undef HAVE_SYS_SELECT_H */
/* Define this if your <sys/socket.h> defines select() */
#define SYS_SOCKET_H_DEFINES_SELECT 1
-/* Define if you have the <sys/timeb.h> header file. */
-#define HAVE_SYS_TIMEB_H 1
-#define HAVE_TIMEB_H 1
-
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
@@ -201,6 +192,8 @@ extern void fnfold (char *FILENAME);
#define NO_SOCKET_TO_FD 1
#define START_SERVER_RETURNS_SOCKET 1
#define SEND_NEVER_PARTIAL 1
+#define SYSTEM_GETCALLER() getlogin ()
+#define GETPWNAM_MISSING 1
/* Avoid name conflicts with VMS libraries. */
#define getopt cvs_getopt
@@ -209,6 +202,12 @@ extern void fnfold (char *FILENAME);
#define optarg cvs_optarg
#define opterr cvs_opterr
+/* Avoid open/read/closedir name conflicts with DEC C 5.7 libraries,
+ and fix the problem with readdir() retaining the trailing period. */
+#define CVS_OPENDIR vms_opendir
+#define CVS_READDIR vms_readdir
+#define CVS_CLOSEDIR vms_closedir
+
/* argv[0] in VMS is the full pathname which would look really ugly in error
messages. Even if we stripped out the directory and ".EXE;5", it would
still be misleading, as if one has used "OLDCVS :== ...CVS-JULY.EXE",
@@ -217,3 +216,5 @@ extern void fnfold (char *FILENAME);
might be worth messing with, but it also seems fine to just always call
it "cvs". */
#define ARGV0_NOT_PROGRAM_NAME
+
+#define CVS_UNLINK vms_unlink
diff --git a/gnu/usr.bin/cvs/windows-NT/config.h b/gnu/usr.bin/cvs/windows-NT/config.h
index 40f8aa56c2f..468ee024e2d 100644
--- a/gnu/usr.bin/cvs/windows-NT/config.h
+++ b/gnu/usr.bin/cvs/windows-NT/config.h
@@ -6,29 +6,14 @@
and use ../cvsnt.mak for your project. Thus, this is the right place to
put configuration information for Windows NT. */
-/* All code which #includes this file is part of CVS, so it should provide
- any CVS-specific features it can. */
-#define CVS_SUPPORT
+/* Define if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#undef _ALL_SOURCE
-/* We just want the client stuff. No server support yet.
- Note that you don't have to define CLIENT_SUPPORT or SERVER_SUPPORT
- to enable the non-remote code; that's always there. */
-#define CLIENT_SUPPORT
-
-/* Define if type char is unsigned and you are not using gcc. */
-/* We wrote a little test program whose output suggests that char is
- signed on this system. Go back and check the verdict when CVS
- is configured on floss... */
-#undef __CHAR_UNSIGNED__
-
-/* Windows NT has alloca, but calls it _alloca and says it returns
- void *. We provide our own header file. */
-#define HAVE_ALLOCA 1
-#define HAVE_ALLOCA_H 1
-#undef C_ALLOCA
-/* These shouldn't matter, but pro forma: */
-#undef CRAY_STACKSEG_END
-#undef STACK_DIRECTION
+/* Define to empty if the keyword does not work. */
+/* Const is working. */
+#undef const
/* Define to `int' if <sys/types.h> doesn't define. */
/* Windows NT doesn't have gid_t. It doesn't even really have group
@@ -49,10 +34,9 @@
I have neither the CD-ROM nor a CD-ROM drive to put it in. */
#define HAVE_UTIME_NULL 1
-/* Define as __inline if that's what the C compiler calls it. */
-/* We apparently do have inline functions. The 'inline' keyword is only
- available from C++, though. You have to use '__inline' in C code. */
-#define inline __inline
+/* On Windows NT, when a file is being watched, utime expects a file
+ to be writable */
+#define UTIME_EXPECTS_WRITABLE
/* Define if on MINIX. */
/* Hah. */
@@ -99,7 +83,6 @@
/* We don't have <sys/time.h> at all. Why isn't there a definition
for HAVE_SYS_TIME_H anywhere in config.h.in? */
#undef TIME_WITH_SYS_TIME
-#undef HAVE_SYS_TIME_H
/* Define to `int' if <sys/types.h> doesn't define. */
#define uid_t int
@@ -110,11 +93,20 @@
well. */
#undef HAVE_KERBEROS
-/* The number of bytes in a int. */
-#define SIZEOF_INT 4
+/* Define if you want CVS to be able to be a remote repository client. */
+/* We just want the client stuff. */
+#define CLIENT_SUPPORT
+
+/* Define if you want CVS to be able to serve repositories to remote
+ clients. */
+/* No server support yet. Note that you don't have to define
+ CLIENT_SUPPORT or SERVER_SUPPORT to enable the non-remote code;
+ that's always there. */
+#undef SERVER_SUPPORT
-/* The number of bytes in a long. */
-#define SIZEOF_LONG 4
+/* Define if you have the connect function. */
+/* Not used? */
+#define HAVE_CONNECT
/* Define if you have the fchdir function. */
#undef HAVE_FCHDIR
@@ -137,14 +129,23 @@
/* Define if you have the krb_get_err_text function. */
#undef HAVE_KRB_GET_ERR_TEXT
-/* Define if you have the mkfifo function. */
-#undef HAVE_MKFIFO
-
/* Define if you have the putenv function. */
#define HAVE_PUTENV 1
-/* Define if you have the setvbuf function. */
-#define HAVE_SETVBUF 1
+/* Define if you have the sigaction function. */
+#undef HAVE_SIGACTION
+
+/* Define if you have the sigblock function. */
+#undef HAVE_SIGBLOCK
+
+/* Define if you have the sigprocmask function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define if you have the sigsetmask function. */
+#undef HAVE_SIGSETMASK
+
+/* Define if you have the sigvec function. */
+#undef HAVE_SIGVEC
/* Define if you have the timezone function. */
/* Hmm, I actually rather think it's an extern long
@@ -153,12 +154,19 @@
this function in the code anyway, hmm. */
#undef HAVE_TIMEZONE
+/* Define if you have the usleep function. */
+#define HAVE_USLEEP 1
+
/* Define if you have the vfork function. */
#undef HAVE_VFORK
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
+/* Define if you have the <direct.h> header file. */
+/* Windows NT wants this for mkdir and friends. */
+#define HAVE_DIRECT_H 1
+
/* Define if you have the <dirent.h> header file. */
/* No, but we have the <direct.h> header file... */
#undef HAVE_DIRENT_H
@@ -169,6 +177,11 @@
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
+/* Define if you have the <io.h> header file. */
+/* Apparently this is where Windows NT declares all the low-level
+ Unix I/O routines like open and creat and stuff. */
+#define HAVE_IO_H 1
+
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
@@ -181,6 +194,9 @@
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
+/* Define if you have the <sys/bsdtypes.h> header file. */
+#undef HAVE_SYS_BSDTYPES_H
+
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
@@ -193,8 +209,8 @@
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
-/* Define if you have the <sys/timeb.h> header file. */
-#define HAVE_SYS_TIMEB_H 1
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -202,19 +218,16 @@
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
-/* Define if you have the <io.h> header file. */
-/* Apparently this is where Windows NT declares all the low-level
- Unix I/O routines like open and creat and stuff. */
-#define HAVE_IO_H 1
-
-/* Define if you have the <direct.h> header file. */
-/* Windows NT wants this for mkdir and friends. */
-#define HAVE_DIRECT_H 1
+/* Define if you have the inet library (-linet). */
+#undef HAVE_LIBINET
/* Define if you have the nsl library (-lnsl). */
/* This is not used anywhere in the source code. */
#undef HAVE_LIBNSL
+/* Define if you have the nsl_s library (-lnsl_s). */
+#undef HAVE_LIBNSL_S
+
/* Define if you have the socket library (-lsocket). */
/* This isn't ever used either. */
#undef HAVE_LIBSOCKET
@@ -222,6 +235,13 @@
/* Under Windows NT, mkdir only takes one argument. */
#define CVS_MKDIR wnt_mkdir
extern int wnt_mkdir (const char *PATH, int MODE);
+#define CVS_STAT wnt_stat
+extern int wnt_stat ();
+#define CVS_LSTAT wnt_lstat
+extern int wnt_lstat ();
+
+#define CVS_RENAME wnt_rename
+extern int wnt_rename (const char *, const char *);
/* This function doesn't exist under Windows NT; we
provide a stub. */
@@ -234,63 +254,30 @@ extern pid_t getpid (void);
#define USE_PROTOTYPES 1
/* This is just a call to the Win32 Sleep function. */
-unsigned sleep (unsigned);
-
-/* This is in the winsock library. */
-int __stdcall gethostname(char *name, int namelen);
+unsigned int sleep (unsigned int);
+/* So is this */
+int usleep (unsigned long);
/* Don't worry, Microsoft, it's okay for these functions to
be in our namespace. */
#define popen _popen
#define pclose _pclose
-/* Under Windows NT, filenames are case-insensitive, and both / and \
- are path component separators. */
-#define FOLD_FN_CHAR(c) (WNT_filename_classes[(unsigned char) (c)])
-extern unsigned char WNT_filename_classes[];
-
-/* Is the character C a path name separator? Under
- Windows NT, you can use either / or \. */
-#define ISDIRSEP(c) (FOLD_FN_CHAR(c) == '/')
-
-/* Like strcmp, but with the appropriate tweaks for file names.
- Under Windows NT, filenames are case-insensitive but case-preserving,
- and both \ and / are path element separators. */
-extern int fncmp (const char *n1, const char *n2);
-
-/* Fold characters in FILENAME to their canonical forms.
- If FOLD_FN_CHAR is not #defined, the system provides a default
- definition for this. */
-extern void fnfold (char *FILENAME);
-
-/* #define this if your system terminates lines in text files with
- CRLF instead of plain LF, and your I/O functions automatically
- translate between using LF in memory and CRLF on disk, unless you
- specifically tell them not to. */
-#define LINES_CRLF_TERMINATED 1
-
-/* Read data from INFILE, and copy it to OUTFILE.
- Open INFILE using INFLAGS, and OUTFILE using OUTFLAGS.
- This is useful for converting between CRLF and LF line formats. */
-extern void convert_file (char *INFILE, int INFLAGS,
- char *OUTFILE, int OUTFLAGS);
+/* When writing binary data to stdout, we better set
+ stdout to binary mode using setmode. */
+#define USE_SETMODE_STDOUT 1
-/* This is where old bits go to die under Windows NT. */
-#define DEVNULL "nul"
+/* Diff also has an ifdef for setmode, and it is HAVE_SETMODE. */
+#define HAVE_SETMODE 1
-/* Comment markers for some Windows NT-specific file types. */
-#define SYSTEM_COMMENT_TABLE \
- "mak", "# ", /* makefile */ \
- "rc", " * ", /* MS Windows resource file */ \
- "dlg", " * ", /* MS Windows dialog file */ \
- "frm", "' ", /* Visual Basic form */ \
- "bas", "' ", /* Visual Basic code */
+/* Diff needs us to define this. I think it could always be
+ -1 for CVS, because we pass temporary files to diff, but
+ config.h seems like the easiest place to put this, so for
+ now we put it here. */
+#define same_file(s,t) (-1)
-/* Make sure that we don't try to perform operations on RCS files on the
- local machine. I think I neglected to apply some changes from
- MHI's port in that area of code, or found some issues I didn't want
- to deal with. */
-#define CLIENT_ONLY
+/* This is where old bits go to die under Windows NT. */
+#define DEVNULL "nul"
/* Don't use an rsh subprocess to connect to the server, because
the rsh does inappropriate translations on the data (CR-LF/LF). */
@@ -303,3 +290,45 @@ extern void wnt_start_server (int *tofd, int *fromfd,
extern void wnt_shutdown_server (int fd);
#define START_SERVER wnt_start_server
#define SHUTDOWN_SERVER wnt_shutdown_server
+
+#define SYSTEM_INITIALIZE(pargc,pargv) init_winsock()
+extern void init_winsock();
+#define SYSTEM_CLEANUP() wnt_cleanup()
+extern void wnt_cleanup (void);
+
+#define HAVE_WINSOCK_H
+
+/* This tells the client that it must use send()/recv() to talk to the
+ server if it is connected to the server via a socket; Win95 needs
+ it because _open_osfhandle doesn't work. */
+#define NO_SOCKET_TO_FD 1
+
+/* This tells the client that, in addition to needing to use
+ send()/recv() to do socket I/O, the error codes for send()/recv()
+ and other socket operations are not available through errno.
+ Instead, this macro should be used to obtain an error code. */
+#define SOCK_ERRNO (WSAGetLastError ())
+
+/* This tells the client that, in addition to needing to use
+ send()/recv() to do socket I/O, the error codes for send()/recv()
+ and other socket operations are not known to strerror. Instead,
+ this macro should be used to convert the error codes to strings. */
+#define SOCK_STRERROR sock_strerror
+extern char *sock_strerror (int errnum);
+
+/* The internal rsh client uses sockets not file descriptors. Note
+ that as the code stands now, it often takes values from a SOCKET and
+ puts them in an int. This is ugly but it seems like sizeof
+ (SOCKET) <= sizeof (int) on win32, even the 64-bit variants. */
+#define START_SERVER_RETURNS_SOCKET 1
+
+/* Is this true on NT? Seems like I remember reports that NT 3.51 has
+ problems with 200K writes (of course, the issue of large writes is
+ moot since the use of buffer.c ensures that writes will only be as big
+ as the buffers). */
+#define SEND_NEVER_PARTIAL 1
+
+/* Force lib/regex.c to use malloc instead of messing around with alloca
+ and define the old re_comp routines that we use. */
+#define REGEX_MALLOC 1
+#define _REGEX_RE_COMP 1