[haiku-development] Definition clash trying to build gcc2 hybrid

  • From: pete.goodeve@xxxxxxxxxxxx
  • To: Haiku Development <haiku-development@xxxxxxxxxxxxx>
  • Date: Wed, 12 Jan 2011 18:33:30 -0800

Hi,
   In my step-by-step journey, I'm trying to build a hybrid image.
It seems to have gone through all the gcc2 stages, but shortly after
beginning to compile gcc4 objects, I hit a typedef error:

In file included from /BFS_User/haiku/haiku/headers/posix/sys/types.h:56,
                 from /BFS_User/haiku/haiku/headers/posix/alloca.h:9,
                 from /BFS_User/haiku/haiku/headers/posix/stdlib.h:9,
                 from /BFS_User/haiku/haiku/src/libs/jpeg/jinclude.h:39,
                 from /BFS_User/haiku/haiku/src/libs/jpeg/jaricom.c:17:
/BFS_User/haiku/haiku/headers/posix/size_t.h:15: error: redefinition of typedef 
'ssize_t'
/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-100425/lib/gcc/i586-pc-haiku/4.3.3/include/stddef.h:216:
 error: previous declaration of 'ssize_t' was here

The two definitions *are* different (syntactically)...

stddef.h:
  typedef long ssize_t;

size_t.h:
  #if __GNUC__ > 2 && !defined(__ssize_t__)
  #       define __ssize_t__
  typedef long signed int ssize_t;
  #endif
 
I'm assuming the second should have been conditionally excluded if
previously defined (which it is).  However, '__ssize_t__' is *not*
defined by stddef.h (or elsewhere as far as I know), so the double
def is not surprising.

What's the correct fix here? [And why does it just happen to *me*? (:-/]

        -- Pete --


Other related posts: