mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <sys/types.h>
|
||||
#ifdef _MSC_VER
|
||||
typedef int ssize_t;
|
||||
# define g_fopen fopen
|
||||
#endif
|
||||
|
||||
#include "sixtp.h"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user