Improve build and configure
authorCalvin <calvin@openmailbox.org>
Tue, 14 Feb 2017 23:05:31 +0000 (19:05 -0400)
committerCalvin <calvin@openmailbox.org>
Mon, 27 Feb 2017 15:27:51 +0000 (11:27 -0400)
* detect sys/errno.h

* Fix errenous LIBS in haiku

* use HAVE_MINCORE

configure.ac
mono/utils/mono-proclib.c
support/sys-mman.c

index 1ad5cd6d37d24f24e9b38daba26783d5a2b35e3a..738689b81d4e528de635767f2db0ef76f359aedc 100644 (file)
@@ -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 **********************************
index 294e37a677a0609ab6271eca29b5c0c39d120702..5f6d145b6da32fc12c5257199e36708056beac30 100644 (file)
@@ -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>
index 08c1fea9fd35c56e309a0a19554c50ea7835a9a5..afbe46624447d87a05a10d44e367427e0b45311d 100644 (file)
@@ -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);