Re: [PATCH] Fix PR 55473

2013-03-06 Thread Jakub Jelinek
On Wed, Mar 06, 2013 at 01:14:45PM +0530, Shakthi Kannan wrote:
 The libquadmath/quadmath.h file cannot be used with C++. The
 following patch allows inclusion and use of the quadmath.h header
 file.
 
 2013-03-06 Shakthi Kannan shakthim...@gmail.com
 
 PR libquadmath/55473
 * quadmath.h: Add ifdef __cplusplus macros.

Thanks, committed (with different ChangeLog entry, both for formatting
and description).

Jakub


[PATCH] Fix PR 55473

2013-03-05 Thread Shakthi Kannan
The libquadmath/quadmath.h file cannot be used with C++. The
following patch allows inclusion and use of the quadmath.h header
file.

2013-03-06 Shakthi Kannan shakthim...@gmail.com

PR libquadmath/55473
* quadmath.h: Add ifdef __cplusplus macros.

---
 libquadmath/quadmath.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/libquadmath/quadmath.h b/libquadmath/quadmath.h
index 863fe44..aa9ef51 100644
--- a/libquadmath/quadmath.h
+++ b/libquadmath/quadmath.h
@@ -23,6 +23,10 @@ Boston, MA 02110-1301, USA.  */

 #include stdlib.h

+#ifdef __cplusplus
+extern C {
+#endif
+
 /* Define the complex type corresponding to __float128
(_Complex __float128 is not allowed) */
 typedef _Complex float __attribute__((mode(TC))) __complex128;
@@ -189,4 +193,8 @@ __quadmath_nth (conjq (__complex128 __z))
   return __extension__ ~__z;
 }

+#ifdef __cplusplus
+}
+#endif
+
 #endif
-- 
1.7.11.7