From: Bruno Haible Date: Sun, 2 Feb 2020 17:16:55 +0000 (+0100) Subject: xalloc: Fix compilation error in C++ mode on FreeBSD 12. X-Git-Tag: v1.0~4281 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3801e9bb67b733b5e5fabec1362b9e8b99cacc73;p=gnulib.git xalloc: Fix compilation error in C++ mode on FreeBSD 12. * lib/xalloc.h (xalloc_die): Comment out 'extern' keyword before '_Noreturn'. * lib/sigpipe-die.h (sigpipe_die): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 86f8626d68..19238837ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-02-02 Bruno Haible + + xalloc: Fix compilation error in C++ mode on FreeBSD 12. + * lib/xalloc.h (xalloc_die): Comment out 'extern' keyword before + '_Noreturn'. + * lib/sigpipe-die.h (sigpipe_die): Likewise. + 2020-02-02 Pádraig Brady read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX diff --git a/lib/sigpipe-die.h b/lib/sigpipe-die.h index dcb9a4a78e..7fcde8cfc8 100644 --- a/lib/sigpipe-die.h +++ b/lib/sigpipe-die.h @@ -48,7 +48,7 @@ extern "C" { /* Emit an error message indicating a SIGPIPE signal, and terminate the process with an error code. */ -extern _Noreturn void sigpipe_die (void); +/*extern*/ _Noreturn void sigpipe_die (void); /* Install a SIGPIPE handler that invokes PREPARE_DIE and then emits an error message and exits. PREPARE_DIE may be NULL, meaning a no-op. */ diff --git a/lib/xalloc.h b/lib/xalloc.h index 9563b0bc92..19c64acb41 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -48,7 +48,7 @@ extern "C" { or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ -extern _Noreturn void xalloc_die (void); +/*extern*/ _Noreturn void xalloc_die (void); void *xmalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));