libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 8251a574fb2a0dd2ec2155259057cb6fa5bf1a0f
parent 0d8aeae6df35a54ec2e612eb944663880758b857
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  4 Feb 2014 13:51:06 +0000

Karlson2k: Fix win32 cURL tests

Diffstat:
Mconfigure.ac | 2+-
Msrc/testcurl/test_digestauth.c | 4++++
Msrc/testcurl/test_digestauth_with_arguments.c | 4++++
Msrc/testcurl/test_postform.c | 4++++
4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac @@ -225,7 +225,7 @@ AC_SUBST(PTHREAD_CPPFLAGS) AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard UNIX headers files])) # Check for optional headers -AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h poll.h winsock2.h ws2tcpip.h]) +AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h poll.h winsock2.h ws2tcpip.h gcrypt.h]) AC_CHECK_HEADERS([search.h], AM_CONDITIONAL(HAVE_TSEARCH, true), AM_CONDITIONAL(HAVE_TSEARCH, false)) diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c @@ -31,7 +31,9 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#ifdef HAVE_GCRYPT_H #include <gcrypt.h> +#endif #ifndef WINDOWS #include <sys/socket.h> @@ -229,10 +231,12 @@ main (int argc, char *const *argv) { unsigned int errorCount = 0; +#ifdef HAVE_GCRYPT_H gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); #ifdef GCRYCTL_INITIALIZATION_FINISHED gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); #endif +#endif if (0 != curl_global_init (CURL_GLOBAL_WIN32)) return 2; errorCount += testDigestAuth (); diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c @@ -30,7 +30,9 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#ifdef HAVE_GCRYPT_H #include <gcrypt.h> +#endif #ifndef WINDOWS #include <sys/socket.h> @@ -227,10 +229,12 @@ main (int argc, char *const *argv) { unsigned int errorCount = 0; +#ifdef HAVE_GCRYPT_H gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); #ifdef GCRYCTL_INITIALIZATION_FINISHED gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); #endif +#endif if (0 != curl_global_init (CURL_GLOBAL_WIN32)) return 2; errorCount += testDigestAuth (); diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c @@ -31,7 +31,9 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#ifdef HAVE_GCRYPT_H #include <gcrypt.h> +#endif #ifndef WINDOWS #include <unistd.h> @@ -468,10 +470,12 @@ main (int argc, char *const *argv) { unsigned int errorCount = 0; +#ifdef HAVE_GCRYPT_H gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); #ifdef GCRYCTL_INITIALIZATION_FINISHED gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); #endif +#endif oneone = NULL != strstr (argv[0], "11"); if (0 != curl_global_init (CURL_GLOBAL_WIN32)) return 2;