MSVC compatibility: MSVC must not use g_fopen because it uses a different C runtime than the rest of (MSVC) file-handling functions.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18955 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2010-03-22 21:15:15 +00:00
parent dfc294652d
commit 2a3d00c24f
5 changed files with 11 additions and 0 deletions

View File

@@ -59,6 +59,9 @@ typedef int ssize_t;
# define read _read
# define write _write
#endif
#ifdef _MSC_VER
# define g_fopen fopen
#endif
#include "qof.h"
#include "TransLog.h"

View File

@@ -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

View File

@@ -31,6 +31,7 @@
#include <sys/types.h>
#ifdef _MSC_VER
typedef int ssize_t;
# define g_fopen fopen
#endif
#include "sixtp.h"

View File

@@ -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

View File

@@ -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: