gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Thu Dec 3 12:53:12 EST 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/ad17abed (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3b28d5ce (commit)
	from  https://github.com/Gnucash/gnucash/commit/0e7c7c3b (commit)



commit ad17abedccfba9b56b199b6376c173af47e84056
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Dec 3 09:52:15 2015 -0800

    C++ work-arounds for mingw standard C headers applying __STRICT_ANSI__ to POSIX functions.

diff --git a/src/backend/dbi/gnc-backend-dbi.cpp b/src/backend/dbi/gnc-backend-dbi.cpp
index ebb4a41..41fcfb2 100644
--- a/src/backend/dbi/gnc-backend-dbi.cpp
+++ b/src/backend/dbi/gnc-backend-dbi.cpp
@@ -30,6 +30,16 @@ extern "C"
 #include "config.h"
 
 #include <platform.h>
+#ifdef __STRICT_ANSI__
+#undef __STRICT_ANSI__
+#define __STRICT_ANSI_UNSET__ 1
+#endif
+#ifdef _NO_OLDNAMES
+#undef _NO_OLDNAMES
+#endif
+#ifdef _UWIN
+#undef _UWIN
+#endif
 #if PLATFORM(WINDOWS)
 #include <windows.h>
 #endif
@@ -81,6 +91,12 @@ static dbi_inst dbi_instance = NULL;
 #include "gnc-backend-dbi.h"
 #include "gnc-backend-dbi-priv.h"
 
+#if PLATFORM(WINDOWS)
+#ifdef __STRICT_ANSI_UNSET__
+#undef __STRICT_ANSI_UNSET__
+#define __STRICT_ANSI__ 1
+#endif
+#endif
 
 #define GNC_HOST_NAME_MAX 255
 #define TRANSACTION_NAME "trans"
diff --git a/src/backend/xml/io-gncxml-v2.cpp b/src/backend/xml/io-gncxml-v2.cpp
index ce1165b..fdf32aa 100644
--- a/src/backend/xml/io-gncxml-v2.cpp
+++ b/src/backend/xml/io-gncxml-v2.cpp
@@ -24,9 +24,18 @@ extern "C"
 
 #include <platform.h>
 #if PLATFORM(WINDOWS)
+#ifdef __STRICT_ANSI__
+#undef __STRICT_ANSI__
+#define __STRICT_ANSI_UNSET__ 1
+#endif
+#ifdef _NO_OLDNAMES
+#undef _NO_OLDNAMES
+#endif
+#ifdef _UWIN
+#undef _UWIN
+#endif
 #include <windows.h>
 #endif
-
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <fcntl.h>
@@ -45,13 +54,12 @@ extern "C"
 #include "Transaction.h"
 #include "TransactionP.h"
 #include "TransLog.h"
-#ifdef G_OS_WIN32
-# include <io.h>
-# define close _close
-# define fdopen _fdopen
-# define read _read
+#if PLATFORM(WINDOWS)
+#ifdef __STRICT_ANSI_UNSET__
+#undef __STRICT_ANSI_UNSET__
+#define __STRICT_ANSI__ 1
+#endif
 #endif
-#include "platform.h"
 #if COMPILER(MSVC)
 # define g_fopen fopen
 # define g_open _open

commit 3b28d5ce5eefb9a57468965f44bc44f12ea69fc2
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Dec 1 09:38:14 2015 -0800

    Update CMakefile.txt for c->c++ change in backends.

diff --git a/src/backend/dbi/CMakeLists.txt b/src/backend/dbi/CMakeLists.txt
index fcfc05c..9524167 100644
--- a/src/backend/dbi/CMakeLists.txt
+++ b/src/backend/dbi/CMakeLists.txt
@@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/app-utils)
 INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/backend/sql)
 
 SET (libgnc_backend_dbi_SOURCES
-  gnc-backend-dbi.c
+  gnc-backend-dbi.cpp
 )
 SET (libgnc_backend_dbi_HEADERS
   gnc-backend-dbi.h
diff --git a/src/backend/sql/CMakeLists.txt b/src/backend/sql/CMakeLists.txt
index 22381fc..9b421bc 100644
--- a/src/backend/sql/CMakeLists.txt
+++ b/src/backend/sql/CMakeLists.txt
@@ -16,29 +16,29 @@ INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/gnc-module)
 INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/engine)
 
 SET (libgnc_backend_sql_SOURCES
-  gnc-backend-sql.c
-  gnc-account-sql.c
-  gnc-address-sql.c
-  gnc-bill-term-sql.c
-  gnc-book-sql.c
-  gnc-budget-sql.c
-  gnc-commodity-sql.c
-  gnc-customer-sql.c
-  gnc-employee-sql.c
-  gnc-entry-sql.c
-  gnc-invoice-sql.c
-  gnc-job-sql.c
-  gnc-lots-sql.c
-  gnc-order-sql.c
-  gnc-owner-sql.c
-  gnc-price-sql.c
-  gnc-recurrence-sql.c
-  gnc-schedxaction-sql.c
+  gnc-backend-sql.cpp
+  gnc-account-sql.cpp
+  gnc-address-sql.cpp
+  gnc-bill-term-sql.cpp
+  gnc-book-sql.cpp
+  gnc-budget-sql.cpp
+  gnc-commodity-sql.cpp
+  gnc-customer-sql.cpp
+  gnc-employee-sql.cpp
+  gnc-entry-sql.cpp
+  gnc-invoice-sql.cpp
+  gnc-job-sql.cpp
+  gnc-lots-sql.cpp
+  gnc-order-sql.cpp
+  gnc-owner-sql.cpp
+  gnc-price-sql.cpp
+  gnc-recurrence-sql.cpp
+  gnc-schedxaction-sql.cpp
   gnc-slots-sql.cpp
-  gnc-tax-table-sql.c
-  gnc-transaction-sql.c
-  gnc-vendor-sql.c
-  escape.c
+  gnc-tax-table-sql.cpp
+  gnc-transaction-sql.cpp
+  gnc-vendor-sql.cpp
+  escape.cpp
 )
 SET (libgnc_backend_sql_HEADERS
   gnc-account-sql.h
diff --git a/src/backend/xml/CMakeLists.txt b/src/backend/xml/CMakeLists.txt
index db2ae40..54861f0 100644
--- a/src/backend/xml/CMakeLists.txt
+++ b/src/backend/xml/CMakeLists.txt
@@ -15,47 +15,47 @@ INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/libqof/qof)
 INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/core-utils)
 INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/gnc-module)
 INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/engine)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # when building swig-gnc-module.c
+INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # when building swig-gnc-module.cpp
 
-# Command to generate the swig-engine.c wrapper file
-SET (SWIG_GNC_MODULE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnc-module.c)
+# Command to generate the swig-engine.cpp wrapper file
+SET (SWIG_GNC_MODULE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnc-module.cpp)
 GNC_ADD_SWIG_COMMAND (${SWIG_GNC_MODULE_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnc-module.i)
 
 SET (libgnc_backend_xml_SOURCES
-  gnc-account-xml-v2.c 
-  gnc-address-xml-v2.c
-  gnc-bill-term-xml-v2.c
-  gnc-book-xml-v2.c 
-  gnc-budget-xml-v2.c 
-  gnc-commodity-xml-v2.c 
-  gnc-customer-xml-v2.c
-  gnc-employee-xml-v2.c
-  gnc-entry-xml-v2.c
-  gnc-freqspec-xml-v2.c 
-  gnc-invoice-xml-v2.c
-  gnc-job-xml-v2.c
-  gnc-lot-xml-v2.c 
-  gnc-order-xml-v2.c
-  gnc-owner-xml-v2.c
-  gnc-pricedb-xml-v2.c 
-  gnc-recurrence-xml-v2.c 
-  gnc-schedxaction-xml-v2.c 
-  gnc-tax-table-xml-v2.c
-  gnc-transaction-xml-v2.c 
-  gnc-vendor-xml-v2.c
-  gnc-xml-helper.c
-  io-example-account.c 
-  io-gncxml-gen.c 
+  gnc-account-xml-v2.cpp
+  gnc-address-xml-v2.cpp
+  gnc-bill-term-xml-v2.cpp
+  gnc-book-xml-v2.cpp
+  gnc-budget-xml-v2.cpp
+  gnc-commodity-xml-v2.cpp
+  gnc-customer-xml-v2.cpp
+  gnc-employee-xml-v2.cpp
+  gnc-entry-xml-v2.cpp
+  gnc-freqspec-xml-v2.cpp
+  gnc-invoice-xml-v2.cpp
+  gnc-job-xml-v2.cpp
+  gnc-lot-xml-v2.cpp
+  gnc-order-xml-v2.cpp
+  gnc-owner-xml-v2.cpp
+  gnc-pricedb-xml-v2.cpp
+  gnc-recurrence-xml-v2.cpp
+  gnc-schedxaction-xml-v2.cpp
+  gnc-tax-table-xml-v2.cpp
+  gnc-transaction-xml-v2.cpp
+  gnc-vendor-xml-v2.cpp
+  gnc-xml-helper.cpp
+  io-example-account.cpp
+  io-gncxml-gen.cpp
   io-gncxml-v1.cpp
-  io-gncxml-v2.c 
-  io-utils.c 
+  io-gncxml-v2.cpp
+  io-utils.cpp
   sixtp-dom-generators.cpp
   sixtp-dom-parsers.cpp
-  sixtp-stack.c 
-  sixtp-to-dom-parser.c 
-  sixtp-utils.c 
-  sixtp.c
-  gnc-backend-xml.c
+  sixtp-stack.cpp
+  sixtp-to-dom-parser.cpp
+  sixtp-utils.cpp
+  sixtp.cpp
+  gnc-backend-xml.cpp
 )
 
 # Add dependency on config.h



Summary of changes:
 src/backend/dbi/CMakeLists.txt      |  2 +-
 src/backend/dbi/gnc-backend-dbi.cpp | 16 +++++++++
 src/backend/sql/CMakeLists.txt      | 44 ++++++++++++------------
 src/backend/xml/CMakeLists.txt      | 68 ++++++++++++++++++-------------------
 src/backend/xml/io-gncxml-v2.cpp    | 22 ++++++++----
 5 files changed, 88 insertions(+), 64 deletions(-)



More information about the gnucash-changes mailing list