Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
b2f160f2
Commit
b2f160f2
authored
Jul 08, 2005
by
Mark Andrews
Browse files
1898. [port] sunos: non blocking i/o support. [RT #14951]
parent
0bb7c66e
Changes
8
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
b2f160f2
1898. [port] sunos: non blocking i/o support. [RT #14951]
1897. [func] Support for IPSECKEY rdata type. [RT #14967]
1896. [bug] The cache could delete expired records too fast for
...
...
configure.in
View file @
b2f160f2
...
...
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.38
1
$)
AC_REVISION($Revision: 1.38
2
$)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
...
...
@@ -1960,6 +1960,22 @@ AC_SUBST(ISC_PLATFORM_USESTDASM)
ISC_ARCH_DIR=$arch
AC_SUBST(ISC_ARCH_DIR)
#
# The following sets up how non-blocking i/o is established.
# Sunos, cygwin and solaris 2.x (x<5) require special handling.
#
case "$host" in
*-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
*-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
*-solaris2.[[01234]]*)
AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
AC_DEFINE(USE_FIONBIO_IOCTL, 1,
[Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
;;
*) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
[Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
;;
esac
#
# The following sections deal with tools used for formatting
# the documentation. They are all optional, unless you are
...
...
lib/bind/configure.in
View file @
b2f160f2
...
...
@@ -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.10
3
$)
AC_REVISION($Revision: 1.10
4
$)
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)
...
...
lib/bind/isc/ev_connects.c
View file @
b2f160f2
...
...
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
static
const
char
rcsid
[]
=
"$Id: ev_connects.c,v 1.
6
2005/0
4/27 04:56:35 sr
a Exp $"
;
static
const
char
rcsid
[]
=
"$Id: ev_connects.c,v 1.
7
2005/0
7/08 04:30:21 mark
a Exp $"
;
#endif
/* Import. */
...
...
@@ -168,10 +168,10 @@ evCancelConn(evContext opaqueCtx, evConnID id) {
return
(
-
1
);
}
else
{
#ifdef USE_FIONBIO_IOCTL
int
o
n
=
1
;
OK
(
ioctl
(
this
->
fd
,
FIONBIO
,
(
char
*
)
&
o
n
));
int
o
ff
=
0
;
OK
(
ioctl
(
this
->
fd
,
FIONBIO
,
(
char
*
)
&
o
ff
));
#else
OK
(
fcntl
(
this
->
fd
,
F_SETFL
,
mode
|
PORT_NONBLOCK
));
OK
(
fcntl
(
this
->
fd
,
F_SETFL
,
mode
&
~
PORT_NONBLOCK
));
#endif
}
}
...
...
lib/bind/isc/ev_files.c
View file @
b2f160f2
...
...
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
static
const
char
rcsid
[]
=
"$Id: ev_files.c,v 1.
6
2005/0
4/27 04:56:35 sr
a Exp $"
;
static
const
char
rcsid
[]
=
"$Id: ev_files.c,v 1.
7
2005/0
7/08 04:30:21 mark
a 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
);
...
...
lib/bind/port_after.h.in
View file @
b2f160f2
...
...
@@ -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.
...
...
lib/isc/unix/entropy.c
View file @
b2f160f2
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.7
3
2005/0
4/29 00:23:49
marka Exp $ */
/* $Id: entropy.c,v 1.7
4
2005/0
7/08 04:30:22
marka Exp $ */
/* \file unix/entropy.c
* \brief
...
...
@@ -447,16 +447,25 @@ make_nonblock(int fd) {
int
ret
;
int
flags
;
char
strbuf
[
ISC_STRERRORSIZE
];
#ifdef USE_FIONBIO_IOCTL
int
on
=
1
;
ret
=
ioctl
(
fd
,
FIONBIO
,
(
char
*
)
&
on
);
#else
flags
=
fcntl
(
fd
,
F_GETFL
,
0
);
flags
|=
O
_NONBLOCK
;
flags
|=
PORT
_NONBLOCK
;
ret
=
fcntl
(
fd
,
F_SETFL
,
flags
);
#endif
if
(
ret
==
-
1
)
{
isc__strerror
(
errno
,
strbuf
,
sizeof
(
strbuf
));
UNEXPECTED_ERROR
(
__FILE__
,
__LINE__
,
"fcntl(%d, F_SETFL, %d): %s"
,
fd
,
flags
,
strbuf
);
#ifdef USE_FIONBIO_IOCTL
"ioctl(%d, FIONBIO, &on): %s"
,
fd
,
#else
"fcntl(%d, F_SETFL, %d): %s"
,
fd
,
flags
,
#endif
strbuf
);
return
(
ISC_R_UNEXPECTED
);
}
...
...
@@ -502,7 +511,7 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
if
(
is_usocket
)
fd
=
socket
(
PF_UNIX
,
SOCK_STREAM
,
0
);
else
fd
=
open
(
fname
,
O_RDONLY
|
O
_NONBLOCK
,
0
);
fd
=
open
(
fname
,
O_RDONLY
|
PORT
_NONBLOCK
,
0
);
if
(
fd
<
0
)
{
ret
=
isc__errno2result
(
errno
);
...
...
lib/isc/unix/socket.c
View file @
b2f160f2
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.25
0
2005/0
5/19 02:42:4
2 marka Exp $ */
/* $Id: socket.c,v 1.25
1
2005/0
7/08 04:30:2
2 marka Exp $ */
/*! \file */
...
...
@@ -435,16 +435,25 @@ make_nonblock(int fd) {
int
ret
;
int
flags
;
char
strbuf
[
ISC_STRERRORSIZE
];
#ifdef USE_FIONBIO_IOCTL
int
on
=
1
;
ret
=
ioctl
(
fd
,
FIONBIO
,
(
char
*
)
&
on
);
#else
flags
=
fcntl
(
fd
,
F_GETFL
,
0
);
flags
|=
O
_NONBLOCK
;
flags
|=
PORT
_NONBLOCK
;
ret
=
fcntl
(
fd
,
F_SETFL
,
flags
);
#endif
if
(
ret
==
-
1
)
{
isc__strerror
(
errno
,
strbuf
,
sizeof
(
strbuf
));
UNEXPECTED_ERROR
(
__FILE__
,
__LINE__
,
"fcntl(%d, F_SETFL, %d): %s"
,
fd
,
flags
,
strbuf
);
#ifdef USE_FIONBIO_IOCTL
"ioctl(%d, FIONBIO, &on): %s"
,
fd
,
#else
"fcntl(%d, F_SETFL, %d): %s"
,
fd
,
flags
,
#endif
strbuf
);
return
(
ISC_R_UNEXPECTED
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment