From 959116ef2c7755aaffd6d6104b4edaee477e11ba Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 30 Nov 2007 08:20:08 +0000 Subject: [PATCH] (emacs_close) [MAC_OSX && HAVE_CARBON]: Use mac_try_close_socket. --- src/ChangeLog | 11 +++++++++++ src/sysdep.c | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 810d9257e12..2a340264d17 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2007-11-30 YAMAMOTO Mitsuharu + + * mac.c (cfsockets_for_select) [MAC_OSX && SELECT_USE_CFSOCKET]: + New variable. + (mac_try_close_socket) [MAC_OSX]: New function. + [MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]: + Update cfsockets_for_select. Replace invalid CFRunLoop source. + + * sysdep.c (emacs_close) [MAC_OSX && HAVE_CARBON]: + Use mac_try_close_socket. + 2007-11-28 Petr Salinger (tiny change) * s/gnu-kfreebsd.h: New file. diff --git a/src/sysdep.c b/src/sysdep.c index 408ccf2131a..84e7a6749e4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3320,6 +3320,15 @@ emacs_close (fd) int did_retry = 0; register int rtnval; +#if defined (MAC_OSX) && defined (HAVE_CARBON) + { + extern int mac_try_close_socket P_ ((int)); + + if (mac_try_close_socket (fd)) + return 0; + } +#endif + while ((rtnval = close (fd)) == -1 && (errno == EINTR)) did_retry = 1; -- 2.39.2