DEVEL15-prototyping-fallout-20090317
authorDerrick Brashear <shadow@dementia.org>
Tue, 17 Mar 2009 15:10:55 +0000 (15:10 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 17 Mar 2009 15:10:55 +0000 (15:10 +0000)
LICENSE IPL10

clean up to make prototyping code build everywhere

(cherry picked from commit 57326151f50270695c572afa06c1d4b4b5df40b0)

src/config/stds.h
src/rx/rx_kcommon.h
src/vol/fssync-debug.c
src/vol/fssync-server.c

index d03171f..dc2c70a 100644 (file)
@@ -278,10 +278,13 @@ typedef struct afsUUID afsUUID;
 
 #ifdef AFS_HPUX_ENV
 #define static_inline static __inline
+#define hdr_static_inline static __inline
 #elif defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV)
 #define static_inline static
+#define hdr_static_inline
 #else
 #define static_inline static inline
+#define hdr_static_inline static inline
 #endif
 
 /* A macro that can be used when printf'ing 64 bit integers, as Unix and 
@@ -297,7 +300,7 @@ typedef struct afsUUID afsUUID;
  * printf statemements with %ld and %lu
  */
 
-static_inline long int afs_cast_int32(afs_int32 d) { return (long int) d; }
-static_inline unsigned long int afs_cast_uint32(afs_uint32 d) { return (unsigned long int) d; }
+hdr_static_inline long int afs_cast_int32(afs_int32 d) { return (long int) d; }
+hdr_static_inline unsigned long int afs_cast_uint32(afs_uint32 d) { return (unsigned long int) d; }
 
 #endif /* OPENAFS_CONFIG_AFS_STDS_H */
index e025240..13bf639 100644 (file)
@@ -139,7 +139,10 @@ typedef unsigned short etap_event_t;
 #include "afs/longc_procs.h"
 #include "afs/afs_stats.h"
 #include "h/errno.h"
+#if !(defined(AFS_SUN5_ENV) && defined(KERNEL))
+/* if sys/systm.h includes varargs.h some versions of solaris have conflicts */
 #include "stdarg.h"
+#endif
 #ifdef KERNEL
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
index a098e44..4a5fe48 100644 (file)
@@ -898,7 +898,7 @@ VolOpQuery(struct cmd_syndesc * as, void * rock)
        printf("\t\treason         = %d (%s)\n", 
               vop.com.reason, reason_code_to_string(vop.com.reason));
        printf("\t\tcommand_len    = %u\n", vop.com.command_len);
-       printf("\t\tflags          = 0x%lux\n", (afs_uint32)(vop.com.flags));
+       printf("\t\tflags          = 0x%lux\n", afs_cast_uint32(vop.com.flags));
        printf("\t}\n");
 
        printf("\tvop = {\n");
index 0b51650..2adf165 100644 (file)
@@ -577,7 +577,7 @@ FSYNC_com_VolOn(FSSYNC_VolOp_command * vcom, SYNC_response * res)
     }
 #else /* !AFS_DEMAND_ATTACH_FS */
     tvolName[0] = '/';
-    snprintf(&tvolName[1], sizeof(tvolName)-1, VFORMAT, (afs_uint32)(vcom->vop->volume));
+    snprintf(&tvolName[1], sizeof(tvolName)-1, VFORMAT, afs_cast_uint32(vcom->vop->volume));
     tvolName[sizeof(tvolName)-1] = '\0';
 
     vp = VAttachVolumeByName_r(&error, vcom->vop->partName, tvolName,
@@ -1486,7 +1486,7 @@ FSYNC_Drop(osi_socket fd)
            Volume *vp;
 
            tvolName[0] = '/';
-           sprintf(&tvolName[1], VFORMAT, (afs_uint32)(p[i].volumeID));
+           sprintf(&tvolName[1], VFORMAT, afs_cast_uint32(p[i].volumeID));
            vp = VAttachVolumeByName_r(&error, p[i].partName, tvolName,
                                       V_VOLUPD);
            if (vp)