Skip to content

Commit

Permalink
merge from gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
djdelorie committed Jan 22, 2002
1 parent de32859 commit a4d99b3
Show file tree
Hide file tree
Showing 11 changed files with 405 additions and 99 deletions.
24 changes: 24 additions & 0 deletions libiberty/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
2002-01-18 DJ Delorie <dj@redhat.com>

* Makefile.in (TESTLIB): New. This library is for future
testsuites.
(CFILES, REQUIRED_OFILES, CONFIGURED_OFILES): Re-alphabetize,
break down by letter.
(REQUIRED_OFILES): List long-to-compile files first.
(maint-deps): New, target for updating dependencies.
(dependencies): Update.
* maint-tool: Add dependency-generating option.
* configure.in: Check for _doprnt even if we're not providing it.
* configure: Regenerate.

* _doprnt.c: Modifications to allow compiling on any platform.
* copysign.c: Likewise.
* putenv.c: Likewise.
* setenv.c: Likewise.
* vsprintf.c: Likewise.

2002-01-15 Douglas B Rupp <rupp@gnat.com>

* mkstemps.c (mkstemps): On VMS, open temp file with option
that causes it to be deleted when closed.

2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>

* cp-demangle.c (long_options): Const-ify.
Expand Down
222 changes: 149 additions & 73 deletions libiberty/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ PICFLAG =
MAKEOVERRIDES =

TARGETLIB = libiberty.a
TESTLIB = testlib.a

LIBOBJS = @LIBOBJS@

Expand Down Expand Up @@ -116,42 +117,69 @@ COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiber
$(COMPILE.c) $<

# NOTE: If you add new files to the library, add them to this list
# (alphabetical), and add them to REQUIRED_OFILES or funcs in
# configure.in.
CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \
bsearch.c bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c \
cp-demangle.c dyn-string.c fdmatch.c fnmatch.c ffs.c getcwd.c \
getpwd.c getopt.c getopt1.c getpagesize.c getruntime.c \
floatformat.c hashtab.c hex.c index.c insque.c lbasename.c \
md5.c make-temp-file.c memchr.c \
memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \
partition.c pexecute.c putenv.c random.c \
regex.c rename.c rindex.c setenv.c \
sigsetmask.c safe-ctype.c sort.c spaces.c splay-tree.c strcasecmp.c \
strncasecmp.c strchr.c strdup.c strerror.c strncmp.c strrchr.c \
strsignal.c strstr.c strtod.c strtol.c strtoul.c tmpnam.c vasprintf.c \
vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c xatexit.c xexit.c \
xmalloc.c xmemdup.c xstrdup.c xstrerror.c ternary.c fibheap.c

# These are always included in the library.
REQUIRED_OFILES = argv.o alloca.o choose-temp.o concat.o cplus-dem.o \
cp-demangle.o dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o \
getpwd.o getruntime.o hashtab.o hex.o floatformat.o lbasename.o \
md5.o make-temp-file.o objalloc.o \
obstack.o partition.o pexecute.o regex.o safe-ctype.o sort.o spaces.o \
splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \
xmemdup.o xstrdup.o xstrerror.o ternary.o fibheap.o
# (alphabetical), and add them to REQUIRED_OFILES, or
# CONFIGURED_OFILES and funcs in configure.in.
CFILES = alloca.c argv.c asprintf.c atexit.c \
basename.c bcmp.c bcopy.c bsearch.c bzero.c \
calloc.c choose-temp.c clock.c concat.c cp-demangle.c \
cplus-dem.c \
dyn-string.c \
fdmatch.c ffs.c fibheap.c floatformat.c fnmatch.c \
getcwd.c getopt.c getopt1.c getpagesize.c getpwd.c getruntime.c \
hashtab.c hex.c \
index.c insque.c \
lbasename.c \
make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
memset.c mkstemps.c \
objalloc.c obstack.c \
partition.c pexecute.c putenv.c \
random.c regex.c rename.c rindex.c \
safe-ctype.c setenv.c sigsetmask.c sort.c spaces.c \
splay-tree.c strcasecmp.c strchr.c strdup.c strerror.c \
strncasecmp.c strncmp.c strrchr.c strsignal.c strstr.c \
strtod.c strtol.c strtoul.c \
ternary.c tmpnam.c \
vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c \
waitpid.c \
xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c

