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

@@ -25,6 +25,9 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL db using libdbi
*/
#include <glib.h>
#include <glib/gstdio.h>
extern "C"
{
#include "config.h"
@@ -59,9 +62,6 @@ extern "C"
}
#include <glib.h>
#include <glib/gstdio.h>
#include <boost/regex.hpp>
#include <string>
#include <iomanip>

View File

@@ -27,6 +27,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL database
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -35,8 +37,6 @@ extern "C"
#include "gncAddress.h"
}
#include <glib.h>
#include <cstdlib>
#include <cstring>
#include <sstream>

View File

@@ -25,6 +25,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL db
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -40,8 +42,6 @@ extern "C"
#endif
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"
#include "gnc-sql-object-backend.hpp"

View File

@@ -27,6 +27,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL database
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -39,8 +41,6 @@ extern "C"
#include "gncTaxTableP.h"
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"
#include "gnc-sql-object-backend.hpp"

View File

@@ -27,6 +27,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL database
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -37,7 +39,6 @@ extern "C"
#include "gnc-commodity.h"
#include "gncEmployeeP.h"
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"

View File

@@ -27,6 +27,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL database
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -39,7 +41,6 @@ extern "C"
#include "gncInvoiceP.h"
#include "gncTaxTableP.h"
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"

View File

@@ -27,6 +27,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL database
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -36,7 +38,6 @@ extern "C"
#include "gncJobP.h"
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"

View File

@@ -25,6 +25,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL db
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -36,7 +38,6 @@ extern "C"
#include "splint-defs.h"
#endif
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"

View File

@@ -25,6 +25,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL db
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -37,7 +39,6 @@ extern "C"
#include "splint-defs.h"
#endif
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"

View File

@@ -25,6 +25,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL db
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -39,8 +41,6 @@ extern "C"
#endif
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"
#include "gnc-sql-object-backend.hpp"

View File

@@ -27,6 +27,8 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an SQL database
*/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -39,8 +41,6 @@ extern "C"
#include "gncTaxTableP.h"
}
#include <glib.h>
#include "gnc-sql-connection.hpp"
#include "gnc-sql-backend.hpp"
#include "gnc-sql-object-backend.hpp"

View File

@@ -22,6 +22,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -31,8 +33,6 @@ extern "C"
#include <Account.h>
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"
#include "sixtp-utils.h"

View File

@@ -21,13 +21,14 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
#include <stdlib.h>
#include <string.h>
}
#include <glib.h>
#include "gnc-xml-helper.h"

View File

@@ -27,6 +27,10 @@
* This file implements the top-level QofBackend API for saving/
* restoring data to/from an ordinary Unix filesystem file.
*/
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
extern "C"
{
#include <config.h>
@@ -73,10 +77,6 @@ extern "C"
#endif
}
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <gnc-backend-prov.hpp>
#include "gnc-backend-xml.h"
#include <qof-backend.hpp>

View File

