mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
More minor MSVC code fixes.
However, this code doesn't compile with MSVC9.0 for a few reasons: 1. libguile.h comes with its own scmconfig.h which contains HAVE_STDINT_H whereas MSVC doesn't have that. This is stupid guile which doesn't accept the fact that the user uses a different compiler than how they compiled guile. 2. Some initializations are not supported: Account.c:3312 etc. 3. The C99 "designated initializers" of e.g. Account.c:4661 ff. (r17724, bug#539957) are not supported by MSVC9.0 - this is the hardest problem of these all. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18738 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
69dc9107ff
commit
82b8b99c9d
@ -42,7 +42,16 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#else
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
/* MSVC compatibility code */
|
||||||
|
# include <io.h>
|
||||||
|
# define write _write
|
||||||
|
# define ssize_t int
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gnc-gkeyfile-utils.h"
|
#include "gnc-gkeyfile-utils.h"
|
||||||
|
|
||||||
|
@ -30,8 +30,12 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
#include <sys/time.h>
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <unistd.h>
|
# include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gnc-lot.h"
|
#include "gnc-lot.h"
|
||||||
#include "Account.h"
|
#include "Account.h"
|
||||||
|
@ -30,9 +30,13 @@
|
|||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
# include <sys/time.h>
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "qof.h"
|
#include "qof.h"
|
||||||
#include "Split.h"
|
#include "Split.h"
|
||||||
|
@ -30,9 +30,20 @@
|
|||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
# include <sys/time.h>
|
||||||
|
#else
|
||||||
|
/* We simply define the struct timeval on our own here. */
|
||||||
|
struct timeval {
|
||||||
|
long tv_sec; /* seconds */
|
||||||
|
long tv_usec; /* and microseconds */
|
||||||
|
};
|
||||||
|
/* include <Winsock2.h> */
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "AccountP.h"
|
#include "AccountP.h"
|
||||||
#include "Scrub.h"
|
#include "Scrub.h"
|
||||||
|
@ -42,7 +42,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "gnc-engine.h"
|
#include "gnc-engine.h"
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <dirent.h>
|
#ifdef HAVE_DIRENT_H
|
||||||
|
# include <dirent.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gnc-module.h"
|
#include "gnc-module.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user