From 2d6bc153689f14f8690878b15d9fb711a56b0546 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 1 Mar 2011 00:11:01 +0000 Subject: [PATCH] volser: Rename putshort and putint32 dumpstuff.c defines macros for putshort and putint32. However, the name 'putshort' conflicts with a macro defined on Linux in resolv.h (which is included by roken.h) Just rename putshort to afs_putshort and putint32 to afs_putint32 to solve this problem Change-Id: Ib58cb7d8e606199c3f6a88be68e81f36c17d2df4 Reviewed-on: http://gerrit.openafs.org/4097 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/volser/dumpstuff.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c index 216594044..855debb35 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -542,8 +542,8 @@ DumpByte(struct iod *iodp, char tag, byte value) return ((iod_Write(iodp, tbuffer, 2) == 2) ? 0 : VOLSERDUMPERROR); } -#define putint32(p, v) *p++ = v>>24, *p++ = v>>16, *p++ = v>>8, *p++ = v -#define putshort(p, v) *p++ = v>>8, *p++ = v +#define afs_putint32(p, v) *p++ = v>>24, *p++ = v>>16, *p++ = v>>8, *p++ = v +#define afs_putshort(p, v) *p++ = v>>8, *p++ = v static int DumpDouble(struct iod *iodp, char tag, afs_uint32 value1, @@ -552,8 +552,8 @@ DumpDouble(struct iod *iodp, char tag, afs_uint32 value1, char tbuffer[9]; byte *p = (unsigned char *)tbuffer; *p++ = tag; - putint32(p, value1); - putint32(p, value2); + afs_putint32(p, value1); + afs_putint32(p, value2); return ((iod_Write(iodp, tbuffer, 9) == 9) ? 0 : VOLSERDUMPERROR); } @@ -563,7 +563,7 @@ DumpInt32(struct iod *iodp, char tag, afs_uint32 value) char tbuffer[5]; byte *p = (unsigned char *)tbuffer; *p++ = tag; - putint32(p, value); + afs_putint32(p, value); return ((iod_Write(iodp, tbuffer, 5) == 5) ? 0 : VOLSERDUMPERROR); } @@ -576,7 +576,7 @@ DumpArrayInt32(struct iod *iodp, char tag, int code = 0; byte *p = (unsigned char *)tbuffer; *p++ = tag; - putshort(p, nelem); + afs_putshort(p, nelem); code = iod_Write(iodp, tbuffer, 3); if (code != 3) return VOLSERDUMPERROR; @@ -584,7 +584,7 @@ DumpArrayInt32(struct iod *iodp, char tag, p = (unsigned char *)tbuffer; v = *array++; /*this was register */ - putint32(p, v); + afs_putint32(p, v); code = iod_Write(iodp, tbuffer, 4); if (code != 4) return VOLSERDUMPERROR; -- 2.39.5