bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/1] c-stack: Adapt header file for use in C++ applications.


From: Marc Nieper-Wißkirchen
Subject: [PATCH 1/1] c-stack: Adapt header file for use in C++ applications.
Date: Sat, 8 Jan 2022 11:57:28 +0100

* lib/c-stack.h: Add extern "C" block.
---
 ChangeLog     | 5 +++++
 lib/c-stack.h | 8 ++++++++
 2 files changed, 13 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ad525f531..64d70fd41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
+
+       c-stack: Adapt header file for use in C++ applications.
+       * lib/c-stack.h: Add extern "C" block.
+
 2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
 
        version-etc: Adapt header file for use in C++ applications.
diff --git a/lib/c-stack.h b/lib/c-stack.h
index 883d5f3ed..431450a05 100644
--- a/lib/c-stack.h
+++ b/lib/c-stack.h
@@ -15,6 +15,10 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
 
 /* Set up ACTION so that it is invoked on C stack overflow and on other,
    stack-unrelated, segmentation violation.
@@ -47,3 +51,7 @@
    signal or exercise other system dependent exception handling APIs.  */
 
 extern int c_stack_action (_GL_ASYNC_SAFE void (* /*action*/) (int));
+
+# ifdef __cplusplus
+}
+# endif
-- 
2.32.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]