defining ptrdiff_t in ncconfig.h creates problems with stddef.h on Mac OS X Tiger
Ken Mighell
mighell at noao.edu
Thu Jun 15 15:30:46 CDT 2006
Dear pnetcdf team,
I was trying to build pnetcdf with OpenMPI using an Apple dual G5
tower running Mac OS X.
Seems that the line
#define ptrdiff_t int
in ncconfig.h creates havoc whenever source code includes <stddef.h>
AFTER ncconfig.h has been included.
Specifically, what happens,in that case, is the command
typedef int int;
is generated by <stddef.h> -- which causes compilation a error.
uname -a
gives this result:
Darwin oblix.tuc.noao.edu 8.1.0 Darwin Kernel Version 8.1.0: Tue May
10 18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power
Macintosh powerpc
mpicc --version
gives this result:
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer,
Inc. build 4061)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
The problem apparently can be made to go away by adding the line
#include <stddef.h>
BEFORE any source code with the line
#include "ncconfig.h"
Does configure need to be made a little smarter?
Or should ptrdiff_t be made a typedef instead of a macro within
ncconfig.h ?
Sincerely yours,
-Kenneth Mighell
======================================
Kenneth Mighell, Associate Scientist
Kitt Peak National Observatory
National Optical Astronomy Observatory
950 North Cherry Avenue
Tucson, AZ 85719 U.S.A.
email: mighell at noao.edu
voice: (520) 318-8391
fax: (520) 318-8360
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20060615/ac2a8465/attachment.htm>
More information about the parallel-netcdf
mailing list