mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-11-23 17:53:49 +08:00
Reverted r3181, accomplish the same thing via a special case
for Windows stdcall functions in configure.ac (Alon Bar-Lev). Minor fix to cryptoapi.c to not compile itself unless USE_CRYPTO and USE_SSL flags are enabled (Alon Bar-Lev). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3183 e7ae566f-a301-0410-adde-c780ea21d3b5
This commit is contained in:
parent
96f77a2e64
commit
0eb2ee1435
23
configure.ac
23
configure.ac
@ -458,17 +458,25 @@ AC_CHECK_SIZEOF(unsigned long)
|
||||
|
||||
AC_CACHE_SAVE
|
||||
|
||||
AC_CHECK_FUNCS([ctime memset vsnprintf strdup], ,
|
||||
[AC_MSG_ERROR([Required library function not found])])
|
||||
AC_CHECK_FUNCS(daemon chroot getpwnam setuid nice system getpid dup dup2 dnl
|
||||
getpass strerror syslog openlog mlockall getgrnam setgid dnl
|
||||
setgroups stat flock readv writev setsockopt getsockopt dnl
|
||||
setgroups stat flock readv writev time dnl
|
||||
setsid chdir putenv getpeername unlink dnl
|
||||
poll chsize ftruncate sendmsg recvmsg getsockname dnl
|
||||
execve)
|
||||
AC_CACHE_SAVE
|
||||
chsize ftruncate execve)
|
||||
|
||||
# Windows use stdcall for winsock so we cannot auto detect these
|
||||
m4_define([SOCKET_FUNCS], [socket recv recvfrom send sendto listen dnl
|
||||
accept connect bind select gethostbyname inet_ntoa])
|
||||
m4_define([SOCKET_OPT_FUNCS], [setsockopt getsockopt getsockname poll])
|
||||
|
||||
if test "${WIN32}" = "yes"; then
|
||||
|
||||
AC_DEFINE([HAVE_GETTIMEOFDAY], [1], [We fake gettimeofday for win32 at otime.c])
|
||||
m4_foreach([F], m4_split(SOCKET_FUNCS SOCKET_OPT_FUNCS),
|
||||
m4_define(UF, [[m4_join([_], [HAVE], m4_toupper(F))]])
|
||||
AC_DEFINE([UF], [1], [Win32 builtin]))
|
||||
|
||||
else
|
||||
|
||||
@ -489,10 +497,9 @@ else
|
||||
|
||||
AC_CHECK_FUNCS(gettimeofday)
|
||||
|
||||
AC_CHECK_FUNCS(socket recv recvfrom send sendto listen dnl
|
||||
accept connect bind select gethostbyname dnl
|
||||
inet_ntoa time ctime memset vsnprintf strdup, [],
|
||||
[AC_MSG_ERROR([Required library function not found])])
|
||||
AC_CHECK_FUNCS(SOCKET_FUNCS, ,
|
||||
[AC_MSG_ERROR([Required library function not found])])
|
||||
AC_CHECK_FUNCS(SOCKET_OPT_FUNCS sendmsg recvmsg)
|
||||
|
||||
fi
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include "syshead.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && defined(USE_CRYPTO) && defined(USE_SSL)
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
|
12
syshead.h
12
syshead.h
@ -54,18 +54,6 @@
|
||||
#define sleep(x) Sleep((x)*1000)
|
||||
#define random rand
|
||||
#define srandom srand
|
||||
|
||||
/* MinGW autoconf workaround */
|
||||
|
||||
#undef HAVE_SETSOCKOPT
|
||||
#define HAVE_SETSOCKOPT 1
|
||||
|
||||
#undef HAVE_GETSOCKOPT
|
||||
#define HAVE_GETSOCKOPT 1
|
||||
|
||||
#undef HAVE_POLL
|
||||
#define HAVE_POLL 1
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
|
Loading…
Reference in New Issue
Block a user