Update of /project/elephant/cvsroot/elephant/src/memutil In directory clnet:/tmp/cvs-serv30477
Modified Files: libmemutil.c Log Message: Fixes for type and fname conflicts
--- /project/elephant/cvsroot/elephant/src/memutil/libmemutil.c 2007/02/01 04:03:27 1.3 +++ /project/elephant/cvsroot/elephant/src/memutil/libmemutil.c 2007/03/07 22:01:01 1.4 @@ -82,22 +82,22 @@ -------------------------------------------------------------------------------- */
-#define reader_and_writer( DATATYPE ) \ -DATATYPE read_##DATATYPE (char *buf, int offset) { \ +#define reader_and_writer( FNAME, DATATYPE ) \ +DATATYPE read_##FNAME (char *buf, int offset) { \ DATATYPE i; \ memcpy(&i, buf+offset, sizeof( DATATYPE )); \ return i; \ } \ -void write_##DATATYPE (char *buf, DATATYPE num, int offset) { \ +void write_##FNAME (char *buf, DATATYPE num, int offset) { \ memcpy(buf+offset, &num, sizeof( DATATYPE )); \ }
-reader_and_writer(int32_t) -reader_and_writer(uint32_t) -reader_and_writer(int64_t) -reader_and_writer(uint64_t) -reader_and_writer(float) -reader_and_writer(double) +reader_and_writer(int32,int32_t) +reader_and_writer(uint32,uint32_t) +reader_and_writer(int64,int64_t) +reader_and_writer(uint64,uint64_t) +reader_and_writer(float,float) +reader_and_writer(double,double)
char *offset_charp(char *p, int offset) { return p + offset;