From 8251a574fb2a0dd2ec2155259057cb6fa5bf1a0f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 4 Feb 2014 13:51:06 +0000 Subject: [PATCH] Karlson2k: Fix win32 cURL tests --- configure.ac | 2 +- src/testcurl/test_digestauth.c | 4 ++++ src/testcurl/test_digestauth_with_arguments.c | 4 ++++ src/testcurl/test_postform.c | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 836f602c..f9b51e71 100644 --- 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 index 926093a3..425b3a61 100644 --- a/src/testcurl/test_digestauth.c +++ b/src/testcurl/test_digestauth.c @@ -31,7 +31,9 @@ #include #include #include +#ifdef HAVE_GCRYPT_H #include +#endif #ifndef WINDOWS #include @@ -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 index 44137c7b..947b9e00 100644 --- a/src/testcurl/test_digestauth_with_arguments.c +++ b/src/testcurl/test_digestauth_with_arguments.c @@ -30,7 +30,9 @@ #include #include #include +#ifdef HAVE_GCRYPT_H #include +#endif #ifndef WINDOWS #include @@ -227,9 +229,11 @@ 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; diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c index da9eac33..69c9f27e 100644 --- a/src/testcurl/test_postform.c +++ b/src/testcurl/test_postform.c @@ -31,7 +31,9 @@ #include #include #include +#ifdef HAVE_GCRYPT_H #include +#endif #ifndef WINDOWS #include @@ -468,9 +470,11 @@ 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))