From: Keith Vetter Date: Fri, 8 Sep 1995 03:07:52 +0000 (+0000) Subject: Renamed a file since the Mac can't have two files with the same name X-Git-Tag: krb5-1.0-beta6~1122 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8852402f26ca4132790be075e71675787202f774;p=krb5.git Renamed a file since the Mac can't have two files with the same name git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6739 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/os/.Sanitize b/src/lib/crypto/os/.Sanitize index c370bea61..2b57a450d 100644 --- a/src/lib/crypto/os/.Sanitize +++ b/src/lib/crypto/os/.Sanitize @@ -28,7 +28,7 @@ ChangeLog Makefile.in configure configure.in -localaddr.c +c_localaddr.c rnd_confoun.c ustime.c diff --git a/src/lib/crypto/os/ChangeLog b/src/lib/crypto/os/ChangeLog index 63aa521cd..15e412805 100644 --- a/src/lib/crypto/os/ChangeLog +++ b/src/lib/crypto/os/ChangeLog @@ -1,3 +1,9 @@ +Thu Sep 7 12:00:00 1995 James Mattly + + * Renamed localaddr.c to c_localaddr.c because Mac can't have + two files with the same name. + * Makefile.in, .Sanitize updated for the above change. + Thu Aug 24 18:40:48 1995 Theodore Y. Ts'o * .Sanitize: Update file list diff --git a/src/lib/crypto/os/Makefile.in b/src/lib/crypto/os/Makefile.in index dc7cb3bf9..5b8894f74 100644 --- a/src/lib/crypto/os/Makefile.in +++ b/src/lib/crypto/os/Makefile.in @@ -10,9 +10,9 @@ LIBOBJS = @LIBOBJS@ $(CC) $(CFLAGS) -c $(srcdir)/$*.c @SHARED_RULE@ -OBJS= rnd_confoun.$(OBJEXT) localaddr.$(OBJEXT) ustime.$(OBJEXT) $(LIBOBJS) +OBJS= rnd_confoun.$(OBJEXT) c_localaddr.$(OBJEXT) ustime.$(OBJEXT) $(LIBOBJS) -SRCS= rnd_confoun.c localaddr.c ustime.c +SRCS= rnd_confoun.c c_localaddr.c ustime.c all:: all-$(WHAT) diff --git a/src/lib/crypto/os/localaddr.c b/src/lib/crypto/os/c_localaddr.c similarity index 99% rename from src/lib/crypto/os/localaddr.c rename to src/lib/crypto/os/c_localaddr.c index 7ab153a8a..be8a98b8c 100644 --- a/src/lib/crypto/os/localaddr.c +++ b/src/lib/crypto/os/c_localaddr.c @@ -1,5 +1,5 @@ /* - * lib/crypto/os/localaddr.c + * lib/crypto/os/c_localaddr.c * * Copyright 1990,1991 by the Massachusetts Institute of Technology. * All Rights Reserved. diff --git a/src/lib/crypto/os/ustime.c b/src/lib/crypto/os/ustime.c index 7f05244ff..0cd3844ef 100644 --- a/src/lib/crypto/os/ustime.c +++ b/src/lib/crypto/os/ustime.c @@ -27,7 +27,7 @@ #define NEED_SOCKETS #include "k5-int.h" -#ifdef HAVE_MACSOCK_H +#ifdef _MACINTOSH /* We're a Macintosh -- do Mac time things. */ /* @@ -65,17 +65,16 @@ *******************************/ /* returns the offset in hours between the mac local time and the GMT */ - -static -unsigned krb5_int32 +/* unsigned krb5_int32 */ +krb5_int32 getTimeZoneOffset() { MachineLocation macLocation; long gmtDelta; - macLocation.gmtFlags.gmtDelta=0L; + macLocation.u.gmtDelta=0L; ReadLocation(&macLocation); - gmtDelta=macLocation.gmtFlags.gmtDelta & 0x00FFFFFF; + gmtDelta=macLocation.u.gmtDelta & 0x00FFFFFF; if (BitTst((void *)&gmtDelta,23L)) gmtDelta |= 0xFF000000; gmtDelta /= 3600L; return(gmtDelta); @@ -91,8 +90,12 @@ krb5_crypto_us_timeofday(seconds, microseconds) { krb5_int32 sec, usec; time_t the_time; - - GetDateTime (&the_time); + struct tm *gtime, *ltime; + +// GetDateTime (&the_time); + time(&the_time); +// gtime = gmtime(&the_time); +// ltime = localtime(&the_time); sec = the_time - ((66 * 365 * 24 * 60 * 60) + (17 * 24 * 60 * 60) + @@ -112,6 +115,7 @@ krb5_crypto_us_timeofday(seconds, microseconds) *seconds = sec; *microseconds = usec; + return 0; }