1898. [port] sunos: non blocking i/o support. [RT #14951]
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
AC_REVISION($Revision: 1.103 $)
|
||||
AC_REVISION($Revision: 1.104 $)
|
||||
|
||||
AC_INIT(resolv/herror.c)
|
||||
AC_PREREQ(2.13)
|
||||
@@ -996,6 +996,7 @@ PORT_DIR=port/unknown
|
||||
SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
|
||||
BSD_COMP="#undef BSD_COMP"
|
||||
USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
|
||||
PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
|
||||
case "$host" in
|
||||
*aix3.2*) PORT_DIR="port/aix32";;
|
||||
*aix4*) PORT_DIR="port/aix4";;
|
||||
@@ -1003,7 +1004,9 @@ case "$host" in
|
||||
*aux3*) PORT_DIR="port/aux3";;
|
||||
*-bsdi2*) PORT_DIR="port/bsdos2";;
|
||||
*-bsdi*) PORT_DIR="port/bsdos";;
|
||||
*-cygwin*) PORT_DIR="port/cygwin";;
|
||||
*-cygwin*)
|
||||
PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
|
||||
PORT_DIR="port/cygwin";;
|
||||
*-darwin*) PORT_DIR="port/darwin";;
|
||||
*-osf*) PORT_DIR="port/decunix";;
|
||||
*-freebsd*) PORT_DIR="port/freebsd";;
|
||||
@@ -1019,6 +1022,9 @@ case "$host" in
|
||||
*-openbsd*) PORT_DIR="port/openbsd";;
|
||||
*-qnx*) PORT_DIR="port/qnx";;
|
||||
*-rhapsody*) PORT_DIR="port/rhapsody";;
|
||||
*-sunos4*)
|
||||
PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
|
||||
PORT_DIR="port/sunos";;
|
||||
*-solaris2.[[01234]]*)
|
||||
BSD_COMP="#define BSD_COMP 1"
|
||||
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
|
||||
@@ -1038,6 +1044,7 @@ esac
|
||||
AC_SUBST(BSD_COMP)
|
||||
AC_SUBST(SOLARIS_BITTYPES)
|
||||
AC_SUBST(USE_FIONBIO_IOCTL)
|
||||
AC_SUBST(PORT_NONBLOCK)
|
||||
AC_SUBST(PORT_DIR)
|
||||
PORT_INCLUDE=${PORT_DIR}/include
|
||||
AC_SUBST(PORT_INCLUDE)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: ev_connects.c,v 1.6 2005/04/27 04:56:35 sra Exp $";
|
||||
static const char rcsid[] = "$Id: ev_connects.c,v 1.7 2005/07/08 04:30:21 marka Exp $";
|
||||
#endif
|
||||
|
||||
/* Import. */
|
||||
@@ -168,10 +168,10 @@ evCancelConn(evContext opaqueCtx, evConnID id) {
|
||||
return (-1);
|
||||
} else {
|
||||
#ifdef USE_FIONBIO_IOCTL
|
||||
int on = 1;
|
||||
OK(ioctl(this->fd, FIONBIO, (char *)&on));
|
||||
int off = 0;
|
||||
OK(ioctl(this->fd, FIONBIO, (char *)&off));
|
||||
#else
|
||||
OK(fcntl(this->fd, F_SETFL, mode | PORT_NONBLOCK));
|
||||
OK(fcntl(this->fd, F_SETFL, mode & ~PORT_NONBLOCK));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: ev_files.c,v 1.6 2005/04/27 04:56:35 sra Exp $";
|
||||
static const char rcsid[] = "$Id: ev_files.c,v 1.7 2005/07/08 04:30:21 marka Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -203,7 +203,7 @@ evDeselectFD(evContext opaqueCtx, evFileID opaqueID) {
|
||||
* and (b) the caller didn't ask us anything about O_NONBLOCK.
|
||||
*/
|
||||
#ifdef USE_FIONBIO_IOCTL
|
||||
int off = 1;
|
||||
int off = 0;
|
||||
(void) ioctl(del->fd, FIONBIO, (char *)&off);
|
||||
#else
|
||||
(void) fcntl(del->fd, F_SETFL, mode & ~PORT_NONBLOCK);
|
||||
|
||||
@@ -27,9 +27,7 @@
|
||||
@INNETGR_ARGS@
|
||||
@SETNETGRENT_ARGS@
|
||||
@USE_IFNAMELINKID@
|
||||
|
||||
/* XXX sunos and cygwin needs O_NDELAY */
|
||||
#define PORT_NONBLOCK O_NONBLOCK
|
||||
@PORT_NONBLOCK@
|
||||
|
||||
/*! \brief
|
||||
* We need to know the IPv6 address family number even on IPv4-only systems.
|
||||
|
||||
Reference in New Issue
Block a user