defining ptrdiff_t in ncconfig.h creates problems with stddef.h on Mac OS X (fwd)

Ed Hartnett ed at unidata.ucar.edu
Fri Jun 16 12:17:33 CDT 2006


Russ Rew <russ at unidata.ucar.edu> writes:

> From:    William Gropp <gropp at mcs.anl.gov>
> Subject: Re: defining ptrdiff_t in ncconfig.h creates problems with stddef.h on Mac OS X Tiger
> To:      parallel-netcdf at mcs.anl.gov
> Date:    Fri, 16 Jun 2006 07:44:05 -0500
>
>
> At 03:30 PM 6/15/2006, Ken Mighell wrote:
>>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
>
> I generally recommend against using names that can conflict with names in 
> user or system files for just this reason.
>
> In this case, it looks like stddef.h defines ptrdiff_t, so either 
> ncconfig.h should ensure that stddef.h is included first (if available) and 
> has a definition for ptrdiff_t, or a different name should be used.
>
> Bill

What version of netCDF are you using when this problem occurs?

Thanks,

Ed
-- 
Ed Hartnett  -- ed at unidata.ucar.edu




More information about the parallel-netcdf mailing list