This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: A protoype patch for cccp.c (really, strerror patch)
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: A protoype patch for cccp.c (really, strerror patch)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 27 Jun 1998 23:48:12 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199806261449.KAA06772@caip.rutgers.edu>you write:
> Here a patch to check if strerror, getcwd and getwd need
> declarations. I also moved extern decls for sys_nerr/sys_errlist to
> system.h. In the process, I nuked VMS's special strerror decl hoping
> that it already has one in string.h or the no-argument one will serve.
> (VMS guys, let me know if this breaks anything.)
Sounds reasonable.
> I left the my_strerror function definitions untouched, one day
> libiberty will be used instead.
Right. Interestingly enough there's a way to do this without converting
everything at once.
Given a common file in both gcc and libiberty. We can convert to a
single file in libiberty by changing references in the gcc dir to
$(srcdir)/../libiberty/source.c and deleting gcc's copy. Just for
fun I did this with a few files last night. Seemed to work fine,
but I didn't want to open that can of worms until after egcs-1.1
has branched.
> I explicitly decided NOT to put a getpwd decl in system.h.
> Getpwd is not a system OS thing, nor is it autoconf based. Its a part
> of gcc, and comes from getpwd.c. Therefore IMHO it should be declared
> as it is now in each file, or to be really clean and thorough, in a
> new file getpwd.h.
Right. I don't think we need getpwd.h -- IMHO that's overkill.
Patch looks fine.
Thanks!
jeff