Jim Blandy
49a19cfd34
hex.c (_hex_value): Make this unsigned.
...
libiberty/ChangeLog:
2003-05-14 Jim Blandy <jimb@redhat.com>
* hex.c (_hex_value): Make this unsigned.
(hex_value): Update documentation for new return type. hex_value
now expands to an unsigned int expression, to avoid unexpected
sign extension when we store it in a bfd_vma, which is larger than
int on some platforms.
* functions.texi: Regenerated.
include/ChangeLog:
2003-05-14 Jim Blandy <jimb@redhat.com>
* libiberty.h (hex_value): Make the value an unsigned int, to
avoid unexpected sign-extension when cast to unsigned types larger
than int --- like bfd_vma, on some platforms.
(_hex_value): Update declaration.
From-SVN: r66840
2003-05-15 19:02:13 +00:00
Kaveh R. Ghazi
9308be9056
* libiberty.h: Document return value of physmem routines.
...
From-SVN: r63521
2003-02-27 20:28:40 +00:00
Kaveh R. Ghazi
a354191ebf
libiberty.h (physmem_total, [...]): Prototype.
...
include:
* libiberty.h (physmem_total, physmem_available): Prototype.
libiberty:
* Makefile.in (CFILES): Add physmem.c.
(REQUIRED_OFILES): Add physmem.o.
* configure.in: Check for sys/pstat.h.
(checkfuncs): Add pstat_getstatic and pstat_getdynamic.
* physmem.c: New file, copied from textutils.
* config.in, configure: Regenerated.
From-SVN: r63198
2003-02-21 00:27:04 +00:00
Daniel Jacobowitz
378ca31ee5
* libiberty.h (lrealpath): Add declaration.
...
From-SVN: r63185
2003-02-20 22:10:40 +00:00
Simon Burge
f60d9a8a86
* libiberty.h (basename): Add NetBSD to the list.
...
From-SVN: r59421
2002-11-24 06:54:38 +00:00
Daniel Jacobowitz
42766f8db1
libiberty.h (make_relative_prefix): Add prototype.
...
include/
* libiberty.h (make_relative_prefix): Add prototype.
libiberty/
* Makefile.in: Add make-relative-prefix.c.
* make-relative-prefix.c: New file.
* functions.texi: Rebuilt.
gcc/
* gcc.c (make_relative_prefix, split_directories)
(free_split_directories): Removed.
From-SVN: r59385
2002-11-22 20:01:07 +00:00
Alexandre Oliva
e2bb0cb4b3
libiberty.h (asprintf, vasprintf): Don't declare them if the corresponding HAVE_DECL_ macro is 1.
...
* libiberty.h (asprintf, vasprintf): Don't declare them if the
corresponding HAVE_DECL_ macro is 1.
From-SVN: r57324
2002-09-20 00:21:54 +00:00
Alan Modra
66443ad2fd
libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
...
* libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
* getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT.
From-SVN: r54941
2002-06-24 14:38:02 +09:30
Kaveh R. Ghazi
b05c4e590b
* libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC.
...
From-SVN: r49299
2002-01-28 21:08:34 +00:00
Kaveh R. Ghazi
e5969ba63a
libiberty.h (hex_init): Revert delete.
...
include:
* libiberty.h (hex_init): Revert delete.
libiberty:
* hex.c (hex_init): Provide empty stub.
From-SVN: r46421
2001-10-23 03:17:29 +00:00
Kaveh R. Ghazi
26ad2982d8
libiberty.h (_hex_value): Const-ify.
...
include:
* libiberty.h (_hex_value): Const-ify.
(hex_init): Delete.
libiberty:
* hex.c (hex_init): Delete.
(_hex_value): Const-ify and initialize at compile-time.
From-SVN: r46417
2001-10-22 22:32:57 +00:00
Kaveh R. Ghazi
0be6abca22
demangle.h (demangler_engine): Const-ify.
...
include:
* demangle.h (demangler_engine): Const-ify.
* libiberty.h (buildargv): Likewise.
libiberty:
* argv.c (buildargv, tests, main): Const-ify.
* cp-demangle.c (operator_code): Likewise.
* cplus-dem.c (optable, libiberty_demanglers,
cplus_demangle_set_style, cplus_demangle_name_to_style,
print_demangler_list): Likewise.
* hashtab.c (higher_prime_number): Likewise.
* strcasecmp.c (charmap): Likewise.
* strerror.c (error_info, strerror, main): Likewise.
* strncasecmp.c (charmap): Likewise.
* strsignal.c (signal_info): Likewise.
From-SVN: r46060
2001-10-07 14:45:04 +00:00
Kaveh R. Ghazi
ad43d46f3a
libiberty.h (reconcat): New function.
...
include:
* libiberty.h (reconcat): New function.
libiberty:
* concat.c (reconcat): New function.
gcc:
* c-aux-info.c (affix_data_type): Use ATTRIBUTE_MALLOC. Avoid
leak by passing malloc'ed pointer to reconcat, not concat.
From-SVN: r45789
2001-09-24 22:38:22 +00:00
Kaveh R. Ghazi
69ee340e99
libiberty.h (concat, [...]): Improve comments.
...
* libiberty.h (concat, concat_length, concat_copy, concat_copy2,
ACONCAT): Improve comments.
From-SVN: r45683
2001-09-18 20:07:31 +00:00
Kaveh R. Ghazi
c793eea7ab
libiberty.h (concat_length, [...]): New.
...
include:
* libiberty.h (concat_length, concat_copy, concat_copy2,
libiberty_concat_ptr, ACONCAT): New.
libiberty:
* concat.c (vconcat_length, vconcat_copy, concat_length,
concat_copy, concat_copy2): New functions.
(concat): Use vconcat_length/vconcat_copy.
gcc:
* gcc.c (find_file): Use ACONCAT in lieu of alloca/strcpy/strcat.
From-SVN: r45664
2001-09-17 22:15:10 +00:00
Kaveh R. Ghazi
c1d49704bc
libiberty.h (ASTRDUP): New macro.
...
include:
* libiberty.h (ASTRDUP): New macro.
libiberty_optr, libiberty_nptr, libiberty_len): Declare.
libiberty:
* alloca.c (libiberty_optr, libiberty_nptr, libiberty_len):
Define.
gcc:
* c-aux-info.c (affix_data_type): Use ASTRDUP in lieu of
alloca/strcpy.
From-SVN: r45657
2001-09-17 18:48:45 +00:00
Andrew Cagney
0ef5547d0e
(lbasename): Change function declaration to return a const char pointer.
...
From-SVN: r44782
2001-08-10 23:45:11 +00:00
Kaveh R. Ghazi
cc56c744ee
* libiberty.h (alloca): Handle setting C_ALLOCA.
...
From-SVN: r40978
2001-03-31 18:59:56 +00:00
Nick Clifton
01f537aba0
Fix copyright dates
...
From-SVN: r40469
2001-03-14 19:44:38 +00:00
Neil Booth
2b757d5101
lbasename.c: New file.
...
* libiberty/lbasename.c: New file.
* libiberty/Makefile.in: Update for lbasename.
* include/libiberty.h: Add lbasename.
Co-Authored-By: John David Anglin <dave@hiauly1.hia.nrc.ca>
From-SVN: r40363
2001-03-10 10:41:25 +00:00
Zack Weinberg
b548dffbda
aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
...
libiberty:
* aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
* configure.in: Replace all alloca logic with a simple use of
the above new macro.
* config.table: Kill *-*-beos* entry.
* config/mh-beos: Delete.
* configure, config.in: Regenerate.
* Makefile.in (ALLOCA, HFILES): Kill.
(REQUIRED_OFILES): Add alloca.o.
(alloca.o): Depend on libiberty.h.
(argv.o): Don't depend on alloca-conf.h.
* alloca-conf.h: Delete.
* alloca.c: Include libiberty.h. Kill all #ifdef emacs
blocks. Provide the C alloca unconditionally. Use PTR where
appropriate. Make i00afunc static.
* argv.c: Don't include alloca-conf.h.
include:
* libiberty.h: Prototype C_alloca; define alloca to either
__builtin_alloca or C_alloca as appropriate.
gcc:
* aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE
AC_FUNC_ALLOCA.
* configure, config.in: Regenerate.
* config.gcc: Remove references to deleted files.
* genattr.c, genattrtab.c, genextract.c, genoutput.c,
genrecog.c, rtl.c: Do not use alloca anywhere.
* Makefile.in, build-make, system.h, config/x-interix,
config/x-svr4, config/xm-interix.h, config/xm-openbsd.h,
config/alpha/xm-alpha.h, config/alpha/xm-vms.h,
config/arc/xm-arc.h, config/arm/xm-arm.h,
config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
config/h8300/xm-h8300.h, config/i370/x-oe,
config/i370/xm-linux.h, config/i386/x-aix, config/i386/x-beos,
config/i386/x-ncr3000, config/i386/x-sco5,
config/i386/xm-dgux.h, config/i860/x-sysv4,
config/i960/xm-i960.h, config/m32r/xm-m32r.h,
config/m68k/x-crds, config/m68k/x-dpx2, config/m68k/x-hp320,
config/m68k/x-hp320g, config/m69k/x-mot3300,
config/m68k/x-mot3300-gas, config/m68k/xm-amix.h,
config/m68k/xm-hp320.h, config/m68k/xm-m68kv.h,
config/m68k/xm-mot3300.h, config/m88k/x-dolph,
config/m88k/x-sysv4, config/m88k/x-tekXD88,
config/m88k/xm-m88k.h, config/mcore/xm-mcore.h,
config/mips/x-iris, config/mips/x-iris3,
config/mips/x-sni-svr4, config/mips/x-sysv,
config/mips/xm-iris6.h, config/mips/xm-mips.h,
config/mips/xm-nws3250v4.h, config/pa/x-hpux,
config/pa/x-pa-mpeix, config/pa/xm-pa.h,
config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h,
config/pa/xm-papro.h, config/romp/xm-romp.h,
config/rs6000/x-aix31, config/rs6000/x-aix41,
config/rs6000/x-beos, config/rs6000/x-lynx,
config/rs6000/x-mach, config/rs6000/x-rs6000,
config/rs6000/x-sysv4, config/rs6000/xm-rs6000.h,
config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
config/sparc/x-sysv4, config/sparc/xm-linux.h,
config/sparc/xm-pbd.h, config/sparc/xm-sparc.h,
config/vax/xm-vms.h: Eradicate all references to alloca and
related stuff.
* config/xm-alloca.h, config/clipper/x-clix,
config/i386/xm-sysv4.h, config/i860/x-fx2800,
config/i860/x-sysv3, config/m88k/x-sysv3,
config/sparc/xm-sol2.h, config/we32k/x-we32k: Delete
(contained only alloca related hacks).
* config/i386/xm-beos.h, config/rs6000/xm-beos.h: Just define
USE_C_ALLOCA.
From-SVN: r40259
2001-03-06 09:52:35 +00:00
Zack Weinberg
d1209685fa
Makefile.in, [...]: Expunge remaining traces of facility for running MD files through C preprocessor.
...
gcc:
* Makefile.in, config.gcc, configure.in: Expunge remaining
traces of facility for running MD files through C preprocessor.
libiberty:
* aclocal.m4 (LIB_AC_PROG_CC): Moved here from configure.in.
(AC_DEFINE_NOAUTOHEADER): New - work around bug in autoheader.
* configure.in: Call AC_C_INLINE and AC_C_CONST. Use three
argument form of AC_DEFINE in dummy definitions block. Use
AC_DEFINE_NOAUTOHEADER for real definitions of things defined
in dummy block. Preload cache variables instead of bypassing
tests, where possible.
* acconfig.h: Removed.
* xmalloc.c (xmalloc_failed): New function, does error
reporting on failed allocation.
(xmalloc, xcalloc, xrealloc): Use it.
* libiberty.h: Move #includes to top. Prototype xmalloc_failed.
From-SVN: r37650
2000-11-22 08:32:26 +00:00
Greg McGary
672a59e0ad
* libiberty.h (ARRAY_SIZE): New macro.
...
From-SVN: r35947
2000-08-24 20:28:15 +00:00
Kaveh R. Ghazi
f31e826ba3
getopt.h (getopt): Also check HAVE_DECL_* when prototyping.
...
include:
* getopt.h (getopt): Also check HAVE_DECL_* when prototyping.
* libiberty.h (basename): Likewise.
gcc:
* aclocal.m4 (gcc_AC_CHECK_DECL, gcc_AC_CHECK_DECLS): New macros
rewritten from the internals of gcc_AC_NEED_DECLARATION{S}.
* configure.in (gcc_AC_CHECK_DECLS): Call this instead of
gcc_AC_NEED_DECLARATIONS.
* dwarfout.c: Don't prototype time().
* gcc.c: Check HAVE_DECL_* instead of NEED_DECLARATION_*.
* system.h: Likewise.
* toplev.c: Likewise.
From-SVN: r34108
2000-05-23 17:42:19 +00:00
Kaveh R. Ghazi
d94656872d
ansidecl.h (ATTRIBUTE_MALLOC): New macro.
...
* ansidecl.h (ATTRIBUTE_MALLOC): New macro.
* libiberty.h (buildargv, dupargv, concat, choose_temp_base,
make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add
ATTRIBUTE_MALLOC.
(xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN.
From-SVN: r30732
1999-11-30 23:56:52 +00:00
Kaveh R. Ghazi
146e60a070
libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
...
* libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
(asprintf, vasprintf): Provide declarations.
From-SVN: r30691
1999-11-29 02:08:36 +00:00
Kaveh R. Ghazi
5a657fc371
libiberty.h (make_temp_file): Add a prototype.
...
include:
* libiberty.h (make_temp_file): Add a prototype.
libiberty:
* choose-temp.c: Remove obsolete comment about gcc.
(make_temp_file): Constify a char*.
gcc:
* collect2.c (make_temp_file): Don't prototype.
* gcc.c (make_temp_file): Likewise.
* mips.c (mips_make_temp_file): Renamed from `make_temp_file'.
From-SVN: r29662
1999-09-25 13:11:17 +00:00
Marc Espie
2ac2226c50
libiberty.h (basename): OpenBSD has a correct prototype.
...
* libiberty.h (basename): OpenBSD has a correct prototype.
(xrealloc): Remove outdated comment.
From-SVN: r29390
1999-09-14 00:35:01 -06:00
Jeff Garzik
6659980655
* libiberty.h (xmemdup): Add prototype for new function.
...
From-SVN: r29200
1999-09-08 02:20:11 -06:00
Kaveh R. Ghazi
25c29e1e40
* libiberty.h (getpwd): Prototype.
...
From-SVN: r28997
1999-08-31 00:52:57 +00:00
Jeff Law
64f62168ef
Sync
...
* Add symcat file.
* libiberty.h expose basename prototype on more systems
From-SVN: r26238
1999-04-06 22:24:20 -06:00
Kaveh R. Ghazi
67d0f6ab5e
* libiberty.h: Prototype xcalloc.
...
From-SVN: r23641
1998-11-13 16:33:50 +00:00
Jeff Law
36af8b6513
backport: libiberty.h (xexit): Change decl to use modern GCC attribute to indicate exit does not return.
...
* Merge devo and egcs include directories.
1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com )
* libiberty.h (xexit): Change decl to use modern GCC attribute
to indicate exit does not return.
From-SVN: r22942
1998-10-08 17:04:13 -06:00
Jeff Law
5a4917e586
[multiple changes]
...
Thu Feb 12 16:29:01 1998 Ian Lance Taylor <ian@cygnus.com>
* getopt.h: Update to latest FSF version.
Fri Nov 7 10:34:09 1997 Rob Savoye <rob@darkstar.cygnus.com>
* libiberty.h: Add extern "C" { so it can be used with C++
programs.
Thu Aug 28 19:41:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
* libiberty.h (dupargv): Add prototype.
Bring over from devo.
From-SVN: r19687
1998-05-11 16:49:29 -06:00
Jason Merrill
6599da043e
Initial revision
...
From-SVN: r14877
1997-08-21 18:57:35 -04:00