enhanced the openssl library check in configure.ac
This commit is contained in:
@ -365,6 +365,7 @@ pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
@ -657,7 +657,7 @@ int main (int argc, char* argv[])
|
||||
tcp_conn.options = MIO_DEV_SCK_CONNECT_SSL;
|
||||
if (mio_dev_sck_connect(tcp[0], &tcp_conn) <= -1)
|
||||
{
|
||||
printf ("mio_dev_sck_connect() failed....\n");
|
||||
MIO_INFO0 (mio, "tcp[0] mio_dev_sck_connect() failed....\n");
|
||||
/* carry on regardless of failure */
|
||||
}
|
||||
|
||||
@ -672,7 +672,7 @@ int main (int argc, char* argv[])
|
||||
tcp[1] = mio_dev_sck_make(mio, MIO_SIZEOF(tcp_server_t), &tcp_make);
|
||||
if (!tcp[1])
|
||||
{
|
||||
printf ("Cannot make tcp\n");
|
||||
MIO_INFO0 (mio, "cannot make tcp[1]....\n");
|
||||
goto oops;
|
||||
}
|
||||
ts = (tcp_server_t*)(tcp[1] + 1);
|
||||
@ -684,7 +684,7 @@ int main (int argc, char* argv[])
|
||||
|
||||
if (mio_dev_sck_bind(tcp[1],&tcp_bind) <= -1)
|
||||
{
|
||||
printf ("tcp[1] mio_dev_sck_bind() failed....\n");
|
||||
MIO_INFO0 (mio, "tcp[1] mio_dev_sck_bind() failed....\n");
|
||||
goto oops;
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ int main (int argc, char* argv[])
|
||||
tcp_lstn.backlogs = 100;
|
||||
if (mio_dev_sck_listen(tcp[1], &tcp_lstn) <= -1)
|
||||
{
|
||||
printf ("tcp[1] mio_dev_sck_listen() failed....\n");
|
||||
MIO_INFO0 (mio, "tcp[1] mio_dev_sck_listen() failed....\n");
|
||||
goto oops;
|
||||
}
|
||||
|
||||
@ -722,14 +722,14 @@ int main (int argc, char* argv[])
|
||||
|
||||
if (mio_dev_sck_bind(tcp[2], &tcp_bind) <= -1)
|
||||
{
|
||||
printf ("tcp[2] mio_dev_sck_bind() failed....\n");
|
||||
MIO_INFO0 (mio, "tcp[2] mio_dev_sck_bind() failed....\n");
|
||||
goto oops;
|
||||
}
|
||||
|
||||
tcp_lstn.backlogs = 100;
|
||||
if (mio_dev_sck_listen(tcp[2], &tcp_lstn) <= -1)
|
||||
{
|
||||
printf ("tcp[2] mio_dev_sck_listen() failed....\n");
|
||||
MIO_INFO0 (mio, "tcp[2] mio_dev_sck_listen() failed....\n");
|
||||
goto oops;
|
||||
}
|
||||
|
||||
|
@ -370,6 +370,9 @@
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
|
||||
#undef HAVE_OPENSSL_INIT_SSL
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
|
@ -152,7 +152,7 @@ static pid_t standard_fork_and_exec (mio_t* mio, int pfds[], int flags, param_t*
|
||||
pfds[1] = MIO_SYSHND_INVALID;
|
||||
|
||||
/* let the pipe be standard input */
|
||||
if (dup2 (pfds[0], 0) <= -1) goto slave_oops;
|
||||
if (dup2(pfds[0], 0) <= -1) goto slave_oops;
|
||||
|
||||
close (pfds[0]);
|
||||
pfds[0] = MIO_SYSHND_INVALID;
|
||||
|
@ -1268,25 +1268,6 @@ int mio_dev_timedwrite (mio_dev_t* dev, const void* data, mio_iolen_t len, const
|
||||
return __dev_write(dev, data, len, tmout, wrctx, dstaddr);
|
||||
}
|
||||
|
||||
int mio_makesyshndasync (mio_t* mio, mio_syshnd_t hnd)
|
||||
{
|
||||
#if defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK)
|
||||
int flags;
|
||||
|
||||
if ((flags = fcntl(hnd, F_GETFL)) <= -1 ||
|
||||
(flags = fcntl(hnd, F_SETFL, flags | O_NONBLOCK)) <= -1)
|
||||
{
|
||||
mio_seterrwithsyserr (mio, 0, errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
#else
|
||||
mio_seterrnum (mio, MIO_ENOIMPL);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void mio_gettime (mio_t* mio, mio_ntime_t* now)
|
||||
|
@ -67,3 +67,26 @@ void mio_sys_fini (mio_t* mio)
|
||||
mio_freemem (mio, mio->sysdep);
|
||||
mio->sysdep = MIO_NULL;
|
||||
}
|
||||
|
||||
|
||||
/* TODO: migrate this function */
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
int mio_makesyshndasync (mio_t* mio, mio_syshnd_t hnd)
|
||||
{
|
||||
#if defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK)
|
||||
int flags;
|
||||
|
||||
if ((flags = fcntl(hnd, F_GETFL)) <= -1 ||
|
||||
(flags = fcntl(hnd, F_SETFL, flags | O_NONBLOCK)) <= -1)
|
||||
{
|
||||
mio_seterrwithsyserr (mio, 0, errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
#else
|
||||
mio_seterrnum (mio, MIO_ENOIMPL);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user