diff --git a/NTMakefile b/NTMakefile index 9222668ed0..10b5544d15 100644 --- a/NTMakefile +++ b/NTMakefile @@ -110,7 +110,7 @@ pthread: hcrypto_headers $(NTMAKE) $(CD) ..\..\.. -util: procmgmt_headers afsreg_headers lwp_headers rx_headers pthread +util: procmgmt_headers afsreg_headers lwp_headers rx_headers hcrypto @echo ***** $@ $(DOCD) $(SRC)\$@ $(CD) $(SRC)\$@ @@ -173,14 +173,14 @@ hcrypto: roken $(NTMAKE) $(CD) ..\..\.. -roken: rxgen +roken: pthread @echo ***** $@ $(DOCD) $(SRC)\roken $(CD) $(SRC)\roken $(NTMAKE) $(CD) ..\.. -rx: hcrypto +rx: rxgen @echo ***** $@ $(DOCD) $(SRC)\$@ $(CD) $(SRC)\$@ diff --git a/acinclude.m4 b/acinclude.m4 index 84669f069c..f896bd46b9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1370,7 +1370,6 @@ AC_CHECK_FUNCS([ \ chown \ fchown \ gethostname \ - gettimeofday \ lstat \ inet_aton \ inet_ntop \ @@ -1407,6 +1406,7 @@ AC_REPLACE_FUNCS([ \ getdtablesize \ getopt \ getprogname \ + gettimeofday \ localtime_r \ mkstemp \ strcasecmp \ diff --git a/src/WINNT/bosctlsvc/NTMakefile b/src/WINNT/bosctlsvc/NTMakefile index 2e4f4a0af7..397575e379 100644 --- a/src/WINNT/bosctlsvc/NTMakefile +++ b/src/WINNT/bosctlsvc/NTMakefile @@ -23,7 +23,8 @@ EXELIBS =\ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ - $(DESTDIR)\lib\afsicf.obj + $(DESTDIR)\lib\afsroken.lib \ + $(DESTDIR)\lib\afsicf.obj EXESDKLIBS=\ ole32.lib \ diff --git a/src/WINNT/client_exp/NTMakefile b/src/WINNT/client_exp/NTMakefile index ba62a6a73f..7b997924f3 100644 --- a/src/WINNT/client_exp/NTMakefile +++ b/src/WINNT/client_exp/NTMakefile @@ -70,7 +70,8 @@ DLLLIBS =\ $(DESTDIR)\lib\libosi.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\TaLocaleU.lib \ - $(DESTDIR)\lib\afs\afsutil.lib + $(DESTDIR)\lib\afs\afsutil.lib \ + $(DESTDIR)\lib\afsroken.lib $(DLLFILE): $(DLLOBJS) $(DLLLIBS) $(DLLCONLINK) /DEF:afs_shl_ext.def $(DLLSDKLIBS) diff --git a/src/comerr/NTMakefile b/src/comerr/NTMakefile index 331f287a90..7301cc23e6 100644 --- a/src/comerr/NTMakefile +++ b/src/comerr/NTMakefile @@ -60,7 +60,8 @@ $(COMPILE_ET_EXEOBJS): $$(@B).c $(C2OBJ) $** COMPILE_ET_EXELIBS =\ - $(DESTDIR)\lib\afs\afsutil.lib + $(DESTDIR)\lib\afs\afsutil.lib \ + $(DESTDIR)\lib\afsroken.lib $(COMPILE_ET_EXEFILE): $(COMPILE_ET_EXEOBJS) $(COMPILE_ET_EXERES) $(COMPILE_ET_EXELIBS) $(EXECONLINK) diff --git a/src/comerr/error_table_nt.c b/src/comerr/error_table_nt.c index 5a1690aede..822df2f95e 100755 --- a/src/comerr/error_table_nt.c +++ b/src/comerr/error_table_nt.c @@ -15,6 +15,7 @@ #include #include +#include /* diff --git a/src/config/NTMakefile.amd64_w2k b/src/config/NTMakefile.amd64_w2k index bc54f0cf1f..6bf9e24054 100644 --- a/src/config/NTMakefile.amd64_w2k +++ b/src/config/NTMakefile.amd64_w2k @@ -70,8 +70,6 @@ AFSDEV_BUILDTYPE = NONE !ENDIF INCLUDE = $(AFSDEV_INCLUDE) -PATH = $(AFSDEV_BIN);$(PATH) - !IFNDEF AFSDEV_LIB !ERROR Must define AFSDEV_LIB to be the default library directories. !ENDIF @@ -192,6 +190,8 @@ OUT=$(OJT)\$(RELDIR) APPVER=5.02 !ENDIF +PATH = $(AFSDEV_BIN);$(DESTDIR)\lib;$(PATH) + !INCLUDE # Extend and/or supplement definitions in WIN32.MAK. diff --git a/src/config/NTMakefile.i386_nt40 b/src/config/NTMakefile.i386_nt40 index 9fe2f3b3e6..63a84130c9 100644 --- a/src/config/NTMakefile.i386_nt40 +++ b/src/config/NTMakefile.i386_nt40 @@ -70,8 +70,6 @@ AFSDEV_BUILDTYPE = NONE !ENDIF INCLUDE = $(AFSDEV_INCLUDE) -PATH = $(AFSDEV_BIN);$(PATH) - !IFNDEF AFSDEV_LIB !ERROR Must define AFSDEV_LIB to be the default library directories. !ENDIF @@ -196,7 +194,7 @@ OUT=$(OJT)\$(RELDIR) APPVER=5.0 !ENDIF - +PATH = $(AFSDEV_BIN);$(DESTDIR)\lib;$(PATH) !INCLUDE diff --git a/src/config/NTMakefile.i386_w2k b/src/config/NTMakefile.i386_w2k index a6283fe1b2..16efeca80a 100644 --- a/src/config/NTMakefile.i386_w2k +++ b/src/config/NTMakefile.i386_w2k @@ -74,8 +74,6 @@ AFSDEV_BUILDTYPE = NONE !ENDIF INCLUDE = $(AFSDEV_INCLUDE) -PATH = $(AFSDEV_BIN);$(PATH) - !IFNDEF AFSDEV_LIB !ERROR Must define AFSDEV_LIB to be the default library directories. !ENDIF @@ -200,7 +198,7 @@ OUT=$(OJT)\$(RELDIR) APPVER=5.0 !ENDIF - +PATH = $(AFSDEV_BIN);$(DESTDIR)\lib;$(PATH) !INCLUDE diff --git a/src/libadmin/adminutil/NTMakefile b/src/libadmin/adminutil/NTMakefile index 64d35430e8..776d78d874 100644 --- a/src/libadmin/adminutil/NTMakefile +++ b/src/libadmin/adminutil/NTMakefile @@ -140,7 +140,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afsrpc.lib \ $(DESTDIR)\lib\afs\afsutil.lib \ $(DESTDIR)\lib\afsauthent.lib \ - $(DESTDIR)\lib\afs\afsreg.lib + $(DESTDIR)\lib\afs\afsreg.lib \ + $(DESTDIR)\lib\afsroken.lib !IF "$(CPU)" == "IA64" || "$(CPU)" == "AMD64" || "$(CPU)" == "ALPHA64" KFWLIBS = \ diff --git a/src/libadmin/bos/NTMakefile b/src/libadmin/bos/NTMakefile index 8dcf1fd21a..31dcb86fba 100644 --- a/src/libadmin/bos/NTMakefile +++ b/src/libadmin/bos/NTMakefile @@ -39,7 +39,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afs\afsvosadmin.lib \ $(DESTDIR)\lib\afsauthent.lib \ $(DESTDIR)\lib\afsrpc.lib \ - $(DESTDIR)\lib\afspthread.lib + $(DESTDIR)\lib\afspthread.lib \ + $(DESTDIR)\lib\afsroken.lib $(DLLFILE): $(DLLOBJS) $(DLLLIBS) $(DLLCONLINK) /DEF:bosadmin.def diff --git a/src/libadmin/cfg/NTMakefile b/src/libadmin/cfg/NTMakefile index 509f0fcf84..860c421255 100644 --- a/src/libadmin/cfg/NTMakefile +++ b/src/libadmin/cfg/NTMakefile @@ -56,7 +56,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afsrpc.lib \ $(DESTDIR)\lib\afsauthent.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ - $(DESTDIR)\lib\libafsconf.lib + $(DESTDIR)\lib\libafsconf.lib \ + $(DESTDIR)\lib\afsroken.lib $(DLLFILE): $(DLLOBJS) $(DLLLIBS) $(DLLCONLINK) /DEF:afscfgadmin.def shell32.lib diff --git a/src/libadmin/client/NTMakefile b/src/libadmin/client/NTMakefile index 8f51cc46d3..5fa1efa95d 100644 --- a/src/libadmin/client/NTMakefile +++ b/src/libadmin/client/NTMakefile @@ -27,7 +27,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afsauthent.lib \ $(DESTDIR)\lib\afsrpc.lib \ $(DESTDIR)\lib\afspthread.lib \ - $(DESTDIR)\lib\afs\afsutil.lib + $(DESTDIR)\lib\afs\afsutil.lib \ + $(DESTDIR)\lib\afsroken.lib $(DLLFILE): $(DLLOBJS) $(DLLLIBS) $(DLLCONLINK) /DEF:clientadmin.def diff --git a/src/libadmin/kas/NTMakefile b/src/libadmin/kas/NTMakefile index 16c5edd3ad..2c3eed909a 100644 --- a/src/libadmin/kas/NTMakefile +++ b/src/libadmin/kas/NTMakefile @@ -36,7 +36,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afsauthent.lib \ $(DESTDIR)\lib\afsrpc.lib \ $(DESTDIR)\lib\afspthread.lib \ - $(DESTDIR)\lib\afs\afsutil.lib + $(DESTDIR)\lib\afs\afsutil.lib \ + $(DESTDIR)\lib\afsroken.lib $(DLLFILE): $(DLLOBJS) $(DLLLIBS) $(DLLCONLINK) /DEF:kasadmin.def diff --git a/src/libadmin/pts/NTMakefile b/src/libadmin/pts/NTMakefile index 76627ca5e6..0a75936034 100644 --- a/src/libadmin/pts/NTMakefile +++ b/src/libadmin/pts/NTMakefile @@ -39,7 +39,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afsauthent.lib \ $(DESTDIR)\lib\afsrpc.lib \ $(DESTDIR)\lib\afspthread.lib \ - $(DESTDIR)\lib\afs\afsutil.lib + $(DESTDIR)\lib\afs\afsutil.lib \ + $(DESTDIR)\lib\afsroken.lib $(DLLFILE): $(DLLOBJS) $(DLLLIBS) $(DLLCONLINK) /DEF:ptsadmin.def diff --git a/src/libadmin/test/NTMakefile b/src/libadmin/test/NTMakefile index 85cd63240e..3b86ef902e 100644 --- a/src/libadmin/test/NTMakefile +++ b/src/libadmin/test/NTMakefile @@ -23,7 +23,8 @@ AFSCP_EXELIBS =\ $(DESTDIR)\lib\afsauthent.lib \ $(DESTDIR)\lib\afsrpc.lib \ $(DESTDIR)\lib\afs\afsutil.lib \ - $(DESTDIR)\lib\afs\afscmd.lib # static library + $(DESTDIR)\lib\afsroken.lib \ + $(DESTDIR)\lib\afs\afscmd.lib # static library AFSCP_EXEOBJS =\ $(OUT)\bos.obj \ diff --git a/src/libadmin/vos/NTMakefile b/src/libadmin/vos/NTMakefile index e893169eeb..611f72cf35 100644 --- a/src/libadmin/vos/NTMakefile +++ b/src/libadmin/vos/NTMakefile @@ -60,7 +60,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afs\afsadminutil.lib \ $(DESTDIR)\lib\afsauthent.lib \ $(DESTDIR)\lib\afsrpc.lib \ - $(DESTDIR)\lib\afs\afsutil.lib + $(DESTDIR)\lib\afs\afsutil.lib \ + $(DESTDIR)\lib\afsroken.lib $(DLLFILE): $(DLLOBJS) $(DLLLIBS) $(DLLCONLINK) /DEF:vosadmin.def diff --git a/src/roken/NTMakefile b/src/roken/NTMakefile index 9c3ba094f4..91bc1c6d74 100644 --- a/src/roken/NTMakefile +++ b/src/roken/NTMakefile @@ -35,6 +35,7 @@ ROKEN_OBJS = \ $(OUT)\flock.obj \ $(OUT)\getopt.obj \ $(OUT)\getprogname.obj \ + $(OUT)\gettimeofday.obj \ $(OUT)\hex.obj \ $(OUT)\issuid.obj \ $(OUT)\localtime_r.obj \ diff --git a/src/roken/afsroken.def b/src/roken/afsroken.def index aa7e8207ee..6c581d49c5 100644 --- a/src/roken/afsroken.def +++ b/src/roken/afsroken.def @@ -36,3 +36,4 @@ EXPORTS rk_vsnprintf @40 rk_vasnprintf @41 rk_flock @42 + rk_gettimeofday @43 diff --git a/src/roken/librokenafs.map b/src/roken/librokenafs.map index 2cf5d9ff9a..f9085fd8ca 100644 --- a/src/roken/librokenafs.map +++ b/src/roken/librokenafs.map @@ -19,6 +19,7 @@ rk_emalloc; rk_erealloc; rk_flock; + rk_gettimeofday; rk_hex_encode; rk_localtime_r; rk_mkstemp; diff --git a/src/util/afsutil.h b/src/util/afsutil.h index fe4ad9d748..45a3940523 100644 --- a/src/util/afsutil.h +++ b/src/util/afsutil.h @@ -72,13 +72,6 @@ extern void SetupLogSignals(void); extern int afs_winsockInit(void); extern void afs_winsockCleanup(void); - struct timezone { - int tz_minuteswest; /* of Greenwich */ - int tz_dsttime; /* type of dst correction to apply */ - }; -#define gettimeofday afs_gettimeofday - int afs_gettimeofday(struct timeval *tv, struct timezone *tz); - /* Unbuffer output when Un*x would do line buffering. */ #define setlinebuf(S) setvbuf(S, NULL, _IONBF, 0) diff --git a/src/util/winsock_nt.c b/src/util/winsock_nt.c index b2ea61466a..7418b7524b 100644 --- a/src/util/winsock_nt.c +++ b/src/util/winsock_nt.c @@ -12,6 +12,7 @@ #include #include +#include #ifdef AFS_NT40_ENV #include @@ -46,19 +47,10 @@ afs_winsockCleanup(void) WSACleanup(); } -/* This function will begin to fail in the year 2038 */ +/* exported from libafsauthent.dll */ int afs_gettimeofday(struct timeval *tv, struct timezone *tz) { - struct _timeb myTime; - - _ftime(&myTime); - tv->tv_sec = myTime.time; - tv->tv_usec = myTime.millitm * 1000; - if (tz) { - tz->tz_minuteswest = myTime.timezone; - tz->tz_dsttime = myTime.dstflag; - } - return 0; + return rk_gettimeofday(tv, tz); } #endif