Numerous opensolaris compilation fixes

For future note, opensolaris doesn't have sys/sysctl.h, doesn't like
comparing iov_buf to a chain_space_ptr without a cast, and is (predictably)
unforgiving of dumb syntax errors.

Also, we had accidentally broken the devpoll backend test in configure.in
This commit is contained in:
Nick Mathewson 2010-05-08 18:09:27 -04:00
parent f89168e7ea
commit c44de06c76
4 changed files with 7 additions and 4 deletions

View File

@ -57,8 +57,10 @@
#include <unistd.h> #include <unistd.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#ifdef _EVENT_HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
#endif
#include <limits.h> #include <limits.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -615,7 +615,7 @@ evbuffer_commit_space(struct evbuffer *buf,
result = 0; result = 0;
goto done; goto done;
} else if (n_vecs == 1 && } else if (n_vecs == 1 &&
(buf->last && vec[0].iov_base == CHAIN_SPACE_PTR(buf->last))) { (buf->last && vec[0].iov_base == (void*)CHAIN_SPACE_PTR(buf->last))) {
/* The user only got or used one chain; it might not /* The user only got or used one chain; it might not
* be the first one with space in it. */ * be the first one with space in it. */
if (vec[0].iov_len > CHAIN_SPACE_LEN(buf->last)) if (vec[0].iov_len > CHAIN_SPACE_LEN(buf->last))
@ -641,7 +641,7 @@ evbuffer_commit_space(struct evbuffer *buf,
for (i=0; i<n_vecs; ++i) { for (i=0; i<n_vecs; ++i) {
if (!chain) if (!chain)
goto done; goto done;
if (vec[i].iov_base != CHAIN_SPACE_PTR(chain) || if (vec[i].iov_base != (void*)CHAIN_SPACE_PTR(chain) ||
vec[i].iov_len > CHAIN_SPACE_LEN(chain)) vec[i].iov_len > CHAIN_SPACE_LEN(chain))
goto done; goto done;
chain = chain->next; chain = chain->next;

View File

@ -287,7 +287,7 @@ if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
AC_DEFINE(HAVE_DEVPOLL, 1, AC_DEFINE(HAVE_DEVPOLL, 1,
[Define if /dev/poll is available]) [Define if /dev/poll is available])
fi fi
AM_CONDITIONAL(DEVPOLL_BACKEND, [test "ac_cv_header_sys_devpoll_h" = "xyes"]) AM_CONDITIONAL(DEVPOLL_BACKEND, [test "x$ac_cv_header_sys_devpoll_h" = "xyes"])
havekqueue=no havekqueue=no
if test "x$ac_cv_header_sys_event_h" = "xyes"; then if test "x$ac_cv_header_sys_event_h" = "xyes"; then

View File

@ -124,7 +124,8 @@ const struct eventop evportops = {
evport_dispatch, evport_dispatch,
evport_dealloc, evport_dealloc,
1, /* need reinit */ 1, /* need reinit */
0 0, /* features */
0, /* fdinfo length */
}; };
/* /*