* configure.ac: Added check for mach/mach.h header.
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Tue, 3 Nov 2009 18:31:56 +0000 (19:31 +0100)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Tue, 3 Nov 2009 18:31:56 +0000 (19:31 +0100)
* src/vm/os.hpp: Includes above header with proper checking.
* src/threads/posix/thread-posix.cpp: Don't include above header directly.
* src/native/vm/gnuclasspath/java_lang_VMRuntime.cpp: Likewise.

configure.ac
src/native/vm/gnuclasspath/java_lang_VMRuntime.cpp
src/threads/posix/thread-posix.cpp
src/vm/os.hpp

index 44f986f8affce33a5d9f0b8e3ea3f2e938a1c2ee..d33d8591ad43cda403ced9218b323ead3f02af3f 100644 (file)
@@ -286,6 +286,7 @@ AC_CHECK_HEADERS([string.h])
 AC_CHECK_HEADERS([time.h])
 AC_CHECK_HEADERS([ucontext.h])
 AC_CHECK_HEADERS([unistd.h])
+AC_CHECK_HEADERS([mach/mach.h])
 AC_CHECK_HEADERS([sys/ioctl.h])
 AC_CHECK_HEADERS([sys/loadavg.h])
 AC_CHECK_HEADERS([sys/mman.h])
index 4317bc6187466929da1aac17066884ac02694ffd..d22fb2bcd7877c97e7be4c7353c8dfb97cfd4675 100644 (file)
 #include <stdlib.h>
 #include <unistd.h>
 
-#if defined(__DARWIN__)
-# if defined(__POWERPC__)
-#  define OS_INLINE    /* required for <libkern/ppc/OSByteOrder.h> */
-# endif
-# include <mach/mach.h>
-#endif
-
 #include "mm/memory.hpp"
 #include "mm/gc.hpp"
 
index 031823ee561e9a7a6a3c2b3c62b4b138b43a3a50..8e855c90bed103e4784f7f862137f0f72a42b5f5 100644 (file)
@@ -81,7 +81,6 @@
 #include "vm/jit/asmpart.h"
 
 #if defined(__DARWIN__)
-# include <mach/mach.h>
 
 typedef struct {
        Mutex* mutex;
index e1aa4c458ab10b73589720f07a7e5fa7becd9f1b..5e895d56c897f5fce5f835f849a69d6685f0c6ce 100644 (file)
 # include <unistd.h>
 #endif
 
+#if defined(__DARWIN__)
+# if defined(HAVE_MACH_MACH_H)
+#  include <mach/mach.h>
+# endif
+#endif
+
 #if defined(HAVE_SYS_LOADAVG_H)
 # include <sys/loadavg.h>
 #endif