summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-08 16:34:31 +0100
committerBruno Haible <bruno@clisp.org>2019-12-08 16:34:31 +0100
commit6211959993db9fa9d3c1573bb5008e0dd7d9cf89 (patch)
treea0d719dd6da11e7649f35790ff653293946846e1
parent8a54f8f14612639467bdd67d19137e4e46d38b15 (diff)
downloadgnulib-6211959993db9fa9d3c1573bb5008e0dd7d9cf89.tar.gz
gnulib-6211959993db9fa9d3c1573bb5008e0dd7d9cf89.tar.bz2
Fix compilation error in C++ mode on OpenBSD.
* lib/signal.in.h (signal): Declare on OpenBSD.
-rw-r--r--ChangeLog5
-rw-r--r--lib/signal.in.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5653d9e780..f091cf0d3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2019-12-08 Bruno Haible <bruno@clisp.org>
+ Fix compilation error in C++ mode on OpenBSD.
+ * lib/signal.in.h (signal): Declare on OpenBSD.
+
+2019-12-08 Bruno Haible <bruno@clisp.org>
+
math tests: Don't fail if isfinite, isinf, isnan, signbit is a macro.
* tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Use #warning
instead of #error.
diff --git a/lib/signal.in.h b/lib/signal.in.h
index b4e432d7fe..5b36c25007 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -322,6 +322,12 @@ _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t,
_GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t,
(int sig, _gl_function_taking_int_returning_void_t func));
# else
+/* On OpenBSD, the declaration of 'signal' may not be present at this point,
+ because it occurs in <sys/signal.h>, not <signal.h> directly. */
+# if defined __OpenBSD__
+_GL_FUNCDECL_SYS (signal, _gl_function_taking_int_returning_void_t,
+ (int sig, _gl_function_taking_int_returning_void_t func));
+# endif
_GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
(int sig, _gl_function_taking_int_returning_void_t func));
# endif

Return to:

Send suggestions and report system problems to the System administrator.