summaryrefslogtreecommitdiff
path: root/libiberty/xstrerror.c
AgeCommit message (Collapse)Author
2005-05-24libiberty.h (ACONCAT): Properly cast value of alloca().Gabriel Dos Reis
include/ 2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net> * libiberty.h (ACONCAT): Properly cast value of alloca(). * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if __cplusplus. libiberty/ 2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net> * configure.ac: Check declarations for calloc(), getenv(), malloc(), realloc() and sbrk(). * config.in: Regenerate. * configure: Likewise. * alloca.c (C_alloca): Change "new" to "new_storage". Use XNEWVEC instead of xmalloc. * choose-temp.c (choose_temp_base): Use XNEWVEC instea od xmalloc. * concat.c (liiberty_concat_ptr): Surround definition with an extern "C" block, if __cplusplus. (concat): Use XNEWVEC instead of xmalloc. (reconcat): Likewise. * cp-demangle.c (struct d_print_template): Rename member "template" to "template_decl". Adjust use throughout the file. (d_print_resize): Properly cast return value of realloc(). (cplus_demangle_print): Same for malloc(). (d_demangle): Likewise. * cp-demint.c (cplus_demangle_fill_builtin_type): Rename parameter "typename" to "type_name". * cplus-dem.c (grow_vect): Use XRESIZEVEC instead of xrealloc(). (work_stuff_copy_to_from): Use XNEWVEC insteand of xmalloc(). (demangle_template_value_parm): Likewise. (demangle_template): Likewise. (recursively_demangle): Likewise. (do_hpacc_template_literal): Likewise. (do_arg): Likewise. (remember_type): Likewise. (remember_Ktype): Likewise. (register_Btype): Likewise. (string_need): Use XRESIZEVEC instead of xrealloc(). * dyn-string.c (dyn_string_init): Use XNEWVEC. (dyn_string_new): Use XNEW. (dyn_string_resize): Use XRESIZEVEC. * fnmatch.c (fnmatch): Rename local variable "not" to "negate". * getopt.c (getenv): Declare only if !__cplusplus and !getenv. Otherwise include <stdlib.h>. (exchange): Cast return value of malloc(). * hashtab.c (htab_size): Define as both macro and non-inline function. (htab_elements): Likewise. * getpwd.c (getpwd): Use XNEWVEC. (htab_create_alloc_ex): Use C90 prototype-style. * lrealpath.c (lrealpath): Appropriately cast return value of malloc(). * make-relative-prefix.c (save_string): Likewise. * make-temp-file.c (try_dir): Rename from "try". Adjust use in the file. (choose_tmpdir): Use XNEWVEC. * mkstemps.c (mkstemps): Rename parameter "template" to "pattern". * pex-common.c (pex_init_common): Use XNEW. (pex_add_remove): Use XRESIZEVEC. (pex_run): Likewise. (pex_get_status_and_time): Likewise. * pex-djgpp.c (pex_djgpp_exec_child): Likewise. * pex-msdos.c (pex_init): Use XNEW. (pex_msdos_exec_child): Likewise. (pex_msdos_exec_child): Use XRESIZEVEC. * pex-unix.c (pex_wait): Use XNEW. * pex-win32.c (fix_argv): Use XNEWVEC. * pexecute.c (pwait): Likewise. * setenv.c (setenv): Properly cast return value of malloc(). * sigsetmask.c (sigsetmask): Rename local variables "old" and "new" to "old_sig" and "new_sig". * sort.c (main): Use XNEWVEC. * spaces.c (spaces): Cast return value of malloc(). * strndup.c (strndup): Likewise. * ternary.c (ternary_insert): Use XNEW. * xmalloc.c (malloc, realloc, calloc, sbrk): Surround declaration with an extern "C" block if __cplusplus. * xstrdup.c (xstrdup): Cast return value of memcpy(). * xstrerror.c (strerror): Enclose declaration in an extern "C" block if __cplusplus. * xstrndup.c (xstrndup): Use XNEW. Cast return value of memcpy(). From-SVN: r100115
2005-03-28ternary.h: Don't use PARAMS anymore.Gabriel Dos Reis
include/ 2005-03-27 Gabriel Dos Reis <gdr@integreable-solutions.net> * ternary.h: Don't use PARAMS anymore. libiberty/ 2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to use ISO C prototype style 6/n. * strerror.c (init_error_tables, errno_max, strerror, strerrno, strtoerrno, main): Use ISO C prototype style. * strncasecmp.c (strncasecmp): Likewise. * strncmp.c (strncmp): Likewise. * strndup.c (strndup): Likewise. * strrchr.c (strrchr): Likewise. * strsignal.c (init_signal_tables, signo_max, strsignal, strsigno, strtosigno, psignal, main): Likewise. * strstr.c (strstr): Likewise. * strtod.c (strtod, atof): Likewise. * strtol.c (strtol): Likewise. * strtoul.c (strtoul): Likewise. * ternary.c (ternary_insert, ternary_cleanup, ternary_search, ternary_recursivesearch): Likewise. * tmpnam.c (tmpnam): Likewise. * unlink-if-ordinary.c (unlink_if_ordinary): Likewise. * vasprintf.c (int_vasprintf, vasprintf, checkit, main): Likewise. * vfork.c (vfork): Likewise. * vfprintf.c (vfprintf): Likewise. * vprintf.c (vprintf): Likewise. * vsnprintf.c (vsnprintf, checkit, main): Likewise. * vsprintf.c (vsprintf): Likewise. * waitpid.c (waitpid): Likewise. * xatexit.c (xatexit, xatexit_cleanup): Likewise. * xexit.c (xexit): Likewise. * xmalloc.c (xmalloc_set_program_name, xmalloc_failed, xmalloc, xcalloc, xrealloc): Likewise. * xmemdup.c (xmemdup): Likewise. * xstrdup.c (xstrdup): Likewise. * xstrerror.c (xstrerror): Likewise. * xstrndup.c (xstrndup): Likewise. From-SVN: r97122
2004-11-20objalloc.c, [...]: Include "config.h" before "ansidecl.h" to avoid ↵Roger Sayle
redeclaration errors with... * objalloc.c, strsignal.c, xstrerror.c: Include "config.h" before "ansidecl.h" to avoid redeclaration errors with native compilers. * regex.c: Protect config.h from multiple inclusion. From-SVN: r90954
2001-10-07alloca.c, [...]: Improve manual formatting.Joseph Myers
* alloca.c, clock.c, getcwd.c, getpagesize.c, getpwd.c, index.c, libiberty.texi, memchr.c, putenv.c, rindex.c, strchr.c, strdup.c, strerror.c, strrchr.c, strstr.c, strtod.c, tmpnam.c, vfork.c, xatexit.c, xmalloc.c, xstrerror.c: Improve manual formatting. Fix spelling. Give names to function arguments in documentation. Use (void) prototypes in documentation. * functions.texi: Regenerate. From-SVN: r46068
2001-09-26configure.in (MAKEINFO, PERL): Detect these.DJ Delorie
* configure.in (MAKEINFO, PERL): Detect these. (--enable-maintainer-mode): Add. * configure: Regenerate. * Makefile.in (MAKEINFO, PERL): Define. (libiberty.info, libiberty.dvi, libiberty.html): New. (CFILES): Add bsearch.c. (CONFIGURED_OFILES): New, list of objects configure might add. (maint-missing, maint-buildall): New, for maintainers only. (clean, mostlyclean): Add info/dvi/html files. * libiberty.texi, copying-lib.texi, obstacks.texi, functions.texi: New. * gather-docs: New, for maintainers. * maint-tool: New, for maintainers. * alloca.c, atexit.c, basename.c, bcmp.c, bcopy.c, bsearch.c, bzero.c, calloc.c, clock.c, configure.in, configure, getcwd.c, getpagesize.c, getpwd.c, index.c, memchr.c, memcmp.c, memcpy.c, memmove.c, memset.c, putenv.c, rename.c, rindex.c, setenv.c, sigsetmask.c, strcasecmp.c, strchr.c, strdup.c, strerror.c, strncasecmp.c, strncmp.c, strrchr.c, strstr.c, strtod.c, strtol.c, tmpnam.c, vfork.c, vprintf.c, waitpid.c, xatexit.c, xexit.c, xmalloc.c, xmemdup.c, xstrdup.c, xstrerror.c: Add or update documentation. Co-Authored-By: Phil Edwards <pedwards@disaster.jaj.com> From-SVN: r45828
1997-08-21Initial revisionJason Merrill
From-SVN: r14877