Message-ID: <3985C69A.B99E8D59@veritas.com> Date: Mon, 31 Jul 2000 11:34:02 -0700 From: Bob McGowan Organization: VERITAS Software X-Mailer: Mozilla 4.73 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Eli Zaretskii 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit 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 > > > > 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