summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorKeith Vetter <keithv@fusion.com>1995-09-08 03:07:52 +0000
committerKeith Vetter <keithv@fusion.com>1995-09-08 03:07:52 +0000
commit8852402f26ca4132790be075e71675787202f774 (patch)
treea5e5c01c3ac52a4d6320baabd2b18503d903ea96 /src/lib
parente8978e6bd4ad986f0f67887d61436774a6adea75 (diff)
downloadkrb5-8852402f26ca4132790be075e71675787202f774.tar.gz
krb5-8852402f26ca4132790be075e71675787202f774.tar.xz
krb5-8852402f26ca4132790be075e71675787202f774.zip
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
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypto/os/.Sanitize2
-rw-r--r--src/lib/crypto/os/ChangeLog6
-rw-r--r--src/lib/crypto/os/Makefile.in4
-rw-r--r--src/lib/crypto/os/c_localaddr.c (renamed from src/lib/crypto/os/localaddr.c)2
-rw-r--r--src/lib/crypto/os/ustime.c20
5 files changed, 22 insertions, 12 deletions
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 <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
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
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;
}