* configure.ac: Added check for sys/utsname.h header.
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Tue, 3 Nov 2009 15:15:59 +0000 (16:15 +0100)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Tue, 3 Nov 2009 15:15:59 +0000 (16:15 +0100)
* src/vm/os.hpp: Properly includes above header.

* src/mm/codememory.c: Removed includes of "uncommon" headers.
* src/mm/gc-none.cpp: Likewise.
* src/mm/tlh.c: Likewise.
* src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.cpp: Likewise.
* src/native/vm/cldc1.1/com_sun_cldc_io_j2me_socket_Protocol.cpp: Likewise.
* src/native/vm/gnuclasspath/java_lang_VMClassLoader.cpp: Likewise.
* src/native/vm/gnuclasspath/java_lang_VMRuntime.cpp: Likewise.
* src/native/vm/openjdk/jvm.cpp: Likewise.
* src/vm/exceptions.cpp: Likewise.
* src/vm/properties.cpp: Likewise.
* src/vm/signal.cpp: Likewise.
* src/vm/zip.cpp: Likewise.

14 files changed:
configure.ac
src/mm/codememory.c
src/mm/gc-none.cpp
src/mm/tlh.c
src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.cpp
src/native/vm/cldc1.1/com_sun_cldc_io_j2me_socket_Protocol.cpp
src/native/vm/gnuclasspath/java_lang_VMClassLoader.cpp
src/native/vm/gnuclasspath/java_lang_VMRuntime.cpp
src/native/vm/openjdk/jvm.cpp
src/vm/exceptions.cpp
src/vm/os.hpp
src/vm/properties.cpp
src/vm/signal.cpp
src/vm/zip.cpp

index 5dcff4dde835a6037d9bbb303d9d81a173d30ac2..44f986f8affce33a5d9f0b8e3ea3f2e938a1c2ee 100644 (file)
@@ -295,6 +295,7 @@ AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([sys/stat.h])
 AC_CHECK_HEADERS([sys/time.h])
 AC_CHECK_HEADERS([sys/types.h])
+AC_CHECK_HEADERS([sys/utsname.h])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
index c3e00384cabd03751410120125a8d08eeb40dd85..38edd13b7637deafddc01988818a040d94c5ba60 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <stdint.h>
 #include <stdlib.h>
-#include <sys/mman.h> /* REMOVEME */
 
 #include "threads/mutex.hpp"
 #include "threads/thread.hpp"
index 0ef0cf3f0909c0a95022080a7582c783770644c1..55eedeb0fb0a97f7228dd3719671a788c88af39f 100644 (file)
 
 #include <stdlib.h>
 
-#if defined(HAVE_SYS_MMAN_H)
-# include <sys/mman.h>
-#endif
-
 #include "vm/types.h"
 
 #include "boehm-gc/include/gc.h"
@@ -44,6 +40,7 @@
 #include "vm/global.h"
 #include "vm/loader.hpp"
 #include "vm/options.h"
+#include "vm/os.hpp"
 #include "vm/vm.hpp"
 
 
index 6fcaf5a7a42b0e5192f0252bb278437c3394b656..07646cb1a5d1b28d3a6138dd1742e1d6797b4bb3 100644 (file)
@@ -27,9 +27,9 @@
 #include "mm/tlh.h"
 
 #include "vm/global.h"
+#include "vm/os.hpp"
 
 #include <assert.h>
-#include <sys/mman.h>
 
 static const int TLH_MAX_SIZE = (20 * 1024 * 1024);
 
index 30efeaa2cc45d069883695cc8182088208cc76f6..520a4018f539d5d92d86db132171d74e72f7e3f9 100644 (file)
@@ -25,9 +25,6 @@
 
 #include "config.h"
 
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <fcntl.h>
 #include <errno.h>
 #include <zlib.h>
 
@@ -45,6 +42,7 @@
 #include "vm/array.hpp"
 #include "vm/exceptions.hpp"
 #include "vm/javaobjects.hpp"
+#include "vm/os.hpp"
 #include "vm/string.hpp"
 #include "vm/types.h"
 #include "vm/vm.hpp" /* REMOVE ME: temporarily */
index cf99a13a98df8356fd8e6cb9236e796782aa4cb7..b03e49c2d4e7eca95492b8603b7d6200a1a6f33b 100644 (file)
@@ -30,7 +30,6 @@
 #include <netdb.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 
 #include "vm/types.h"
 
index 10e2d63eba6ba5e0b4a192d502e18488107e764e..65d5f96ed8943f46b0899d327ed1c2f0f8aa0dc0 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <assert.h>
 #include <stdint.h>
-#include <sys/stat.h>
 
 #include "mm/memory.hpp"
 
@@ -57,6 +56,7 @@
 #include "vm/linker.hpp"
 #include "vm/loader.hpp"
 #include "vm/options.h"
+#include "vm/os.hpp"
 #include "vm/primitive.hpp"
 #include "vm/statistics.h"
 #include "vm/string.hpp"
index 2a885667889121a6f8d78e290b960cbbd9ce1ee2..4317bc6187466929da1aac17066884ac02694ffd 100644 (file)
@@ -30,7 +30,6 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <sys/utsname.h>
 
 #if defined(__DARWIN__)
 # if defined(__POWERPC__)
index 7a194fe2ace837de09bcfa152dbae862efad54cd..945f22157a3d6556bc1e28753fa81e496a0d661b 100644 (file)
@@ -38,8 +38,6 @@
 #include <sys/ioctl.h>
 #endif
 
-#include <sys/socket.h>
-#include <sys/stat.h>
 #include <sys/types.h>
 
 // Include our JNI header before the JVM headers, because the JVM
index 332fca04b15e1c1304b1921a9b7c292fc84a96d3..69a748febd18f67a0678c9cb31dbe91857730d03 100644 (file)
@@ -29,7 +29,6 @@
 #include <string.h>
 #include <stdarg.h>
 #include <stdlib.h>
-#include <sys/mman.h>
 
 #include "vm/types.h"
 
index c80b2ea1d3404e1ee8a3dd93fc08664681bb59c4..e1aa4c458ab10b73589720f07a7e5fa7becd9f1b 100644 (file)
 # include <sys/types.h>
 #endif
 
+#if defined(HAVE_SYS_UTSNAME_H)
+# include <sys/utsname.h>
+#endif
+
 
 #ifdef __cplusplus
 
index c605efd658881a172dc66e796c3f6f4f59678887..a13b8b6dd2479777412dfdbd0694d71d0f660518 100644 (file)
@@ -32,7 +32,6 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/utsname.h>
 
 #include "mm/memory.hpp"
 
index 57d422d1df1d08370b478e9000359c2616b34fe5..a34cfd54c57f119b5fb42ce7b794c36fcd48af7a 100644 (file)
 #include <stdint.h>
 #include <stdlib.h>
 
-#if defined(__DARWIN__)
-/* If we compile with -ansi on darwin, <sys/types.h> is not
- included. So let's do it here. */
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-
 #include "arch.h"
 
 #if defined(ENABLE_GC_BOEHM)
index 601e31d08c7564996f3d67cdc1510b6e571c8cd6..6eb7f621b9ce36661a19d1d201e345553708d592 100644 (file)
 
 #include <assert.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <unistd.h>
 #include <zlib.h>
-#include <sys/mman.h>
 
 #include "vm/types.h"
 
@@ -40,6 +38,7 @@
 #include "mm/memory.hpp"
 
 #include "vm/global.h"
+#include "vm/os.hpp"
 #include "vm/suck.hpp"
 #include "vm/utf8.h"
 #include "vm/vm.hpp"