Mail Archives: djgpp/2000/07/31/14:32:15
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 -