This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Remove parameter names from libiberty.h
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: binutils at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org
- Cc: amodra at bigpond dot net dot au, dj at redhat dot com, ian at airs dot com
- Date: Wed, 13 Apr 2005 19:57:38 -0400 (EDT)
- Subject: Remove parameter names from libiberty.h
- References: <20050412012121.GA3321@bubble.modra.org>
As noted here:
http://sourceware.org/ml/binutils/2005-04/msg00269.html
The new f*open_unlocked function prototypes in libiberty.h are in
conflict with binutils sources because one of the parameter names
("mode") gets defined to "31" and the build dies.
Personally, I like parameter names as documentation, and I'd recommend
moving the inclusion of libiberty.h higher in opcodes/m88k-dis.c so
that "mode" isn't clobbered by the time we get these prototypes, but
it's not worth arguing over IMO.
So here's a patch to do as Alan asked. Let me know if I should
install it.
--Kaveh
2005-04-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
Remove parameter names.
diff -rup orig/egcc-CVS20050413/include/libiberty.h egcc-CVS20050413/include/libiberty.h
--- orig/egcc-CVS20050413/include/libiberty.h 2005-04-13 19:33:34.502555400 -0400
+++ egcc-CVS20050413/include/libiberty.h 2005-04-13 19:34:12.465784112 -0400
@@ -52,9 +52,9 @@ extern "C" {
the stream is setup to avoid any multi-threaded locking. Otherwise
return the FILE pointer unchanged. */
-extern FILE *fopen_unlocked (const char *path, const char *mode);
-extern FILE *fdopen_unlocked (int fildes, const char *mode);
-extern FILE *freopen_unlocked (const char *path, const char *mode, FILE *stream);
+extern FILE *fopen_unlocked (const char *, const char *);
+extern FILE *fdopen_unlocked (int, const char *);
+extern FILE *freopen_unlocked (const char *, const char *, FILE *);
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */