[GRASS5] ISO C90 does not support `long long'

Glynn Clements glynn at gclements.plus.com
Wed Feb 1 08:38:15 EST 2006


Markus Neteler wrote:

> using the "-pedantic" gcc flag, I get this message:
> 
> include/grass/dgl/type.h:66: warning: ISO C90 does not support `long long'
> 
> How to fix that line?

Option 1: check whether the implementation supports "long long", and
define dglInt64_t as something else (e.g. "long") if it doesn't.

You can use the configure macro:

	AC_CHECK_TYPES(long long)

which should define HAVE_LONG_LONG if the type exists.

The disadvantage is that the file format will be incompatible with
systems which do have a 64-bit integral type.

Option 2: change the nnCost field to double, and modify the code which
reads and writes the nnCost field to read/write 2 32-bit values and
convert them to/from a double value.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list