diff mbox

Fix PR 55473

Message ID CABG-yt3erpfVr-R1bkLZ87mX6jHPd4o16zDZW3st=G0TTuOcoA@mail.gmail.com
State New
Headers show

Commit Message

Shakthi Kannan March 6, 2013, 7:44 a.m. UTC
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 <shakthimaan@gmail.com>

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

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

Comments

Jakub Jelinek March 7, 2013, 7:53 a.m. UTC | #1
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 <shakthimaan@gmail.com>
> 
>     PR libquadmath/55473
>     * quadmath.h: Add ifdef __cplusplus macros.

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

	Jakub
diff mbox

Patch

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