# These are always included in the library. The first four are listed
# first and by compile time to optimize parallel builds.
REQUIRED_OFILES = regex.o cplus-dem.o cp-demangle.o md5.o \
alloca.o argv.o \
choose-temp.o concat.o \
dyn-string.o \
fdmatch.o fibheap.o floatformat.o fnmatch.o \
getopt.o getopt1.o getpwd.o getruntime.o \
hashtab.o hex.o \
lbasename.o \
make-temp-file.o \
objalloc.o obstack.o \
partition.o pexecute.o \
safe-ctype.o sort.o spaces.o splay-tree.o strerror.o \
strsignal.o \
ternary.o \
xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o

# These are all the objects that configure may add to the library via
# $funcs. This list exists here only for "make maint-missing".
CONFIGURED_OFILES = asprintf.o atexit.o basename.o bcmp.o bcopy.o \
bsearch.o bzero.o calloc.o clock.o ffs.o getcwd.o \
getpagesize.o index.o insque.o memchr.o memcmp.o memcpy.o \
memmove.o memset.o mkstemps.o putenv.o random.o rename.o \
rindex.o setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o \
strncasecmp.o strncmp.o strrchr.o strstr.o strtod.o strtol.o \
strtoul.o tmpnam.o vasprintf.o vfork.o vfprintf.o vprintf.o \
vsprintf.o waitpid.o
# $funcs or EXTRA_OFILES. This list exists here only for "make
# maint-missing" and "make check".
CONFIGURED_OFILES = asprintf.o atexit.o \
basename.o bcmp.o bcopy.o bsearch.o bzero.o \
calloc.o clock.o copysign.o \
_doprnt.o \
ffs.o \
getcwd.o getpagesize.o \
index.o insque.o \
memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o \
putenv.o \
random.o rename.o rindex.o \
setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o \
strncasecmp.o strncmp.o strrchr.o strstr.o strtod.o strtol.o \
strtoul.o \
tmpnam.o \
vasprintf.o vfork.o vfprintf.o vprintf.o vsprintf.o \
waitpid.o

$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
-rm -f $(TARGETLIB) pic/$(TARGETLIB)
Expand All @@ -166,6 +194,12 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
cd ..; \
else true; fi

$(TESTLIB): $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
-rm -f $(TESTLIB)
$(AR) $(AR_FLAGS) $(TESTLIB) \
$(REQUIRED_OFILES) $(CONFIGURED_OFILES)
$(RANLIB) $(TESTLIB)

info: libiberty.info info-subdir
install-info: install-info-subdir
clean-info: clean-info-subdir
Expand Down Expand Up @@ -268,6 +302,9 @@ maint-buildall : $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
maint-undoc : $(srcdir)/functions.texi
@$(PERL) $(srcdir)/maint-tool -s $(srcdir) undoc

maint-deps :
@$(PERL) $(srcdir)/maint-tool -s $(srcdir) deps $(INCDIR)

# Need to deal with profiled libraries, too.

# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS
Expand Down Expand Up @@ -323,53 +360,92 @@ maintainer-clean-subdir: config.h
done

$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir
$(CONFIGURED_OFILES): stamp-picdir

# The dependencies in the remainder of this file are automatically
# generated by "make maint-deps". Manual edits will be lost.

