[Image-SIG] portability issue in ImConfig.h

Patrick Perry patperry@stanford.edu
Thu, 17 Aug 2000 11:13:21 -0700 (PDT)


Hi guys,

I was browsing through the source of PIL, and was a little confused when I
came across ImConfig.h (in the libImaging directory).  This file is full
of lines like:

#define SIZEOF_CHAR 1
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4

Why are these values hard coded instead of using the "sizeof" macro that's
part of any ANSI C compiler???  The *only* size that's guaranteed is
char-- the size of float, double, etc. can change from platform to
platform.  I hope I'm missing something here-- if I am, fill me
in.  Otherwise, let's change ImConfig.h to be a little more ANSI
compliant.



Patrick