From 0e896529b0abcbbefb781911cc818033cfdffea4 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Mon, 18 Jul 2011 10:57:21 +0000 Subject: [PATCH] Front-ported Darwin port changes --- configure.in | 9 ++++++++- src/common/os/posix/divorce.cpp | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 03f74ba98e..2f5eb9d7e7 100644 --- a/configure.in +++ b/configure.in @@ -787,7 +787,14 @@ AC_CHECK_FUNCS(fchmod) AC_CHECK_FUNCS(semtimedop) AC_CHECK_FUNCS(fegetenv) AC_CHECK_FUNCS(strerror_r) -AC_CHECK_FUNCS(fdatasync fsync) +case $host in + *-darwin*) + ac_cv_func_fdatasync=no + ;; + *) + AC_CHECK_FUNCS(fdatasync fsync) + ;; +esac AC_CHECK_FUNCS(poll) dnl AC_CHECK_FUNCS(AO_compare_and_swap_full) AC_COMPILE_IFELSE( diff --git a/src/common/os/posix/divorce.cpp b/src/common/os/posix/divorce.cpp index 372c92523e..ccca490691 100644 --- a/src/common/os/posix/divorce.cpp +++ b/src/common/os/posix/divorce.cpp @@ -99,11 +99,13 @@ void divorce_terminal(int mask) for (fid = 0; fid < NOFILE; fid++) { -#ifdef MIXED_SEMAPHORE_AND_FILE_HANDLE - if (Firebird::SignalSafeSemaphore::checkHandle(fid)) +#ifdef DARWIN +#ifdef HAVE_UNISTD_H + if (isatty(fid) <= 0) { continue; } +#endif #endif if (!(mask & (1 << fid))) {