Explorar o código

Improve build and configure

* detect sys/errno.h

* Fix errenous LIBS in haiku

* use HAVE_MINCORE
Calvin %!s(int64=9) %!d(string=hai) anos
pai
achega
52d4b9dcb7
Modificáronse 3 ficheiros con 7 adicións e 4 borrados
  1. 5 1
      configure.ac
  2. 1 1
      mono/utils/mono-proclib.c
  3. 1 2
      support/sys-mman.c

+ 5 - 1
configure.ac

@@ -335,7 +335,7 @@ case "$host" in
 		libmono_cflags="-D_REENTRANT -D_THREAD_SAFE"
 		libdl=
 		dnl FIXME: Does eglib pick this up?
-		LIBS="$LIBS -lnetwork -;textencoding"
+		LIBS="$LIBS -lnetwork -ltextencoding"
 		need_link_unlink=yes
 		AC_DEFINE(PTHREAD_POINTER_ID)
 		dnl Haiku does not support static TLS with __thread
@@ -2328,6 +2328,10 @@ if test x$host_win32 = xno; then
 		AC_MSG_RESULT(no)
 	])
 			
+	dnl **********************************
+	dnl *** Checks for proclib         ***
+	dnl **********************************
+	AC_CHECK_HEADER(sys/errno.h, [AC_DEFINE(HAVE_SYS_ERRNO_H, 1, Define to 1 if you have the <sys/errno.h> header file.)])
 	dnl **********************************
 	dnl *** Checks for MonoPosixHelper ***
 	dnl **********************************

+ 1 - 1
mono/utils/mono-proclib.c

@@ -20,7 +20,7 @@
 #endif
 
 #if defined(_POSIX_VERSION)
-#if !defined(__HAIKU__)
+#ifdef HAVE_SYS_ERRNO_H
 #include <sys/errno.h>
 #endif
 #include <sys/param.h>

+ 1 - 2
support/sys-mman.c

@@ -88,8 +88,7 @@ Mono_Posix_Syscall_msync (void *start, mph_size_t len, int flags)
 int
 Mono_Posix_Syscall_mlock (void *start, mph_size_t len)
 {
-/* FIXME: Haiku lacks support for m(un)lock and mincore */
-#if defined(__HAIKU__)
+#if !defined(HAVE_MINCORE)
 	return ENOSYS;
 #else
 	mph_return_if_size_t_overflow (len);