[mapcode] 01/07: wrap header file in extern C scope
Stefan Fritsch
sf at moszumanska.debian.org
Wed Nov 2 23:27:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to tag v2.0.2.1
in repository mapcode.
commit 29396f045e389094a6700ad94e80120e4955d2ab
Author: Paul Joyce <joycepg at hotmail.com>
Date: Thu Aug 13 13:45:38 2015 +1000
wrap header file in extern C scope
C functions need to be included within extern "C" { } to avoid the compiler mangling the names.
__cplusplus is always defined by C++ compilers.
---
mapcodelib/mapcoder.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/mapcodelib/mapcoder.h b/mapcodelib/mapcoder.h
index ac77e81..24613f0 100644
--- a/mapcodelib/mapcoder.h
+++ b/mapcodelib/mapcoder.h
@@ -13,6 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define mapcode_cversion "2.0.2"
#define UWORD unsigned short int // 2-byte unsigned integer.
@@ -314,3 +319,7 @@ const UWORD *encodeToAlphabet(const char *string, int alphabet);
#define MAPCODE_LANGUAGE_BENGALI MAPCODE_ALPHABET_BENGALI
#define MAPCODE_LANGUAGE_GURMUKHI MAPCODE_ALPHABET_GURMUKHI
#define MAPCODE_LANGUAGE_TIBETAN MAPCODE_ALPHABET_TIBETAN
+
+#ifdef __cplusplus
+}
+#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapcode.git
More information about the Pkg-grass-devel
mailing list