#ifdefed Mac native microseconds code for PPC-only
authorMiro Jurisic <meeroh@mit.edu>
Wed, 9 Jun 1999 17:47:34 +0000 (17:47 +0000)
committerMiro Jurisic <meeroh@mit.edu>
Wed, 9 Jun 1999 17:47:34 +0000 (17:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11503 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/c_ustime.c

index 1771da98ff1d4bfaef473a32078d73c4961e172d..7ef108f5865639aa71a9197a835f18d03da27647 100644 (file)
@@ -1,3 +1,8 @@
+1999-06-09  Miro Jurisic  <meeroh@mit.edu>
+
+       * c_ustime.c (krb5_crypto_us_timeofday): #ifdefed microseconds on Mac to be
+               PPC-only
+
 1999-06-09  Miro Jurisic  <meeroh@mit.edu>
 
        * c_ustime.c (AbsoluteToSecsNanosecs): Fixed the UInt64 division
index 85197f1d26707715717d4106e49240eef6559ea4..9da60f3b81bb995496c6b313349f3c777ae19187 100644 (file)
@@ -41,6 +41,7 @@
  * Macintosh ooperating system interface for Kerberos.
  */
 
+#include <ConditionalMacros.h>
 #include <script.h>            /* Defines MachineLocation, used by getTimeZoneOffset */
 #include <ToolUtils.h>         /* Defines BitTst(), called by getTimeZoneOffset() */
 #include <OSUtils.h>           /* Defines GetDateTime */
@@ -109,7 +110,8 @@ krb5_crypto_us_timeofday(seconds, microseconds)
     sec = the_time - 
        ((66 * 365 * 24 * 60 * 60) + (17 *  24 * 60 * 60) + 
        (getTimeZoneOffset() * 60 * 60));
-       
+
+#ifdef TARGET_CPU_PPC                                                  /* Only PPC has accurate time */
     if (HaveAccurateTime ()) {                                 /* Does hardware support accurate time? */
     
        AbsoluteTime    absoluteTime;
@@ -120,7 +122,9 @@ krb5_crypto_us_timeofday(seconds, microseconds)
        
        usec = nanoseconds / 1000;
 
-    } else {
+    } else
+#endif /* TARGET_CPU_PPC */
+    {
            usec = 0;
 
            if (sec == last_sec) {                              /* Same as last time? */