Bug 798156 - glib 2.68.0 breaks gnucash

Move all of the #include <glib> to before the extern "C" blocks
so that the include guards will protect against headers inside
the extern "C" block also including glib.h.
This commit is contained in:
John Ralls
2021-04-20 11:03:23 -07:00
parent 40e005d963
commit bbb4113a5a
49 changed files with 106 additions and 82 deletions

View File

@@ -22,6 +22,8 @@
* *
*******************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -34,7 +36,6 @@ extern "C"
#include "qof.h"
}
#include <glib.h>
#include <stdint.h>
#include <boost/regex.hpp>
#include <boost/locale/encoding_utf.hpp>

View File

@@ -25,6 +25,7 @@
* Author: Linas Vepstas (linas@linas.org) *
* Author: Phil Longstaff (phil.longstaff@yahoo.ca) *
\********************************************************************/
#include <glib.h>
extern "C"
{
@@ -36,8 +37,6 @@ extern "C"
#include "qof.h"
}
#include <glib.h>
/* Uncomment if you need to log anything.
static QofLogModule log_module = QOF_MOD_UTIL;
*/

View File

@@ -32,6 +32,7 @@
* Copyright (c) 2000 Dave Peticolas
* Copyright (c) 2007 David Hampton <hampton@employees.org>
*/
#include <glib.h>
extern "C"
{
@@ -49,7 +50,6 @@ extern "C"
}
#include <glib.h>
#include "qof.h"
#include "qofevent-p.h"
#include "qofbackend.h"

View File

@@ -22,13 +22,14 @@
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
#include <string.h>
}
#include <glib.h>
#include "qof.h"
#include "qofid-p.h"
#include "qofinstance-p.h"

View File

@@ -24,6 +24,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
*/
#include <glib.h>
#include <glib/gstdio.h>
extern "C"
{
@@ -48,8 +50,6 @@ extern "C"
}
#include <glib.h>
#include <glib/gstdio.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "qof.log"
#include "qof.h"

View File

@@ -20,6 +20,7 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
@@ -31,7 +32,6 @@ extern "C"
#include <string.h>
}
#include <glib.h>
#include "qof.h"
#include "qof-backend.hpp"
#include "qofbook-p.h"

View File

@@ -31,6 +31,7 @@
@author Copyright (c) 2005 Neil Williams <linux@codehelp.co.uk>
@author Copyright (c) 2016 Aaron Laws
*/
#include <glib.h>
extern "C"
{
@@ -54,7 +55,6 @@ extern "C"
static QofLogModule log_module = QOF_MOD_SESSION;
} //extern 'C'
#include <glib.h>
#include "qofbook-p.h"
#include "qof-backend.hpp"
#include "qofsession.hpp"