From 8da3e21131d02b62660a17e31438261c31cdfce7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 2 Jun 2013 11:52:41 -0700 Subject: [PATCH] sig2str: port to C++ * lib/sig2str.h (sig2str, str2sig): Declare as extern "C". Reported by Daniel J Sebald in . --- ChangeLog | 7 +++++++ lib/sig2str.h | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index d251b379d..e8b9dfee7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-06-02 Paul Eggert + + sig2str: port to C++ + * lib/sig2str.h (sig2str, str2sig): Declare as extern "C". + Reported by Daniel J Sebald in + . + 2013-05-30 Eric Blake docs: mention cygwin shortcoming in diff --git a/lib/sig2str.h b/lib/sig2str.h index d16be98c0..df6bfd39e 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h @@ -27,9 +27,17 @@ /* 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. */ -- 2.11.0