@@ -22,6 +22,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -30,8 +32,6 @@ extern "C"
#include "qof.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -20,6 +20,7 @@
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
* Boston, MA 02110-1301, USA gnu@gnu.org
*/
#include <glib.h>
extern "C"
{
@@ -28,8 +29,6 @@ extern "C"
#include <string.h>
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"
#include "sixtp-utils.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -29,8 +31,6 @@ extern "C"
#include "Account.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"
#include "sixtp-utils.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -32,8 +34,6 @@ extern "C"
#include "gncTaxTableP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "gnc-customer-xml-v2.h"
#include "gnc-address-xml-v2.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -28,8 +30,6 @@ extern "C"
#include <string.h>
#include "gncEmployeeP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"
#include "sixtp-utils.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -33,8 +35,6 @@ extern "C"
#include "gncTaxTableP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"
#include "sixtp-utils.h"

View File

@@ -22,6 +22,8 @@
* *
*******************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -30,7 +32,6 @@ extern "C"
#include "SchedXaction.h"
#include "FreqSpec.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -30,7 +32,6 @@ extern "C"
#include "gncBillTermP.h"
#include "gncInvoiceP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -28,7 +30,6 @@ extern "C"
#include <string.h>
#include "gncJobP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -22,6 +22,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -30,7 +32,6 @@ extern "C"
#include "gnc-lot.h"
#include "gnc-lot-p.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -28,7 +30,6 @@ extern "C"
#include <string.h>
#include "gncOrderP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -31,7 +33,6 @@ extern "C"
#include "gncVendorP.h"
#include "gncEmployeeP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -20,6 +20,7 @@
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
* Boston, MA 02110-1301, USA gnu@gnu.org
*/
#include <glib.h>
extern "C"
{
@@ -28,7 +29,6 @@ extern "C"
#include "qof.h"
#include "Recurrence.h"
}
#include <glib.h>
#include "gnc-xml.h"
#include "gnc-xml-helper.h"

View File

@@ -20,6 +20,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
*******************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -27,7 +29,6 @@ extern "C"
#include "SX-book.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -29,7 +31,6 @@ extern "C"
#include "gncEntry.h"
#include "gncTaxTableP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
*******************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -31,7 +33,7 @@ extern "C"
#include "gnc-lot.h"
#include "gnc-lot-p.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -31,7 +33,6 @@ extern "C"
#include "gncTaxTableP.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp.h"
#include "sixtp-utils.h"

View File

@@ -14,6 +14,8 @@
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/
#include <glib.h>
#include <glib/gstdio.h>
extern "C"
{
@@ -36,8 +38,6 @@ extern "C"
}
#include <glib.h>
#include <glib/gstdio.h>
#include <sstream>
#include "gnc-xml-backend.hpp"

View File

@@ -21,6 +21,10 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
extern "C"
{
#include <config.h>
@@ -50,9 +54,6 @@ extern "C"
#endif
}
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include "sixtp.h"
#include "gnc-xml.h"

View File

@@ -18,6 +18,9 @@
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/
#include <glib.h>
#include <glib/gstdio.h>
extern "C"
{
#include <config.h>
@@ -64,9 +67,6 @@ extern "C"
#endif
}
#include <glib.h>
#include <glib/gstdio.h>
#include "gnc-xml-backend.hpp"
#include "sixtp-parsers.h"
#include "sixtp-utils.h"

View File

@@ -21,6 +21,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -28,8 +30,6 @@ extern "C"
#include <stdio.h>
}
#include <glib.h>
#include "gnc-xml.h"
#include "io-utils.h"
#include "sixtp.h"

View File

@@ -20,6 +20,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
********************************************************************/
#include <glib.h>
extern "C"
{
#define __EXTENSIONS__
@@ -28,7 +30,6 @@ extern "C"
#include <gnc-date.h>
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp-dom-generators.h"

View File

@@ -20,6 +20,8 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
********************************************************************/
#include <glib.h>
extern "C"
{
#include <config.h>
@@ -29,7 +31,6 @@ extern "C"
#include <gnc-engine.h>
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "sixtp-utils.h"
#include "sixtp-dom-parsers.h"

View File

@@ -20,6 +20,9 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
********************************************************************/
#include <glib.h>
#include <glib/gstdio.h>
extern "C"
{
#include <config.h>
@@ -34,9 +37,6 @@ extern "C"
#endif
}
#include <glib.h>
#include <glib/gstdio.h>
#include "sixtp.h"
#include "sixtp-parsers.h"
#include "sixtp-stack.h"

View File

@@ -23,6 +23,9 @@
#ifndef SIXTP_H
#define SIXTP_H
#include <glib.h>
extern "C"
{
#include <stdio.h>
@@ -30,7 +33,7 @@ extern "C"
#include <stdarg.h>
#include "gnc-engine.h"
}
#include <glib.h>
#include "gnc-xml-helper.h"
#include "gnc-backend-xml.h"