summaryrefslogtreecommitdiff
path: root/include/libiberty.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-22 08:32:26 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-22 08:32:26 +0000
commitec25516353caa85f02127114006b85c8d3860c54 (patch)
tree2a1d2ae9f91d97732b595daf55f5397c013d1d7b /include/libiberty.h
parent7534b8df903c3a7ad66e497e2de2d64363220124 (diff)
downloadgcc-ec25516353caa85f02127114006b85c8d3860c54.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37650 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/libiberty.h')
-rw-r--r--include/libiberty.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/libiberty.h b/include/libiberty.h
index e6eb34739ce..64d072be392 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -16,6 +16,13 @@ extern "C" {
#include "ansidecl.h"
+#ifdef ANSI_PROTOTYPES
+/* Get a definition for size_t. */
+#include <stddef.h>
+/* Get a definition for va_list. */
+#include <stdarg.h>
+#endif
+
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
@@ -130,16 +137,13 @@ extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN;
extern void xmalloc_set_program_name PARAMS ((const char *));
+/* Report an allocation failure. */
+extern void xmalloc_failed PARAMS ((size_t)) ATTRIBUTE_NORETURN;
+
/* Allocate memory without fail. If malloc fails, this will print a
message to stderr (using the name set by xmalloc_set_program_name,
if any) and then call xexit. */
-#ifdef ANSI_PROTOTYPES
-/* Get a definition for size_t. */
-#include <stddef.h>
-/* Get a definition for va_list. */
-#include <stdarg.h>
-#endif
extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC;
/* Reallocate memory without fail. This works like xmalloc. Note,