Avoid name mangling in C++ mode.
authorBruno Haible <bruno@clisp.org>
Mon, 6 Nov 2006 12:55:16 +0000 (12:55 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 6 Nov 2006 12:55:16 +0000 (12:55 +0000)
ChangeLog
lib/c-ctype.h
lib/fwriteerror.h
lib/gcd.h
lib/linebreak.h

index 3dc6ed0..1745382 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-11-03  Bruno Haible  <bruno@clisp.org>
+
+       * lib/c-ctype.h [C++]: Define functions without name mangling.
+       * lib/fwriteerror.h [C++]: Likewise.
+       * lib/gcd.h [C++]: Likewise.
+       * lib/linebreak.h [C++]: Likewise.
+
 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
index 395c7a1..b26eccf 100644 (file)
@@ -27,6 +27,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 #include <stdbool.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* The functions defined in this file assume the "C" locale and a character
    set without diacritics (ASCII-US or EBCDIC-US or something like that).
    Even if the "C" locale on a particular system is an extension of the ASCII
@@ -267,4 +272,9 @@ extern int c_toupper (int c);
 
 #endif /* optimizing for speed */
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* C_CTYPE_H */
index ebbe1be..24d8e0a 100644 (file)
 
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Write out the not yet written buffered contents of the stream FP, close
    the stream FP, and test whether some error occurred on the stream FP.
    FP must be a stream opened for writing.
@@ -53,3 +57,7 @@ extern int fwriteerror (FILE *fp);
 /* Likewise, but don't consider it an error if FP has an invalid file
    descriptor and no output was done to FP.  */
 extern int fwriteerror_no_ebadf (FILE *fp);
+
+#ifdef __cplusplus
+}
+#endif
index 6fbaf82..cf2b7fd 100644 (file)
--- a/lib/gcd.h
+++ b/lib/gcd.h
@@ -1,5 +1,5 @@
 /* Arithmetic.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #ifndef _GCD_H
 #define _GCD_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Return the greatest common divisor of a > 0 and b > 0.  */
 extern unsigned long gcd (unsigned long a, unsigned long b);
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _GCD_H */
index 56d8b1e..4a27aab 100644 (file)
@@ -1,5 +1,5 @@
 /* linebreak.h - line breaking of Unicode strings
-   Copyright (C) 2001-2003 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
 This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 #include <stddef.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Display width.  */
 
 /* These functions are locale dependent.  The encoding argument identifies
@@ -100,4 +105,9 @@ extern int
                              char *p);
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _LINEBREAK_H */