NT Cross Linux compiler

Gareth Boden Gareth.Boden@cenes.co.uk
Wed Jun 23 05:14:00 GMT 1999


> ../../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.


More information about the crossgcc mailing list