r18955 - gnucash/trunk/src - MSVC compatibility: MSVC must not use g_fopen because it uses a different C runtime than the rest of (MSVC) file-handling functions.
Christian Stimming
cstim at code.gnucash.org
Mon Mar 22 17:15:15 EDT 2010
Author: cstim
Date: 2010-03-22 17:15:15 -0400 (Mon, 22 Mar 2010)
New Revision: 18955
Trac: http://svn.gnucash.org/trac/changeset/18955
Modified:
gnucash/trunk/src/backend/xml/gnc-backend-xml.c
gnucash/trunk/src/backend/xml/io-gncxml-v2.c
gnucash/trunk/src/backend/xml/sixtp.c
gnucash/trunk/src/core-utils/gnc-gkeyfile-utils.c
gnucash/trunk/src/engine/TransLog.c
Log:
MSVC compatibility: MSVC must not use g_fopen because it uses a different C runtime than the rest of (MSVC) file-handling functions.
Modified: gnucash/trunk/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2010-03-22 21:14:38 UTC (rev 18954)
+++ gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2010-03-22 21:15:15 UTC (rev 18955)
@@ -59,6 +59,9 @@
# define read _read
# define write _write
#endif
+#ifdef _MSC_VER
+# define g_fopen fopen
+#endif
#include "qof.h"
#include "TransLog.h"
Modified: gnucash/trunk/src/backend/xml/io-gncxml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v2.c 2010-03-22 21:14:38 UTC (rev 18954)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v2.c 2010-03-22 21:15:15 UTC (rev 18955)
@@ -54,6 +54,9 @@
# define fdopen _fdopen
# define read _read
#endif
+#ifdef _MSC_VER
+# define g_fopen fopen
+#endif
/* Do not treat -Wstrict-aliasing warnings as errors because of problems of the
* G_LOCK* macros as declared by glib. See
Modified: gnucash/trunk/src/backend/xml/sixtp.c
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp.c 2010-03-22 21:14:38 UTC (rev 18954)
+++ gnucash/trunk/src/backend/xml/sixtp.c 2010-03-22 21:15:15 UTC (rev 18955)
@@ -31,6 +31,7 @@
#include <sys/types.h>
#ifdef _MSC_VER
typedef int ssize_t;
+# define g_fopen fopen
#endif
#include "sixtp.h"
Modified: gnucash/trunk/src/core-utils/gnc-gkeyfile-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-gkeyfile-utils.c 2010-03-22 21:14:38 UTC (rev 18954)
+++ gnucash/trunk/src/core-utils/gnc-gkeyfile-utils.c 2010-03-22 21:15:15 UTC (rev 18955)
@@ -48,6 +48,7 @@
# ifdef _MSC_VER
/* MSVC compatibility code */
# include <io.h>
+# define g_open _open
# define close _close
# define write _write
# define ssize_t int
Modified: gnucash/trunk/src/engine/TransLog.c
===================================================================
--- gnucash/trunk/src/engine/TransLog.c 2010-03-22 21:14:38 UTC (rev 18954)
+++ gnucash/trunk/src/engine/TransLog.c 2010-03-22 21:15:15 UTC (rev 18955)
@@ -33,6 +33,9 @@
#include "TransactionP.h"
#include "TransLog.h"
#include "qof.h"
+#ifdef _MSC_VER
+# define g_fopen fopen
+#endif
/*
* Some design philosphy that I think would be good to keep in mind:
More information about the gnucash-changes
mailing list