delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/31/14:32:15

Message-ID: <3985C69A.B99E8D59@veritas.com>
Date: Mon, 31 Jul 2000 11:34:02 -0700
From: Bob McGowan <rmcgowan AT veritas DOT com>
Organization: VERITAS Software
X-Mailer: Mozilla 4.73 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp AT delorie DOT com
Subject: Re: Cross-compiler questions, re errors
References: <3982099F DOT 4EE7D216 AT veritas DOT com> <200007290619 DOT JAA10412 AT mailgw1 DOT netvision DOT net DOT il>
Reply-To: djgpp AT delorie DOT com

Eli,

Thanks for the suggestion.  I had looked at sys/djtypes.h and seen the
typedefs, etc. already, but was not sure about how to use them.

I'll give it a whirl latter today.

Bob

Eli Zaretskii wrote:
> 
> > Date: Fri, 28 Jul 2000 15:30:55 -0700
> > From: Bob McGowan <rmcgowan AT veritas DOT com>
> >
> > Then there are two compile errors relating to header files.  These are
> > the files I made available in /usr/local/i586-pc-msdosdjgpp/include per
> > the instructions (except I just copied them there rather than making
> > symbolic links).  The errors were previous declaration of _sizt_t and
> > _wchar_t symbols.
> 
> This is a known issue with current versions of GCC: it uses its own
> headers during the build process which define data types, such as
> size_t and wchar_t, in a way that conflicts with DJGPP headers'
> definitions of these very data types.
> 
> The solution is to hack one of these headers so that only one typedef
> is seen by the compiler.
> 
> > (I've tried commenting
> > out the two __DJ_... items, and that got rid of the errors, but I had
> > other errors of similar nature latter and don't want make more "blind"
> > changes).
> 
> You can try conditioning the typedefs in GCC's headers by things like
> this:
> 
>   #ifndef __DJ_size_t
>   ... the GCC typedef here ...
>   #endif
> 
> If you look closer at sys/djtypes.h, you will see that these __DJ_*
> symbols are designed to be guards against multiple typedefs.  Simply
> use them in the headers which come with GCC distribution.

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan AT veritas DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019