bug-gnulib
[Top][All Lists]
Advanced

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

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


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

* lib/version-etc.h: Add extern "C" block.
---
 ChangeLog         | 5 +++++
 lib/version-etc.h | 9 +++++++++
 2 files changed, 14 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 60ca624f1..ad525f531 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
+
+       version-etc: Adapt header file for use in C++ applications.
+       * lib/version-etc.h: Add extern "C" block.
+
 2022-01-07  Bruno Haible  <bruno@clisp.org>
 
        sigsegv: Improve support for Linux/LoongArch64.
diff --git a/lib/version-etc.h b/lib/version-etc.h
index 93fbdca42..c6b4eef4b 100644
--- a/lib/version-etc.h
+++ b/lib/version-etc.h
@@ -22,6 +22,11 @@
 # include <stdarg.h>
 # include <stdio.h>
 
+# ifdef __cplusplus
+extern "C"
+{
+# endif
+
 extern const char version_etc_copyright[];
 
 /* The three functions below display the --version information in the
@@ -66,4 +71,8 @@ extern void version_etc (FILE *stream,
 /* Display the usual "Report bugs to" stanza.  */
 extern void emit_bug_reporting_address (void);
 
+# ifdef __cplusplus
+}
+# endif
+
 #endif /* VERSION_ETC_H */
-- 
2.32.0




reply via email to

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