bug-gnulib
[Top][All Lists]
Advanced

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

C++ support (6)


From: Bruno Haible
Subject: C++ support (6)
Date: Mon, 6 Nov 2006 14:38:31 +0100
User-agent: KMail/1.9.1

To avoid C++ name mangling of the exported symbols, I applied this.

2006-11-03  Bruno Haible  <address@hidden>

        * 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.

diff -r -c3 gnulib-20061026/lib/c-ctype.h gnulib-20061026-modified/lib/c-ctype.h
*** gnulib-20061026/lib/c-ctype.h       2006-10-11 03:31:51.000000000 +0200
--- gnulib-20061026-modified/lib/c-ctype.h      2006-10-30 00:42:37.000000000 
+0100
***************
*** 27,32 ****
--- 27,37 ----
  #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,270 ****
--- 272,280 ----
  
  #endif /* optimizing for speed */
  
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif /* C_CTYPE_H */
diff -r -c3 --exclude=CVS gnulib-20061026/lib/fwriteerror.h 
gnulib-20061026-modified/lib/fwriteerror.h
*** gnulib-20061026/lib/fwriteerror.h   2006-10-07 01:01:48.000000000 +0200
--- gnulib-20061026-modified/lib/fwriteerror.h  2006-10-30 00:43:05.000000000 
+0100
***************
*** 40,45 ****
--- 40,49 ----
  
  #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,55 ****
--- 57,63 ----
  /* 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
diff -r -c3 --exclude=CVS gnulib-20061026/lib/gcd.h 
gnulib-20061026-modified/lib/gcd.h
*** gnulib-20061026/lib/gcd.h   2005-05-14 08:03:58.000000000 +0200
--- gnulib-20061026-modified/lib/gcd.h  2006-10-30 00:41:46.000000000 +0100
***************
*** 1,5 ****
  /* Arithmetic.
!    Copyright (C) 2001-2002 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2001.
  
     This program is free software; you can redistribute it and/or modify
--- 1,5 ----
  /* Arithmetic.
!    Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2001.
  
     This program is free software; you can redistribute it and/or modify
***************
*** 19,25 ****
--- 19,35 ----
  #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 */
diff -r -c3 --exclude=CVS gnulib-20061026/lib/linebreak.h 
gnulib-20061026-modified/lib/linebreak.h
*** gnulib-20061026/lib/linebreak.h     2006-07-22 17:27:55.000000000 +0200
--- gnulib-20061026-modified/lib/linebreak.h    2006-10-30 01:01:02.000000000 
+0100
***************
*** 1,5 ****
  /* linebreak.h - line breaking of Unicode strings
!    Copyright (C) 2001-2003 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2001.
  
  This program is free software; you can redistribute it and/or modify
--- 1,5 ----
  /* linebreak.h - line breaking of Unicode strings
!    Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2001.
  
  This program is free software; you can redistribute it and/or modify
***************
*** 23,28 ****
--- 23,33 ----
  #include <stddef.h>
  
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
  /* Display width.  */
  
  /* These functions are locale dependent.  The encoding argument identifies
***************
*** 100,103 ****
--- 105,113 ----
                               char *p);
  
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 
  #endif /* _LINEBREAK_H */




reply via email to

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