alloca.o: config.h $(INCDIR)/libiberty.h
_doprnt.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
alloca.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
argv.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
asprintf.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
atexit.o: config.h
argv.o: config.h $(INCDIR)/libiberty.h
basename.o: $(INCDIR)/libiberty.h
choose-temp.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
choose-temp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
clock.o: config.h
concat.o: config.h $(INCDIR)/libiberty.h
cplus-dem.o: config.h $(INCDIR)/demangle.h
cp-demangle.o: config.h $(INCDIR)/dyn-string.h $(INCDIR)/demangle.h
dyn-string.o: config.h $(INCDIR)/dyn-string.h
fdmatch.o: $(INCDIR)/libiberty.h
fibheap.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/fibheap.h
fnmatch.o: config.h $(INCDIR)/fnmatch.h
concat.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
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
dyn-string.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h \
$(INCDIR)/libiberty.h
fdmatch.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
fibheap.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/fibheap.h \
$(INCDIR)/libiberty.h
floatformat.o: $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h
fnmatch.o: config.h $(INCDIR)/fnmatch.h $(INCDIR)/safe-ctype.h
getcwd.o: config.h
getopt.o: config.h $(INCDIR)/getopt.h
getopt1.o: config.h $(INCDIR)/getopt.h
getpagesize.o: config.h
getpwd.o: config.h $(INCDIR)/libiberty.h
getruntime.o: config.h $(INCDIR)/libiberty.h
hex.o: $(INCDIR)/libiberty.h
floatformat.o: $(INCDIR)/floatformat.h
lbasename.o: $(INCDIR)/libiberty.h
make-temp-file.o: config.h
mkstemps.o: config.h
md5.o: config.h
objalloc.o: config.h $(INCDIR)/objalloc.h
getpwd.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
getruntime.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
hashtab.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.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
memcmp.o: $(INCDIR)/ansidecl.h
memcpy.o: $(INCDIR)/ansidecl.h
memmove.o: $(INCDIR)/ansidecl.h
memset.o: $(INCDIR)/ansidecl.h
mkstemps.o: config.h $(INCDIR)/ansidecl.h
objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h
partition.o: config.h $(INCDIR)/partition.h
pexecute.o: config.h $(INCDIR)/libiberty.h
partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/partition.h
pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.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
setenv.o: config.h
sort.o: config.h $(INCDIR)/sort.h $(INCDIR)/ansidecl.h
spaces.o: $(INCDIR)/libiberty.h
splay-tree.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h
strerror.o: config.h $(INCDIR)/libiberty.h
strsignal.o: config.h $(INCDIR)/libiberty.h
strtol.o: config.h
strtoul.o: config.h
ternary.o: config.h $(INCDIR)/ternary.h $(INCDIR)/libiberty.h
vasprintf.o: config.h
xatexit.o: $(INCDIR)/libiberty.h
xexit.o: config.h $(INCDIR)/libiberty.h
xmalloc.o: config.h $(INCDIR)/libiberty.h
xmemdup.o: config.h $(INCDIR)/libiberty.h
xstrdup.o: config.h $(INCDIR)/libiberty.h
xstrerror.o: config.h $(INCDIR)/libiberty.h
safe-ctype.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
setenv.o: config.h $(INCDIR)/ansidecl.h
sigsetmask.o: $(INCDIR)/ansidecl.h
sort.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/sort.h
spaces.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
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
strerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
strncasecmp.o: $(INCDIR)/ansidecl.h
strncmp.o: $(INCDIR)/ansidecl.h
strrchr.o: $(INCDIR)/ansidecl.h
strsignal.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
strtod.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
strtol.o: config.h $(INCDIR)/safe-ctype.h
strtoul.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
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
vprintf.o: $(INCDIR)/ansidecl.h
vsprintf.o: $(INCDIR)/ansidecl.h
waitpid.o: config.h
hashtab.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/ansidecl.h
xatexit.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
xexit.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
xmalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
xmemdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
xstrdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
xstrerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
9 changes: 8 additions & 1 deletion libiberty/_doprnt.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Provide a version of _doprnt in terms of fprintf.
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Kaveh Ghazi (ghazi@caip.rutgers.edu) 3/29/98
This program is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -29,9 +29,16 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

#undef _doprnt

#ifdef HAVE__DOPRNT
#define TEST
#endif

#ifdef TEST /* Make sure to use the internal one. */
#define _doprnt my_doprnt
#endif
Expand Down
Loading

0 comments on commit a4d99b3

Please sign in to comment.