From aec380cbe57180b290e6cff4a3d37c9b23c1e853 Mon Sep 17 00:00:00 2001
From: Tommi Rantala <tt.rantala@gmail.com>
Date: Fri, 10 Jul 2009 21:44:31 +0300
Subject: [PATCH 24/25] libfiu: make headers usable from C++

Instruct C++ compilers not to mangle libfiu symbols.

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
---
 libfiu/fiu-control.h |   14 ++++++++++++++
 libfiu/fiu.h         |    9 +++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/libfiu/fiu-control.h b/libfiu/fiu-control.h
index c1859ee..30ed4f1 100644
--- a/libfiu/fiu-control.h
+++ b/libfiu/fiu-control.h
@@ -1,4 +1,11 @@
 
+#ifndef _FIU_CONTROL_H
+#define _FIU_CONTROL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Control API for libfiu
  */
@@ -66,3 +73,10 @@ int fiu_disable(const char *name);
  * - returns: 0 on success, -1 on errors. */
 int fiu_rc_fifo(const char *basename);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _FIU_CONTROL_H
+
diff --git a/libfiu/fiu.h b/libfiu/fiu.h
index 645c456..ea35cd6 100644
--- a/libfiu/fiu.h
+++ b/libfiu/fiu.h
@@ -15,6 +15,11 @@
 /* Controls whether the external code enables libfiu or not. */
 #ifdef FIU_ENABLE
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Initializes the library.
  *
  * - flags: unused.
@@ -50,6 +55,10 @@ void *fiu_failinfo(void);
 #define fiu_return_on(name, retval) fiu_do_on(name, return retval)
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #else
 /* fiu not enabled, this should match fiu-local.h but we don't include it
  * because it includes us assuming we're installed system-wide */
-- 
1.6.2.2.646.gb214

