Renamed a file since the Mac can't have two files with the same name
authorKeith Vetter <keithv@fusion.com>
Fri, 8 Sep 1995 03:07:52 +0000 (03:07 +0000)
committerKeith Vetter <keithv@fusion.com>
Fri, 8 Sep 1995 03:07:52 +0000 (03:07 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6739 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/os/.Sanitize
src/lib/crypto/os/ChangeLog
src/lib/crypto/os/Makefile.in
src/lib/crypto/os/c_localaddr.c [moved from src/lib/crypto/os/localaddr.c with 99% similarity]
src/lib/crypto/os/ustime.c

index c370bea610481324c558de55c25b5d79278f7c56..2b57a450d055b483868c307cdd81fadd895d718f 100644 (file)
@@ -28,7 +28,7 @@ ChangeLog
 Makefile.in
 configure
 configure.in
-localaddr.c
+c_localaddr.c
 rnd_confoun.c
 ustime.c
 
index 63aa521cda79aac0559807f2f409ef9a3ac75527..15e41280594034cc1508eabc032e77604c052049 100644 (file)
@@ -1,3 +1,9 @@
+Thu Sep  7 12:00:00 1995  James Mattly <mattly@fusion.com>
+
+       * 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  <tytso@dcl>
 
        * .Sanitize: Update file list
index dc7cb3bf98c348cafb6b2a4a09dbe4f609fc6d49..5b8894f7460d22d13559ee15ee2ce61e32c2a59e 100644 (file)
@@ -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)
 
similarity index 99%
rename from src/lib/crypto/os/localaddr.c
rename to src/lib/crypto/os/c_localaddr.c
index 7ab153a8a79fb120febb4573fb2ea431b29adc06..be8a98b8c38e83b2a1a7bf83ad61c3cbd624d28b 100644 (file)
@@ -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.
index 7f05244ffd3a6a2cf24266d747d3e9e499da3f7e..0cd3844efda1ffd4110d75275dc5f3e30442b153 100644 (file)
@@ -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.  */
 
 /*
   *******************************/
 
 /* 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;
 }