More header include compatibility: Watch out for HAVE_UNISTD_H.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18747 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-02-27 18:38:52 +00:00
parent 59f780f575
commit e346345fc4
5 changed files with 21 additions and 6 deletions

1
.gitignore vendored
View File

@ -125,3 +125,4 @@ po/.intltool-merge-cache
src/bin/gnucash-bin.o src/bin/gnucash-bin.o
gnucash-*.*.*/ gnucash-*.*.*/
gnucash-*.*.*.tar.* gnucash-*.*.*.tar.*
build*

View File

@ -39,10 +39,18 @@
#include <limits.h> #include <limits.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #ifdef HAVE_UNISTD_H
# include <unistd.h>
#else
# ifdef _MSC_VER
typedef int ssize_t;
# endif
#endif
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <dirent.h> #ifdef HAVE_DIRENT_H
# include <dirent.h>
#endif
#include <time.h> #include <time.h>
#include "qof.h" #include "qof.h"

View File

@ -26,10 +26,14 @@
#include <sys/types.h> #include <sys/types.h>
#include <ctype.h> #include <ctype.h>
#include <dirent.h> #ifdef HAVE_DIRENT_H
# include <dirent.h>
#endif
#include <string.h> #include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <glib.h> #include <glib.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>

View File

@ -25,7 +25,9 @@
#include <glib/gstdio.h> #include <glib/gstdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
#include <unistd.h> #ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <zlib.h> #include <zlib.h>
#include <errno.h> #include <errno.h>

View File

@ -32,7 +32,7 @@
#else #else
# ifndef HAVE_MEMCPY # ifndef HAVE_MEMCPY
#include <string.h> #include <string.h>
# define memcpy(d, s, n) bcopy ((s), (d), (n)) /* # define memcpy(d, s, n) bcopy ((s), (d), (n)) */
# endif # endif
#endif #endif