This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Work-around to prevent an error (Cross-compiler-build) about caddr_t


On Jan 28 09:57, Markus Eisenmann wrote:
> 
> Hi! 
> 
> Building a cross-compiler of GCC (based on mingw-host) will end with a compiler-error, because 
> (in this case) the GCC-build uses a generated header-file which defines a macro for caddr_t . 
> 
> Caused by wrong detection wheter caddr_t is already known; autotools is checking the 
> host header-files and not newlib provided definitions :-) 
> 
> Up to now, I've used a small patch on sys\types.h as work-around; I.e. undefining caddr_t 
> 
> Maybe this should be included in the trunk ... : 
> 
> --- sys\types.h 2013-11-30 00:14:00 +0000 
> +++ sys\types.h 2014-01-10 12:52:00 +0000 
> @@ -143,6 +143,7 @@ 
> #define __daddr_t_defined 
> #endif 
> #ifndef __caddr_t_defined 
> +#undef caddr_t 
> typedef char * caddr_t; 
> #define __caddr_t_defined 
> #endif 

IMHO the real fix would be to make sure autotools checks against the
correct headers.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpyljwCR45Uk.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]