From 008eb3c011d58375180f150b1591a0c0c4d07a24 Mon Sep 17 00:00:00 2001 From: Chaz Chandler Date: Thu, 28 Jan 2010 23:59:12 -0500 Subject: [PATCH] further irix updates updating for non-c99 and for no vprintf in the irix kernel Change-Id: Id7239dae35ff195007c615319522827d06395f8f Reviewed-on: http://gerrit.openafs.org/1178 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/afs/afs_dcache.c | 26 ++++++++++++++++++++++++++ src/afs/afs_fetchstore.c | 20 ++++++++++++++++++++ src/rx/rx_prototypes.h | 2 +- 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 32a4da09f..ff1836700 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -100,6 +100,18 @@ afs_int32 afs_dcentries; /*!< In-memory dcache entries */ int dcacheDisabled = 0; struct afs_cacheOps afs_UfsCacheOps = { +#if defined(AFS_SGI_ENV) && !defined(__c99) + osi_UFSOpen, + osi_UFSTruncate, + afs_osi_Read, + afs_osi_Write, + osi_UFSClose, + afs_UFSRead, + afs_UFSWrite, + afs_UFSGetDSlot, + afs_UFSGetVolSlot, + afs_UFSHandleLink, +#else .open = osi_UFSOpen, .truncate = osi_UFSTruncate, .fread = afs_osi_Read, @@ -110,9 +122,22 @@ struct afs_cacheOps afs_UfsCacheOps = { .GetDSlot = afs_UFSGetDSlot, .GetVolSlot = afs_UFSGetVolSlot, .HandleLink = afs_UFSHandleLink, +#endif }; struct afs_cacheOps afs_MemCacheOps = { +#if (defined(AFS_SGI_ENV) && !defined(__c99)) + afs_MemCacheOpen, + afs_MemCacheTruncate, + afs_MemReadBlk, + afs_MemWriteBlk, + afs_MemCacheClose, + afs_MemRead, + afs_MemWrite, + afs_MemGetDSlot, + afs_MemGetVolSlot, + afs_MemHandleLink, +#else .open = afs_MemCacheOpen, .truncate = afs_MemCacheTruncate, .fread = afs_MemReadBlk, @@ -123,6 +148,7 @@ struct afs_cacheOps afs_MemCacheOps = { .GetDSlot = afs_MemGetDSlot, .GetVolSlot = afs_MemGetVolSlot, .HandleLink = afs_MemHandleLink, +#endif }; int cacheDiskType; /*Type of backing disk for cache */ diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index c17a43484..ee252f128 100644 --- a/src/afs/afs_fetchstore.c +++ b/src/afs/afs_fetchstore.c @@ -266,6 +266,15 @@ rxfs_storeDestroy(void **r, afs_int32 error) static struct storeOps rxfs_storeUfsOps = { +#if (defined(AFS_SGI_ENV) && !defined(__c99)) + rxfs_storeUfsPrepare, + rxfs_storeUfsRead, + rxfs_storeUfsWrite, + rxfs_storeStatus, + rxfs_storePadd, + rxfs_storeClose, + rxfs_storeDestroy +#else .prepare = rxfs_storeUfsPrepare, .read = rxfs_storeUfsRead, .write = rxfs_storeUfsWrite, @@ -276,10 +285,20 @@ struct storeOps rxfs_storeUfsOps = { #ifdef AFS_LINUX26_ENV .storeproc = afs_linux_storeproc #endif +#endif }; static struct storeOps rxfs_storeMemOps = { +#if (defined(AFS_SGI_ENV) && !defined(__c99)) + rxfs_storeMemPrepare, + rxfs_storeMemRead, + rxfs_storeMemWrite, + rxfs_storeStatus, + rxfs_storePadd, + rxfs_storeClose, + rxfs_storeDestroy +#else .prepare = rxfs_storeMemPrepare, .read = rxfs_storeMemRead, .write = rxfs_storeMemWrite, @@ -287,6 +306,7 @@ struct storeOps rxfs_storeMemOps = { .padd = rxfs_storePadd, .close = rxfs_storeClose, .destroy = rxfs_storeDestroy +#endif }; afs_int32 diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 67f3c021f..c0a45390e 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -373,7 +373,7 @@ extern osi_socket rxi_GetHostUDPSocket(u_int host, u_short port); # undef osi_Assert # define osi_Assert(expr) \ do { if (!(expr)) { osi_AssertFailK(#expr, __FILE__, __LINE__); BUG(); } } while (0) -# elif defined(AFS_AIX_ENV) && !defined(AFS_AIX61_ENV) +# elif (defined(AFS_AIX_ENV) && !defined(AFS_AIX61_ENV)) || defined(AFS_SGI_ENV) extern void osi_Panic(char *fmt, void *a1, void *a2, void *a3); # elif defined(AFS_AIX61_ENV) /* No prototype. Deliberate, since there's no vprintf et al */ -- 2.39.5