Re: [Flightgear-devel] SimGear type mismatch on Solaris

2005-09-22 Thread Erik Hofman

Andy Ross wrote:


This is the relevant code from simgear/compiler.h.  Apparently it
thinks that Solaris machines lack a stdint.h header file.  This is
incorrect, at least on the Solaris 10 box I have access too.  The
workaround should be to just eliminate the || defined(sun) bit.

  #if defined( _MSC_VER ) || defined(__MINGW32__) || defined(sun)
  typedef signed char  int8_t;
  typedef signed short int16_t;
  typedef signed int   int32_t;
  typedef signed __int64   int64_t;
  typedef unsigned charuint8_t;
  typedef unsigned short   uint16_t;
  typedef unsigned int uint32_t;
  typedef unsigned __int64 uint64_t;
  #endif

Note that it also includes these definitions for mingw builds, which
is incorrect.  The mingw compiler is a gcc variant, which includes
stdint.h as part of the compiler suite; it is not a platform header.
As far as I can see, MSVC is the only compiler we use that lacks this.


This has been fixed.

Erik

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] SimGear type mismatch on Solaris

2005-09-21 Thread Martin Spott
Now as Andy promised I could have another try on big-endian machines I
decided to actually have one. But something is hindering me that wasn't
there before:

make[3]: Entering directory `/usr/local/src/SimGear/simgear/xml'
g++ -mcpu=hypersparc -mtune=hypersparc -DHAVE_CONFIG_H -I. -I. -I../../simgear 
-I../..  -I/opt/gnu/include -I/usr/local/include -I/opt/FlightGear/include  -O3 
-D_REENTRANT -c -o easyxml.o `test -f 'easyxml.cxx' || echo './'`easyxml.cxx
In file included from easyxml.cxx:3:
../../simgear/compiler.h:473: error: conflicting declaration 'typedef signed 
char int8_t'
/usr/include/sys/int_types.h:62: error: 'int8_t' has a previous declaration as 
`typedef char int8_t'
../../simgear/compiler.h:473: error: declaration of `typedef signed char int8_t'
/usr/include/sys/int_types.h:62: error: conflicts with previous declaration 
`typedef char int8_t'
../../simgear/compiler.h:473: error: declaration of `typedef signed char int8_t'
/usr/include/sys/int_types.h:62: error: conflicts with previous declaration 
`typedef char int8_t'
../../simgear/compiler.h:476: error: `__int64' does not name a type
../../simgear/compiler.h:480: error: `__int64' does not name a type


Could the person who did the changes have a look at it and suggest what
I could try to fix it ?

Thanks,
Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] SimGear type mismatch on Solaris

2005-09-21 Thread Frederic Bouvier
Quoting Martin Spott :

 Now as Andy promised I could have another try on big-endian machines I
 decided to actually have one. But something is hindering me that wasn't
 there before:

 make[3]: Entering directory `/usr/local/src/SimGear/simgear/xml'
 g++ -mcpu=hypersparc -mtune=hypersparc -DHAVE_CONFIG_H -I. -I.
 -I../../simgear -I../..  -I/opt/gnu/include -I/usr/local/include
 -I/opt/FlightGear/include  -O3 -D_REENTRANT -c -o easyxml.o `test -f
 'easyxml.cxx' || echo './'`easyxml.cxx
 In file included from easyxml.cxx:3:
 ../../simgear/compiler.h:473: error: conflicting declaration 'typedef signed
 char int8_t'
 /usr/include/sys/int_types.h:62: error: 'int8_t' has a previous declaration
 as `typedef char int8_t'
 ../../simgear/compiler.h:473: error: declaration of `typedef signed char
 int8_t'
 /usr/include/sys/int_types.h:62: error: conflicts with previous declaration
 `typedef char int8_t'
 ../../simgear/compiler.h:473: error: declaration of `typedef signed char
 int8_t'
 /usr/include/sys/int_types.h:62: error: conflicts with previous declaration
 `typedef char int8_t'
 ../../simgear/compiler.h:476: error: `__int64' does not name a type
 ../../simgear/compiler.h:480: error: `__int64' does not name a type


 Could the person who did the changes have a look at it and suggest what
 I could try to fix it ?

lines 472 and after of simgear's compiler.h reads :

472 #if defined( _MSC_VER ) || defined(__MINGW32__) || defined(sun)
473 typedef signed char  int8_t;
474 typedef signed short int16_t;
475 typedef signed int   int32_t;
476 typedef signed __int64   int64_t;
477 typedef unsigned charuint8_t;
478 typedef unsigned short   uint16_t;
479 typedef unsigned int uint32_t;
480 typedef unsigned __int64 uint64_t;
481 #endif

You probably must refine the test in order to discard these statements that are
already in another include file.

-Fred


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] SimGear type mismatch on Solaris

2005-09-21 Thread Andy Ross
Martin Spott wrote:
 Now as Andy promised I could have another try on big-endian machines I
 decided to actually have one.

Good luck, but unfortunately it seems not to be working for Erik.  I
have a pretty large test suite at this point running on sparc and ppc
without trouble, so I'm wondering if this is something Irix-specific?

 But something is hindering me that wasn't there before:

This is the relevant code from simgear/compiler.h.  Apparently it
thinks that Solaris machines lack a stdint.h header file.  This is
incorrect, at least on the Solaris 10 box I have access too.  The
workaround should be to just eliminate the || defined(sun) bit.

  #if defined( _MSC_VER ) || defined(__MINGW32__) || defined(sun)
  typedef signed char  int8_t;
  typedef signed short int16_t;
  typedef signed int   int32_t;
  typedef signed __int64   int64_t;
  typedef unsigned charuint8_t;
  typedef unsigned short   uint16_t;
  typedef unsigned int uint32_t;
  typedef unsigned __int64 uint64_t;
  #endif

Note that it also includes these definitions for mingw builds, which
is incorrect.  The mingw compiler is a gcc variant, which includes
stdint.h as part of the compiler suite; it is not a platform header.
As far as I can see, MSVC is the only compiler we use that lacks this.

Another nit is that the #include stdint.h line should probably go
in an #else clause here, for symmetry.  I don't know where it's being
included currently.

Finally, __int64 is not a standard type (is it a windowsism?), and
apparently doesn't work on Sun.  The most portable way to get a 64 bit
value from a modern compiler is with long long and unsigned long
long.  I don't know any modern systems on which this fails.

Andy

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] SimGear type mismatch on Solaris

2005-09-21 Thread Erik Hofman

Frederic Bouvier wrote:


You probably must refine the test in order to discard these statements that are
already in another include file.


I'm leaning more and more to defining our own header files which solves 
all this troubles and byte swapping stuff.


Erik


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] SimGear type mismatch on Solaris

2005-09-21 Thread Andy Ross
Erik Hofman wrote:
 I'm leaning more and more to defining our own header files which
 solves all this troubles and byte swapping stuff.

Sounds good to me. :)

Andy



___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d