This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: patch for fortran warning fixes ...


 > From: Craig Burley <burley@gnu.org>
 > 
 > Generally this looks okay, though I should try applying it locally
 > and running my own tests as well.

	Would you like to me install it or wait until you've run your
tests... ?

 > 
 > One specific question:
 > 
 > >	* fini.c (MAXNAMELEN): Undef it before defining.
 > 
 > Do you know offhand why this is needed?  Perhaps there's an innocuous
 > definition that precedes it (I couldn't find it in the g77 sources
 > offhand), but if the previous definition might have some important
 > utility, then maybe the name used by fini itself should be changed
 > to avoid conflict.
 >         tq vm, (burley)


	Some platform's sys/params.h define this macro.  E.g. on
mips-sgi-irix6.2, /usr/include/sys/params.h says:

 >  * MAXNAMELEN is the length (including the terminating null) of
 >  * the longest permissible file (component) name.
 > #define MAXNAMELEN      256

	and I get this warning when building egcs:

 > fini.c:27: warning: `MAXNAMELEN' redefined
 > /usr/include/sys/param.h:262: warning: this is the location of the
 > 	previous definition

The same thing happens on sparc-sun-solaris2.5.


	Another option besides undef'ing it, is to use another macro name.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Icon CMT Corp.


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