summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-11 03:27:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-11 03:27:46 +0000
commit55af573b6efdf04ee5ddb06f6fdab559b0a20193 (patch)
tree4249c139db54414539459013baebce573df2419c
parenta893a81a0ea5b9d4bd10bb0b56fba6213de846f0 (diff)
downloadruby-55af573b6efdf04ee5ddb06f6fdab559b0a20193.tar.gz
ruby-55af573b6efdf04ee5ddb06f6fdab559b0a20193.tar.xz
ruby-55af573b6efdf04ee5ddb06f6fdab559b0a20193.zip
* configure.in: moved broken syscall checks from process.c etc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--configure.in16
-rw-r--r--process.c5
3 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 91d1e011b..fa59565b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
-Fri Jan 11 11:57:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jan 11 12:27:44 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: moved broken syscall checks from process.c etc.
* defines.h (WORDS_BIGENDIAN): honor __BIG_ENDIAN__ than the result of
configure.
diff --git a/configure.in b/configure.in
index 1ab21a735..703277016 100644
--- a/configure.in
+++ b/configure.in
@@ -465,7 +465,19 @@ case "$target_os" in
nextstep*) ;;
openstep*) ;;
rhapsody*) ;;
-darwin*) LIBS="-lobjc $LIBS";;
+darwin*) LIBS="-lobjc $LIBS"
+ AC_TRY_CPP([#include <AvailabilityMacros.h>
+ #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
+ #error pre OS X 10.4
+ [!<===== pre OS X 10.4 =====>]
+ #endif
+ ], [/* nothing */], [],
+ [
+ AC_DEFINE(BROKEN_SETREUID, 1)
+ AC_DEFINE(BROKEN_SETREGID, 1)
+ ac_cv_header_ucontext_h=no
+ ])
+ ;;
hpux*) LIBS="-lm $LIBS"
ac_cv_c_inline=no;;
human*) ac_cv_func_getpgrp_void=yes
@@ -520,6 +532,8 @@ msdosdjgpp*) LIBS="-lm $LIBS"
ac_cv_func_setrlimit=no
;;
bsdi*) LIBS="-lm $LIBS"
+ AC_DEFINE(BROKEN_SETREUID, 1)
+ AC_DEFINE(BROKEN_SETREGID, 1)
ac_cv_sizeof_rlim_t=8;;
freebsd*) LIBS="-lm $LIBS"
AC_CACHE_CHECK([whether -lxpg4 has to be linked],
diff --git a/process.c b/process.c
index 399a9288f..7339c539a 100644
--- a/process.c
+++ b/process.c
@@ -100,11 +100,6 @@ static VALUE S_Tms;
#undef HAVE_SETRGID
#endif
-#if defined(__MacOS_X__) || defined(__bsdi__)
-#define BROKEN_SETREUID 1
-#define BROKEN_SETREGID 1
-#endif
-
#ifdef BROKEN_SETREUID
#define setreuid ruby_setreuid
#endif