From 69d535771f0b92e1068cd862e283b01cb97ee219 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 17 Mar 2009 15:10:55 +0000 Subject: [PATCH] DEVEL15-prototyping-fallout-20090317 LICENSE IPL10 clean up to make prototyping code build everywhere (cherry picked from commit 57326151f50270695c572afa06c1d4b4b5df40b0) --- src/config/stds.h | 7 +++++-- src/rx/rx_kcommon.h | 3 +++ src/vol/fssync-debug.c | 2 +- src/vol/fssync-server.c | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/config/stds.h b/src/config/stds.h index d03171f..dc2c70a 100644 --- a/src/config/stds.h +++ b/src/config/stds.h @@ -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 */ diff --git a/src/rx/rx_kcommon.h b/src/rx/rx_kcommon.h index e025240..13bf639 100644 --- a/src/rx/rx_kcommon.h +++ b/src/rx/rx_kcommon.h @@ -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" diff --git a/src/vol/fssync-debug.c b/src/vol/fssync-debug.c index a098e44..4a5fe48 100644 --- a/src/vol/fssync-debug.c +++ b/src/vol/fssync-debug.c @@ -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"); diff --git a/src/vol/fssync-server.c b/src/vol/fssync-server.c index 0b51650..2adf165 100644 --- a/src/vol/fssync-server.c +++ b/src/vol/fssync-server.c @@ -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) -- 1.9.4