From 128deeae81a6f802bfb79b8f0fa8c4b10729f7db Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Thu, 25 Feb 2016 20:27:59 +0100
Subject: cxxabi.h is not specific to GCC

Change-Id: Icaf4d4d41a36ae469f826ac08ab641a554dff3c9
---
 bridges/source/cpp_uno/gcc3_linux_intel/share.hxx  |  8 ++++----
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx |  8 ++++----
 config_host/config_cxxabi.h.in                     | 19 +++++++++++++++++++
 config_host/config_gcc.h.in                        | 19 -------------------
 configure.ac                                       |  8 ++++----
 5 files changed, 31 insertions(+), 31 deletions(-)
 create mode 100644 config_host/config_cxxabi.h.in
 delete mode 100644 config_host/config_gcc.h.in

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
index bf9c501013fb..f97e81e419eb 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
@@ -29,7 +29,7 @@
 #endif
 #include <unwind.h>
 
-#include "config_gcc.h"
+#include "config_cxxabi.h"
 #include <uno/any2.h>
 #include "uno/mapping.h"
 
@@ -80,17 +80,17 @@ struct __cxa_eh_globals
 // __cxa_allocate_exception and __cxa_throw, though they do not have the
 // additional problem of an incompletely declared return type:
 
-#if !HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS
+#if !HAVE_CXXABI_H_CXA_GET_GLOBALS
 namespace __cxxabiv1 { extern "C" void * __cxa_get_globals() throw(); }
 #endif
 
-#if !HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION
+#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION
 namespace __cxxabiv1 {
 extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw();
 }
 #endif
 
-#if !HAVE_GCC_CXXABI_H_CXA_THROW
+#if !HAVE_CXXABI_H_CXA_THROW
 namespace __cxxabiv1 {
 extern "C" void __cxa_throw(
     void * thrown_exception, void * tinfo, void (* dest)(void *))
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index 096c7d49e81b..19399f35be0a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -29,7 +29,7 @@
 #endif
 #include <unwind.h>
 
-#include "config_gcc.h"
+#include "config_cxxabi.h"
 #include "uno/any2.h"
 #include "uno/mapping.h"
 
@@ -104,17 +104,17 @@ struct __cxa_eh_globals
 // __cxa_allocate_exception and __cxa_throw, though they do not have the
 // additional problem of an incompletely declared return type:
 
-#if !HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS
+#if !HAVE_CXXABI_H_CXA_GET_GLOBALS
 namespace __cxxabiv1 { extern "C" void * __cxa_get_globals() throw(); }
 #endif
 
-#if !HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION
+#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION
 namespace __cxxabiv1 {
 extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw();
 }
 #endif
 
-#if !HAVE_GCC_CXXABI_H_CXA_THROW
+#if !HAVE_CXXABI_H_CXA_THROW
 namespace __cxxabiv1 {
 extern "C" void __cxa_throw(
     void * thrown_exception, void * tinfo, void (* dest)(void *))
diff --git a/config_host/config_cxxabi.h.in b/config_host/config_cxxabi.h.in
new file mode 100644
index 000000000000..e3bb801d0469
--- /dev/null
+++ b/config_host/config_cxxabi.h.in
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef CONFIG_CXXABI_H
+#define CONFIG_CXXABI_H
+
+#define HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION 0
+#define HAVE_CXXABI_H_CXA_GET_GLOBALS 0
+#define HAVE_CXXABI_H_CXA_THROW 0
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/config_host/config_gcc.h.in b/config_host/config_gcc.h.in
deleted file mode 100644
index c9571794d01e..000000000000
--- a/config_host/config_gcc.h.in
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef CONFIG_GCC_H
-#define CONFIG_GCC_H
-
-#define HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION 0
-#define HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS 0
-#define HAVE_GCC_CXXABI_H_CXA_THROW 0
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configure.ac b/configure.ac
index 78253497f883..1043c9fd60ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6047,7 +6047,7 @@ if test "$GCC" = "yes"; then
             #include <cxxabi.h>
             void * f() { return __cxxabiv1::__cxa_allocate_exception(0); }
         ])], [
-            AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
+            AC_DEFINE([HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
             AC_MSG_RESULT([yes])
         ], [AC_MSG_RESULT([no])])
     AC_LANG_POP([C++])
@@ -6058,7 +6058,7 @@ if test "$GCC" = "yes"; then
             #include <cxxabi.h>
             void * f() { return __cxxabiv1::__cxa_get_globals(); }
         ])], [
-            AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS],[1])
+            AC_DEFINE([HAVE_CXXABI_H_CXA_GET_GLOBALS],[1])
             AC_MSG_RESULT([yes])
         ], [AC_MSG_RESULT([no])])
     AC_LANG_POP([C++])
@@ -6069,7 +6069,7 @@ if test "$GCC" = "yes"; then
             #include <cxxabi.h>
             void f() { __cxxabiv1::__cxa_throw(0, 0, 0); }
         ])], [
-            AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_THROW],[1])
+            AC_DEFINE([HAVE_CXXABI_H_CXA_THROW],[1])
             AC_MSG_RESULT([yes])
         ], [AC_MSG_RESULT([no])])
     AC_LANG_POP([C++])
@@ -12855,10 +12855,10 @@ AC_CONFIG_HEADERS([config_host/config_eot.h])
 AC_CONFIG_HEADERS([config_host/config_extension_update.h])
 AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
 AC_CONFIG_HEADERS([config_host/config_cups.h])
+AC_CONFIG_HEADERS([config_host/config_cxxabi.h])
 AC_CONFIG_HEADERS([config_host/config_dbus.h])
 AC_CONFIG_HEADERS([config_host/config_features.h])
 AC_CONFIG_HEADERS([config_host/config_folders.h])
-AC_CONFIG_HEADERS([config_host/config_gcc.h])
 AC_CONFIG_HEADERS([config_host/config_gio.h])
 AC_CONFIG_HEADERS([config_host/config_global.h])
 AC_CONFIG_HEADERS([config_host/config_graphite.h])
-- 
cgit