[Spread-users] #define int16 short/int32 int

John Robinson jr at vertica.com
Thu Nov 23 00:16:42 EST 2006


These defines in sp.h nailed what ought to be a natural enough thing in 
my application:

#define 	int16	short
#define		int32	int

A subsequent:

   typedef signed short int16;
   typedef signed int   int32;

, which is more the expected usage, now chokes the compiler (g++ 4.0.2).

My solution is:

#include <sp.h>                         // Spread itself
// Undo serious badness in sp.h.
#undef int16
#undef int32

A word to the wise, and a gentle suggestion to the Spread developers 
that they join the modern world of typedefs.  Are there really compilers 
out there for which the #define approach is necessary?

thanks,
/jr





More information about the Spread-users mailing list