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]
Other format: [Raw text]

Re: [PATCH] PR bootstrap/10169: Prototype getopt in mips-tfile.c


 > However, I think your solution of also fixincluding 'getopt.h' purely
 > to place it in ./include is truly inspired.  To generalize, I suspect
 > that any header filename used by libiberty but already present in
 > /usr/include could be directly copied into the header staging area, if
 > not already fixincluded.
 > 
 > A very cool solution to this problem!
 > Roger

Actually I find this kinda hackish, why fixinclude something just
because gcc's -I setup with libiberty is crufty?  It's generally
better to minimize the number of headers you "fix".

When I find myself in these situations, I ask: how is this working in
the rest of the source base?  Answer: elsewhere we use getopt_long.
E.g. look at gcov.c.  I believe accepting "long" options is also more
in line with GNU standards.

IMHO if you change mips-tfile.c/mips-tdump.c to do that you'll
probably find it simpler and more elegant than "fixing" more headers.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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