summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-05-22 15:43:33 +0000
committerJeffrey Stedfast <fejj@src.gnome.org>2003-05-22 15:43:33 +0000
commit10c573c8906570f16419dfaff7331b0b17cd620d (patch)
treedb0caef03d977bc34372a2296fb584d1e0013fc1
parent04ff0141a6de8816e06490a2ea191ec978dca87d (diff)
downloadgmime-10c573c8906570f16419dfaff7331b0b17cd620d.tar.gz
Removed sys/mman.h and unistd.h from the #includes. These are needed in
2003-05-22 Jeffrey Stedfast <fejj@ximian.com> * gmime/gmime-stream-mmap.h: Removed sys/mman.h and unistd.h from the #includes. These are needed in the ehader and will break the build on win32. * configure.in: Check for sys/param. * gmime/gmime-utils.c: Only #include sys/param.h if the system has it. If the build environment is win32, #include process.h for pid_t.
-rw-r--r--ChangeLog12
-rw-r--r--configure.in1
-rw-r--r--gmime/gmime-stream-mmap.c2
-rw-r--r--gmime/gmime-stream-mmap.h2
-rw-r--r--gmime/gmime-utils.c11
5 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f5211d0..422323f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-05-22 Jeffrey Stedfast <fejj@ximian.com>
+
+ * gmime/gmime-stream-mmap.h: Removed sys/mman.h and unistd.h from
+ the #includes. These are needed in the ehader and will break the
+ build on win32.
+
+ * configure.in: Check for sys/param.
+
+ * gmime/gmime-utils.c: Only #include sys/param.h if the system has
+ it. If the build environment is win32, #include process.h for
+ pid_t.
+
2003-05-21 Jeffrey Stedfast <fejj@ximian.com>
* README: Updated.
diff --git a/configure.in b/configure.in
index 1d82dfca..769b78c4 100644
--- a/configure.in
+++ b/configure.in
@@ -51,6 +51,7 @@ LDFLAGS=${_ldflags}
dnl Checks for header files.
AC_CHECK_HEADERS(sys/mman.h)
+AC_CHECK_HEADERS(sys/param.h)
AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(stdlib.h)
AC_CHECK_HEADERS(netdb.h)
diff --git a/gmime/gmime-stream-mmap.c b/gmime/gmime-stream-mmap.c
index 64c142f7..1e4b560e 100644
--- a/gmime/gmime-stream-mmap.c
+++ b/gmime/gmime-stream-mmap.c
@@ -25,9 +25,9 @@
#include <config.h>
#endif
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <string.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
diff --git a/gmime/gmime-stream-mmap.h b/gmime/gmime-stream-mmap.h
index 54b90579..0eaa5222 100644
--- a/gmime/gmime-stream-mmap.h
+++ b/gmime/gmime-stream-mmap.h
@@ -29,8 +29,6 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-#include <sys/mman.h>
-#include <unistd.h>
#include <gmime/gmime-stream.h>
#define GMIME_TYPE_STREAM_MMAP (g_mime_stream_mmap_get_type ())
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index 13b0619f..66cc6cde 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -28,10 +28,21 @@
#define _GNU_SOURCE
+#include <glib.h>
+#ifdef G_OS_WIN32
+#include <process.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> /* for MAXHOSTNAMELEN */
+#else
+#define MAXHOSTNAMELEN 64
+#endif
+#include <sys/types.h>
#include <string.h>
+#include <unistd.h>
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif