summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2003-04-15 21:36:21 +0000
committerDJ Delorie <dj@delorie.com>2003-04-15 21:36:21 +0000
commit2bd4afdef7635ea1361f972b1d00df78cf688258 (patch)
treedc8de190bd4e1cd406c50bfab0bb9a4e39a5d136
parent3029279d623eec67126cbe6994ceffdd16907b5b (diff)
downloadgdb-2bd4afdef7635ea1361f972b1d00df78cf688258.tar.gz
merge from gcc
-rw-r--r--libiberty/ChangeLog58
-rw-r--r--libiberty/Makefile.in32
-rw-r--r--libiberty/argv.c4
-rw-r--r--libiberty/calloc.c3
-rw-r--r--libiberty/floatformat.c3
-rw-r--r--libiberty/getcwd.c2
-rw-r--r--libiberty/hashtab.c3
-rw-r--r--libiberty/rename.c5
-rw-r--r--libiberty/strsignal.c2
-rw-r--r--libiberty/strstr.c4
-rw-r--r--libiberty/vfprintf.c3
-rw-r--r--libiberty/vprintf.c4
-rw-r--r--libiberty/vsprintf.c6
13 files changed, 91 insertions, 38 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 0fc64dd9d0a..9a1cf0d8fb3 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,25 @@
+2003-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * argv.c: Fix comments.
+ * calloc.c: Don't unnecessarily include "libiberty.h".
+ (bzero): Add prototype.
+ * floatformat.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
+ * getcwd.c (getcwd): Use standard definition to avoid conflicts
+ with system headers.
+ * hashtab.c (htab_traverse): Delete unused variables.
+ * rename.c: Include "ansidecl.h".
+ (rename): Use standard definition to avoid conflicts with system
+ headers.
+ * strsignal.c: Rely on ANSI_PROTOTYPES.
+ * strstr.c: Check GNUC >= 2, not GNUC == 2.
+ * vfprintf.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
+ * vprintf.c: Include "ansidecl.h" earlier, rely on
+ ANSI_PROTOTYPES.
+ * vsprintf.c: Include "ansidecl.h" earlier, rely on
+ ANSI_PROTOTYPES and possibly include <stdarg.h>.
+
+ * Makefile.in: Regenerate dependencies.
+
2003-04-15 DJ Delorie <dj@redhat.com>
* maint-tool (deps): Scan for headers in $srcdir also.
@@ -13,6 +35,25 @@
2003-04-14 Roger Sayle <roger@eyesopen.com>
+ * argv.c: Use ANSI_PROTOTYPES instead of __STDC__.
+ * memchr.c: Likewise.
+ * strcasecmp.c: Likewise.
+ * strncasecmp.c: Likewise.
+ * strncmp.c: Likewise.
+ * xatexit.c: Likewise.
+ * xmalloc.c: Likewise.
+
+ * copysign.c: Use traditional function declaration instead of DEFUN.
+ * sigsetmask.c: Likewise.
+
+ * memcmp.c: Both of the above, ANSI_PROTOTYPES and DEFUN.
+ * memset.c: Likewise.
+
+ * memcpy.c: ANSI_PROTOTYPES, DEFUN and prototype bcopy.
+ * memmove.c: Likewise.
+
+2003-04-14 Roger Sayle <roger@eyesopen.com>
+
* strdup.c (strdup): Tweak implementation to use memcpy.
2003-04-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
@@ -39,12 +80,6 @@
on the number of elements actually used.
(htab_traverse): Call htab_expand when table is too empty.
-2003-12-03 Jan Hubicka <jh@suse.cz>
-
- * hashtab.c (htab_expand): Compute the size of hashtable based
- on the number of elements actually used.
- (htab_traverse): Call htab_expand when table is too empty.
-
2003-03-11 Carlo Wood <carlo@gnu.org>
* cplus-dem.c (demangle_integral_value): Correction to reflect
@@ -80,7 +115,7 @@
2003-02-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Richard Earnshaw <rearnsha@arm.com>
Geoffrey Keating <geoffk@apple.com>
-
+
* configure.in: Check for sys/sysctl.h and sysctl.
* physmem.c: Add support for *bsd and darwin.
* Makefile.in: Generate depedency for physmem.o.
@@ -99,10 +134,17 @@
2003-02-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * configure.in: Check for sys/sysmp.h and sysmp.
+ * physmem.c: Pull upstream copy, add support for irix6.
+
+ * config.in, configure: Regenerated.
+
+2003-02-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
* physmem.c (physmem_total, physmem_available): De-ANSI-fy.
* configure.in (AC_CHECK_FUNCS): Add pstat_getstatic and
pstat_getdynamic.
-
+
2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFILES): Add physmem.c.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 737d239450a..2e9bff43fbb 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -423,7 +423,7 @@ atexit.o: config.h
basename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
bsearch.o: config.h $(INCDIR)/ansidecl.h
-calloc.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+calloc.o: $(INCDIR)/ansidecl.h
choose-temp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
clock.o: config.h
concat.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
@@ -431,7 +431,7 @@ copysign.o: $(INCDIR)/ansidecl.h
cp-demangle.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
$(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h
cplus-dem.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
- $(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
dyn-string.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h \
$(INCDIR)/libiberty.h
fdmatch.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
@@ -451,7 +451,8 @@ hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
lrealpath.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
-make-relative-prefix.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+make-relative-prefix.o: config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
make-temp-file.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
md5.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
memchr.o: $(INCDIR)/ansidecl.h
@@ -464,18 +465,23 @@ objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h
partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/partition.h
-pex-djgpp.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
-pex-mpw.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
-pex-msdos.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
-pex-os2.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
-pex-unix.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
-pex-win32.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
-physmem.o: config.h $(INCDIR)/libiberty.h
+pex-djgpp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-mpw.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-msdos.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h $(INCDIR)/safe-ctype.h
+pex-os2.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-unix.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-win32.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+physmem.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
putenv.o: config.h $(INCDIR)/ansidecl.h
random.o: $(INCDIR)/ansidecl.h
regex.o: config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
-rename.o: config.h
+rename.o: config.h $(INCDIR)/ansidecl.h
safe-ctype.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
setenv.o: config.h $(INCDIR)/ansidecl.h
sigsetmask.o: $(INCDIR)/ansidecl.h
@@ -486,6 +492,7 @@ splay-tree.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/splay-tree.h
strcasecmp.o: $(INCDIR)/ansidecl.h
strchr.o: $(INCDIR)/ansidecl.h
+strdup.o: $(INCDIR)/ansidecl.h
strerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
strncasecmp.o: $(INCDIR)/ansidecl.h
strncmp.o: $(INCDIR)/ansidecl.h
@@ -498,6 +505,7 @@ ternary.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/ternary.h
vasprintf.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
vfork.o: $(INCDIR)/ansidecl.h
+vfprintf.o: $(INCDIR)/ansidecl.h
vprintf.o: $(INCDIR)/ansidecl.h
vsprintf.o: $(INCDIR)/ansidecl.h
waitpid.o: config.h
diff --git a/libiberty/argv.c b/libiberty/argv.c
index e4a03793b65..31d8ef55e26 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
#include <stdlib.h>
-#else /* !__STDC__ */
+#else /* !ANSI_PROTOTYPES */
#if !defined _WIN32 || defined __GNUC__
extern char *memcpy (); /* Copy memory region */
@@ -46,7 +46,7 @@ extern void free (); /* Free malloc'd memory */
extern char *strdup (); /* Duplicate a string */
#endif
-#endif /* __STDC__ */
+#endif /* ANSI_PROTOTYPES */
#ifndef NULL
diff --git a/libiberty/calloc.c b/libiberty/calloc.c
index b342f6c1b3b..50736823077 100644
--- a/libiberty/calloc.c
+++ b/libiberty/calloc.c
@@ -13,8 +13,6 @@ Uses @code{malloc} to allocate storage for @var{nelem} objects of
*/
#include "ansidecl.h"
-#include "libiberty.h"
-
#ifdef ANSI_PROTOTYPES
#include <stddef.h>
#else
@@ -23,6 +21,7 @@ Uses @code{malloc} to allocate storage for @var{nelem} objects of
/* For systems with larger pointers than ints, this must be declared. */
PTR malloc PARAMS ((size_t));
+void bzero PARAMS ((PTR, size_t));
PTR
calloc (nelem, elsize)
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c
index d9e9fad816d..d69024f7390 100644
--- a/libiberty/floatformat.c
+++ b/libiberty/floatformat.c
@@ -17,9 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#include "ansidecl.h"
#include "floatformat.h"
#include <math.h> /* ldexp */
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
#include <stddef.h>
extern void *memcpy (void *s1, const void *s2, size_t n);
extern void *memset (void *s, int c, size_t n);
diff --git a/libiberty/getcwd.c b/libiberty/getcwd.c
index 465b4e0b2aa..a19d26796d5 100644
--- a/libiberty/getcwd.c
+++ b/libiberty/getcwd.c
@@ -40,7 +40,7 @@ extern int errno;
char *
getcwd (buf, len)
char *buf;
- int len;
+ size_t len;
{
char ourbuf[MAXPATHLEN];
char *result;
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 2f8dfd6c581..32067afb5b8 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -634,9 +634,6 @@ htab_traverse (htab, callback, info)
htab_trav callback;
PTR info;
{
- PTR *slot;
- PTR *limit;
-
if ((htab->n_elements - htab->n_deleted) * 8 < htab->size)
htab_expand (htab);
diff --git a/libiberty/rename.c b/libiberty/rename.c
index 05630629c1f..399980ab7d7 100644
--- a/libiberty/rename.c
+++ b/libiberty/rename.c
@@ -12,6 +12,7 @@ exists, it is removed.
*/
+#include "ansidecl.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -22,8 +23,8 @@ exists, it is removed.
int
rename (zfrom, zto)
- char *zfrom;
- char *zto;
+ const char *zfrom;
+ const char *zto;
{
if (link (zfrom, zto) < 0)
{
diff --git a/libiberty/strsignal.c b/libiberty/strsignal.c
index 86c8aca5b49..a8a7d341fef 100644
--- a/libiberty/strsignal.c
+++ b/libiberty/strsignal.c
@@ -42,7 +42,7 @@ extern PTR memset ();
#undef sys_nsig
#ifndef NULL
-# ifdef __STDC__
+# ifdef ANSI_PROTOTYPES
# define NULL (void *) 0
# else
# define NULL 0
diff --git a/libiberty/strstr.c b/libiberty/strstr.c
index 470e04b1a76..a059c7f5dcb 100644
--- a/libiberty/strstr.c
+++ b/libiberty/strstr.c
@@ -27,8 +27,8 @@ strstr (s1, s2)
register char *p = s1;
extern char *strchr ();
extern int strncmp ();
-#if __GNUC__==2
- extern __SIZE_TYPE__ strlen ();
+#if __GNUC__ >= 2
+ extern __SIZE_TYPE__ strlen (const char *);
#endif
register int len = strlen (s2);
diff --git a/libiberty/vfprintf.c b/libiberty/vfprintf.c
index db7b2ff4c19..18f09d47d32 100644
--- a/libiberty/vfprintf.c
+++ b/libiberty/vfprintf.c
@@ -3,7 +3,8 @@
Copyright (C) 1998 Free Software Foundation, Inc.
*/
-#ifdef __STDC__
+#include "ansidecl.h"
+#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
diff --git a/libiberty/vprintf.c b/libiberty/vprintf.c
index c57c3e4f318..9487896ea5e 100644
--- a/libiberty/vprintf.c
+++ b/libiberty/vprintf.c
@@ -15,13 +15,13 @@ nonstandard but common function @code{_doprnt}.
*/
-#ifdef __STDC__
+#include <ansidecl.h>
+#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <stdio.h>
-#include <ansidecl.h>
#undef vprintf
int
vprintf (format, ap)
diff --git a/libiberty/vsprintf.c b/libiberty/vsprintf.c
index b69e9bc9ca6..9f09d7e2758 100644
--- a/libiberty/vsprintf.c
+++ b/libiberty/vsprintf.c
@@ -26,9 +26,13 @@ the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
+#include <ansidecl.h>
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
#include <varargs.h>
+#endif
#include <stdio.h>
-#include <ansidecl.h>
#undef vsprintf
#if defined _IOSTRG && defined _IOWRT