sig2str: port to C++
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Jun 2013 18:52:41 +0000 (11:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Jun 2013 18:53:07 +0000 (11:53 -0700)
* lib/sig2str.h (sig2str, str2sig): Declare as extern "C".
Reported by Daniel J Sebald in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-06/msg00000.html>.

ChangeLog
lib/sig2str.h

index d251b37..e8b9dfe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-06-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       sig2str: port to C++
+       * lib/sig2str.h (sig2str, str2sig): Declare as extern "C".
+       Reported by Daniel J Sebald in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2013-06/msg00000.html>.
+
 2013-05-30  Eric Blake  <eblake@redhat.com>
 
        docs: mention cygwin shortcoming in <sys/un.h>
index d16be98..df6bfd3 100644 (file)
 /* Size of a buffer needed to hold a signal name like "HUP".  */
 # define SIG2STR_MAX (sizeof "SIGRTMAX" + INT_STRLEN_BOUND (int) - 1)
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int sig2str (int, char *);
 int str2sig (char const *, int *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
 /* An upper bound on signal numbers allowed by the system.  */