Mercurial > hg > octave-lyh > gnulib-hg
changeset 7602:adf3720ff325
Avoid name mangling in C++ mode.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 06 Nov 2006 12:55:16 +0000 |
parents | 144308705998 |
children | 23f14c284219 |
files | ChangeLog lib/c-ctype.h lib/fwriteerror.h lib/gcd.h lib/linebreak.h |
diffstat | 5 files changed, 47 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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):
--- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -27,6 +27,11 @@ #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 @@ #endif /* optimizing for speed */ + +#ifdef __cplusplus +} +#endif + #endif /* C_CTYPE_H */
--- a/lib/fwriteerror.h +++ b/lib/fwriteerror.h @@ -40,6 +40,10 @@ #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 @@ /* 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
--- 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 @@ -19,7 +19,17 @@ #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 */
--- a/lib/linebreak.h +++ b/lib/linebreak.h @@ -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 @@ #include <stddef.h> +#ifdef __cplusplus +extern "C" { +#endif + + /* Display width. */ /* These functions are locale dependent. The encoding argument identifies @@ -100,4 +105,9 @@ char *p); +#ifdef __cplusplus +} +#endif + + #endif /* _LINEBREAK_H */