From 712a53cf35233ffd9ae8316821416e6ff37184bb Mon Sep 17 00:00:00 2001 From: Claus-Justus Heine <Claus-Justus.Heine@IANS.Uni-Stuttgart.DE> Date: Fri, 18 Jan 2008 12:40:58 +0000 Subject: [PATCH] Make sure this beast also compiles on non-GNU systems. --- gnu-compat/obstack.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu-compat/obstack.c b/gnu-compat/obstack.c index 75440d9..25d0b50 100644 --- a/gnu-compat/obstack.c +++ b/gnu-compat/obstack.c @@ -105,12 +105,17 @@ void (*obstack_alloc_failed_handler) (void) = print_and_abort; /* Exit value used when `print_and_abort' is used. */ # include <stdlib.h> + +#if 0 # ifdef _LIBC int obstack_exit_failure = EXIT_FAILURE; # else # include "exitfail.h" # define obstack_exit_failure exit_failure # endif +#else +int obstack_exit_failure = 1; +#endif # ifdef _LIBC # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) @@ -400,6 +405,8 @@ _obstack_memory_used (struct obstack *h) return nbytes; } + +#if 0 /* Define the error handler. */ # ifdef _LIBC # include <libintl.h> @@ -409,6 +416,11 @@ _obstack_memory_used (struct obstack *h) # ifndef _ # define _(msgid) gettext (msgid) # endif +#else +# ifndef _ +# define _(msgid) msgid +# endif +#endif # ifdef _LIBC # include <libio/iolibio.h> -- GitLab