]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-solaris-uniqtime32-20051223
authorChas Williams <chas@cmf.nrl.navy.mil>
Sat, 24 Dec 2005 01:09:52 +0000 (01:09 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 24 Dec 2005 01:09:52 +0000 (01:09 +0000)
FIXES 24445

afs really wants the 32 bit timeval/uniqtime stuff

(cherry picked from commit 5a238125533fc826e3e39250fbc02e59bf352ec4)

src/afs/afs_osi.h
src/config/param.sun4x_510.h
src/config/param.sun4x_57.h
src/config/param.sun4x_58.h
src/config/param.sun4x_59.h
src/config/param.sunx86_510.h
src/config/param.sunx86_57.h
src/config/param.sunx86_58.h
src/config/param.sunx86_59.h
src/rx/rx_clock.h
src/util/uuid.c

index af2c03d0105db2661ff1e34403eed28b9094695a..c8228f12f33bec93fcaa3894317039ba8c869f5a 100644 (file)
@@ -188,12 +188,13 @@ extern struct vnodeops *afs_ops;
   * In 64 bit HP-UX the timeval structure has a 64 bit member.
   */
 
-
-#if defined(AFS_HPUX_ENV) || (defined(AFS_SUN57_ENV) && !defined(AFS_SUN510_ENV)) || defined(AFS_LINUX_64BIT_KERNEL) || (defined(AFS_SGI61_ENV) && defined(KERNEL) && defined(_K64U64))
+#if defined(AFS_HPUX_ENV) || defined(AFS_LINUX_64BIT_KERNEL) || (defined(AFS_SGI61_ENV) && defined(KERNEL) && defined(_K64U64))
 typedef struct {
     afs_int32 tv_sec;
     afs_int32 tv_usec;
 } osi_timeval_t;
+#elif defined(AFS_SUN57_ENV)
+typedef struct timeval32 osi_timeval_t;
 #else
 typedef struct timeval osi_timeval_t;
 #endif /* AFS_SGI61_ENV */
index f21d2fe70affa15376d9f3412641312b19ba3ca2..8a78eeb119664e0fc7fdacf28e1c05bced8c2a2f 100644 (file)
@@ -81,7 +81,7 @@
 #define        AFS_UIOUSER             UIO_USERSPACE
 #define        AFS_CLBYTES             MCLBYTES
 #define        AFS_MINCHANGE           2
-#define        osi_GetTime(x)          uniqtime(x)
+#define        osi_GetTime(x)          uniqtime32(x)
 
 /**
   * These defines are for the 64 bit Solaris 7 port
 #define AFS_64BIT_INO          1
 #endif
 
-/**
-  * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-  * use 32 bit quantities for time in afs, we now use uniqtime32
-  */
-#if defined(AFS_SUN57_64BIT_ENV)
-#undef osi_GetTime
-#define osi_GetTime(x)         uniqtime32(x)
-#endif
-
-
-
 #define        AFS_KALLOC(n)           kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
 #define        AFS_KFREE               kmem_free
index ef65da55bd56f7f5616736d6767b84952a5008c4..11c2e207d8f053801387625269a923d8d9961f63 100644 (file)
@@ -82,7 +82,7 @@
 #define        AFS_UIOUSER     UIO_USERSPACE
 #define        AFS_CLBYTES     MCLBYTES
 #define        AFS_MINCHANGE   2
-#define        osi_GetTime(x)  uniqtime(x)
+#define        osi_GetTime(x)  uniqtime32(x)
 
 /**
   * These defines are for the 64 bit Solaris 7 port
 #define AFS_64BIT_INO          1
 #endif
 
-/**
-  * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-  * use 32 bit quantities for time in afs, we now use uniqtime32
-  */
-#if defined(AFS_SUN57_64BIT_ENV)
-#undef osi_GetTime
-#define osi_GetTime(x)  uniqtime32(x)
-#endif
-
-
-
 #define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
 #define        AFS_KFREE       kmem_free
index 03a002412a7e865b781524c9eae97f67c3083fdb..f205a528642548d77697deba36f0e73013850bb0 100644 (file)
@@ -79,7 +79,7 @@
 #define        AFS_UIOUSER     UIO_USERSPACE
 #define        AFS_CLBYTES     MCLBYTES
 #define        AFS_MINCHANGE   2
-#define        osi_GetTime(x)  uniqtime(x)
+#define        osi_GetTime(x)  uniqtime32(x)
 
 /**
   * These defines are for the 64 bit Solaris 7 port
 #define AFS_64BIT_INO          1
 #endif
 
-/**
-  * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-  * use 32 bit quantities for time in afs, we now use uniqtime32
-  */
-#if defined(AFS_SUN57_64BIT_ENV)
-#undef osi_GetTime
-#define osi_GetTime(x)  uniqtime32(x)
-#endif
-
-
-
 #define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
 #define        AFS_KFREE       kmem_free
index ba57e2a61e69d578cf89ad55fe044fe9ca8e4ffd..fed11bc928de2828e74a792f227ff3e6dd5f2ffe 100644 (file)
@@ -80,7 +80,7 @@
 #define        AFS_UIOUSER     UIO_USERSPACE
 #define        AFS_CLBYTES     MCLBYTES
 #define        AFS_MINCHANGE   2
-#define        osi_GetTime(x)  uniqtime(x)
+#define        osi_GetTime(x)  uniqtime32(x)
 
 /**
   * These defines are for the 64 bit Solaris 7 port
 #define AFS_64BIT_INO          1
 #endif
 
-/**
-  * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-  * use 32 bit quantities for time in afs, we now use uniqtime32
-  */
-#if defined(AFS_SUN57_64BIT_ENV)
-#undef osi_GetTime
-#define osi_GetTime(x)  uniqtime32(x)
-#endif
-
-
-
 #define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
 #define        AFS_KFREE       kmem_free
index e028f055f0bf0c49ef42827eaaadba85c241b44d..a2ddf196c2c541588530f1683c874e57a307ae22 100644 (file)
@@ -91,7 +91,7 @@
 #define        AFS_UIOUSER             UIO_USERSPACE
 #define        AFS_CLBYTES             MCLBYTES
 #define        AFS_MINCHANGE           2
-#define        osi_GetTime(x)          uniqtime(x)
+#define        osi_GetTime(x)          uniqtime32(x)
 
 /**
   * These defines are for the 64 bit Solaris 7 port
 #define AFS_64BIT_INO          1
 #endif
 
-/**
-  * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-  * use 32 bit quantities for time in afs, we now use uniqtime32
-  */
-#if defined(AFS_SUN57_64BIT_ENV)
-#undef osi_GetTime
-#define osi_GetTime(x)         uniqtime32(x)
-#endif
-
-
-
 #define        AFS_KALLOC(n)           kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
 #define        AFS_KFREE               kmem_free
index 7597cfe36a0032e39f4728a10b3326484b6d249b..809613ef05033d5843cca582af2ceaf4a4556f17 100644 (file)
@@ -85,7 +85,7 @@
 #define        AFS_UIOUSER     UIO_USERSPACE
 #define        AFS_CLBYTES     MCLBYTES
 #define        AFS_MINCHANGE   2
-#define        osi_GetTime(x)  uniqtime(x)
+#define        osi_GetTime(x)  uniqtime32(x)
 
 #define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
index 8850aef33b4b1c7013dcc20e454c61984f94c819..dd59bf325b726ffa25ac9e00162b44a635ef8490 100644 (file)
@@ -90,7 +90,7 @@
 #define        AFS_UIOUSER     UIO_USERSPACE
 #define        AFS_CLBYTES     MCLBYTES
 #define        AFS_MINCHANGE   2
-#define        osi_GetTime(x)  uniqtime(x)
+#define        osi_GetTime(x)  uniqtime32(x)
 
 #define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
index d3d37dea1a8c26966ffa92b5675107c1ab57876c..a21ae17c77e8d9b44faae91ad74028cbca647b1d 100644 (file)
@@ -91,7 +91,7 @@
 #define        AFS_UIOUSER     UIO_USERSPACE
 #define        AFS_CLBYTES     MCLBYTES
 #define        AFS_MINCHANGE   2
-#define        osi_GetTime(x)  uniqtime(x)
+#define        osi_GetTime(x)  uniqtime32(x)
 
 #define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
 #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
index 01d1c54ed17637b085bddece4aa9cc9d97ff9c05..9600e71bb54c71a1b66e772c66db040f89ec852a 100644 (file)
@@ -99,7 +99,7 @@ extern int clock_nUpdates;
        (cv)->usec = (afs_int32)tv.tv_usec;             \
     END
 #else /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
-#define clock_GetTime(cv) osi_GetTime((struct timeval *)cv)
+#define clock_GetTime(cv) osi_GetTime((osi_timeval_t *)(cv))
 #endif /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
 #endif
 #define clock_Sec() osi_Time()
index afc8b7a463f130deab4ab3c5c55957aa19012f10..593a79a37cb3480b690a19771a20f9cd34bdc5aa 100644 (file)
@@ -418,7 +418,7 @@ uuid_get_address(uuid_address_p_t addr)
 void
 uuid__get_os_time(uuid_time_t * os_time)
 {
-    struct timeval tp;
+    osi_timeval_t tp;
 
     osi_GetTime(&tp);
     os_time->hi = tp.tv_sec;