This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

RE: NT Cross Linux compiler



Thanks.  I was thinking about just fixing the code like that, but didn't
know if this was a real code problem the compiler couldn't handle, or if it
was indicative of some other (configuration) problem.  But it sounds like
you just fixed the problem in the code and everything worked ok, so that's
what I'll try too.

Thanks,
Curt

-----Original Message-----
From: Gareth Boden [mailto:Gareth.Boden@cenes.co.uk]
Sent: Wednesday, June 23, 1999 2:12 AM
To: 'crossgcc@cygnus.com'
Subject: RE: NT Cross Linux compiler


> ../../src/make/arscan.c:444: warning: preprocessing directive 
> not recognized
> within macro arg
> I looked at the offending code and on the surface it looks ok to me:
> 
> Any idea why this is complaining?

Yep, I had the same problem. strncmp is actually defined in the standard
linux includes in terms of macro expansions - the preprocessor then objects
to having the #if stuff inside the macro expansion. The solution is to
change it to:

> #if !defined (__hpux) && !defined (cray)
>       return !strncmp (name, mem,
> 		       sizeof (hdr.ar_name) - 
> 		       1
> 		       );
> #else
>       return !strncmp (name, mem,
> 		       sizeof (hdr.ar_name) - 
> 		       2
> 		       );
> #endif /* !__hpux && !cray */

Gareth
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

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