[llvm-commits] [llvm] r83823 - in /llvm/trunk: autoconf/configure.ac lib/System/Unix/Process.inc utils/unittest/googletest/include/gtest/internal/gtest-port.h
Edward O'Callaghan
eocallaghan at auroraux.org
Sun Oct 11 21:57:20 PDT 2009
Author: evocallaghan
Date: Sun Oct 11 23:57:20 2009
New Revision: 83823
URL: http://llvm.org/viewvc/llvm-project?rev=83823&view=rev
Log:
Haiku porting patches, Credit to Paul Davey.
Modified:
llvm/trunk/autoconf/configure.ac
llvm/trunk/lib/System/Unix/Process.inc
llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=83823&r1=83822&r2=83823&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Sun Oct 11 23:57:20 2009
@@ -175,6 +175,11 @@
llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
llvm_cv_os_type="MingW"
llvm_cv_platform_type="Win32" ;;
+ *-*-haiku*)
+ llvm_cv_link_all_option="-Wl,--whole-archive"
+ llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
+ llvm_cv_os_type="Haiku"
+ llvm_cv_platform_type="Unix" ;;
*-unknown-eabi*)
llvm_cv_link_all_option="-Wl,--whole-archive"
llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
@@ -223,6 +228,8 @@
llvm_cv_target_os_type="Win32" ;;
*-*-mingw*)
llvm_cv_target_os_type="MingW" ;;
+ *-*-haiku*)
+ llvm_cv_target_os_type="Haiku" ;;
*-unknown-eabi*)
llvm_cv_target_os_type="Freestanding" ;;
*)
@@ -960,7 +967,9 @@
dnl pthread locking functions are optional - but llvm will not be thread-safe
dnl without locks.
if test "$ENABLE_THREADS" -eq 1 ; then
- AC_CHECK_LIB(pthread,pthread_mutex_init)
+ AC_SEARCH_LIBS(pthread_mutex_init,pthread,
+ AC_DEFINE([HAVE_PTHREAD],[1],
+ [Have pthread]))
AC_SEARCH_LIBS(pthread_mutex_lock,pthread,
AC_DEFINE([HAVE_PTHREAD_MUTEX_LOCK],[1],
[Have pthread_mutex_lock]))
Modified: llvm/trunk/lib/System/Unix/Process.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Process.inc?rev=83823&r1=83822&r2=83823&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Process.inc (original)
+++ llvm/trunk/lib/System/Unix/Process.inc Sun Oct 11 23:57:20 2009
@@ -91,7 +91,7 @@
malloc_statistics_t Stats;
malloc_zone_statistics(malloc_default_zone(), &Stats);
return Stats.size_allocated; // darwin
-#elif defined(HAVE_GETRUSAGE)
+#elif defined(HAVE_GETRUSAGE) && !defined(__HAIKU__)
struct rusage usage;
::getrusage(RUSAGE_SELF, &usage);
return usage.ru_maxrss;
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h?rev=83823&r1=83822&r2=83823&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h (original)
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h Sun Oct 11 23:57:20 2009
@@ -185,6 +185,8 @@
#define GTEST_OS_ZOS
#elif defined(__sun) && defined(__SVR4)
#define GTEST_OS_SOLARIS
+#elif defined(__HAIKU__)
+#define GTEST_OS_HAIKU
#endif // _MSC_VER
// Determines whether ::std::string and ::string are available.
@@ -225,7 +227,7 @@
// TODO(wan at google.com): uses autoconf to detect whether ::std::wstring
// is available.
-#if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS)
+#if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU)
// At least some versions of cygwin don't support ::std::wstring.
// Solaris' libc++ doesn't support it either.
#define GTEST_HAS_STD_WSTRING 0
More information about the llvm-commits
mailing list