This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR bootstrap/10169: Prototype getopt in mips-tfile.c
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: roger at www dot eyesopen dot com
- Cc: dj at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 19 May 2003 19:07:24 -0400 (EDT)
- Subject: Re: [PATCH] PR bootstrap/10169: Prototype getopt in mips-tfile.c
- References: <Pine.LNX.firstname.lastname@example.org>
> 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!
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 R. Ghazi email@example.com