[GRASS-dev] grass7 compilation error
Markus Metz
markus.metz.giswork at googlemail.com
Fri Aug 20 04:31:35 EDT 2010
Glynn Clements wrote:
>
> Markus Metz wrote:
>
>> > Also, what is the reason for defining _NO_OLDNAMES? Is there no
>> > alternative?
>>
>> Looking for one, but I do not get the initial approach with
>> #define lseek lseek64
>> to work, see ticket #1131.
>
> Right.
>
> Try explicitly including <io.h> and/or <stdio.h> before defining the
> macros. Both headers are protected against repeated inclusion.
>
That would work.
> Also, this issue should only affect code which explicitly includes
> <grass/config.h> before the system header files, which is a bad idea.
Why so? Including grass/config.h after all relevant systems headers
and before all grass headers contradicts current design which
assumes/requires that grass/config.h is included before some system
headers. In config.h.in, lines 23 to 76, there are, amongst others,
HAVE_SYS_TYPES_H and HAVE_UNISTD_H (unistd.h maps roughly to io.h on
mingw). That implies that grass/config.h is supposed to be included
before these headers (and all headers that pull these in) and that
these headers should only be included if the corresponding macros are
set in grass/config.h. Or is this part of config.h.in a remnant from
old days and is no longer necessary today?
Markus M
More information about the grass-dev
mailing list