From 7c58479500f1caf6085662ead8702cf06127deb0 Mon Sep 17 00:00:00 2001
From: Peter Williams <peter@newton.cx>
Date: Mon, 3 Sep 2018 17:54:36 -0400
Subject: [PATCH 7/8] Add missing 'extern "C"' protectors

Various files are missing 'extern "C"' blocks around C declarations.

The context here is that on Windows, some files are compiled as C++ code even
though they're written as pretty much straight C. The motivation seems to be
that MSVC doesn't fully support C99 or C11, specifically non-constant
initializers. But C++ allows this, so the code will come out fine if compiled
as C++. However, without proper 'extern "C"' protection, you get linkage
errors.
---
 gettext-tools/src/plural-table.h      | 8 ++++++++
 
diff --git a/gettext-tools/src/plural-table.h b/gettext-tools/src/plural-table.h
index e6c52bb..d736ef0 100644
--- a/gettext-tools/src/plural-table.h
+++ b/gettext-tools/src/plural-table.h
@@ -20,6 +20,10 @@
 
 #include <stddef.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct plural_table_entry
 {
   const char *lang;
@@ -30,4 +34,8 @@ struct plural_table_entry
 extern DLL_VARIABLE struct plural_table_entry plural_table[];
 extern DLL_VARIABLE const size_t plural_table_size;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _PLURAL_TABLE_H */
