gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r36806 - in libmicrohttpd: . src/microhttpd src/testcurl


From: gnunet
Subject: [GNUnet-SVN] r36806 - in libmicrohttpd: . src/microhttpd src/testcurl
Date: Mon, 11 Jan 2016 21:15:19 +0100

Author: Karlson2k
Date: 2016-01-11 21:15:19 +0100 (Mon, 11 Jan 2016)
New Revision: 36806

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/configure.ac
   libmicrohttpd/src/microhttpd/basicauth.c
   libmicrohttpd/src/microhttpd/connection.c
   libmicrohttpd/src/microhttpd/connection_https.c
   libmicrohttpd/src/microhttpd/daemon.c
   libmicrohttpd/src/microhttpd/digestauth.c
   libmicrohttpd/src/microhttpd/internal.c
   libmicrohttpd/src/microhttpd/internal.h
   libmicrohttpd/src/testcurl/curl_version_check.c
Log:
configure.ac: cleanup and fixes related to optional features, corresponding 
changes in source files

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2016-01-11 20:15:15 UTC (rev 36805)
+++ libmicrohttpd/ChangeLog     2016-01-11 20:15:19 UTC (rev 36806)
@@ -1,3 +1,6 @@
+Mon Jan 11 19:58:50 CET 2016
+       Configure.ac small fixes and refactoring. -EG
+
 Fri Dec 18 15:54:50 CET 2015
        Releasing libmicrohttpd 0.9.48. -CG
 

Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac  2016-01-11 20:15:15 UTC (rev 36805)
+++ libmicrohttpd/configure.ac  2016-01-11 20:15:19 UTC (rev 36806)
@@ -610,35 +610,30 @@
 AC_CHECK_FUNCS([_lseeki64 lseek64 sendfile64])
 
 # optional: have error messages ?
-AC_MSG_CHECKING(whether to generate error messages)
+AC_MSG_CHECKING([[whether to generate error messages]])
 AC_ARG_ENABLE([messages],
    [AS_HELP_STRING([--disable-messages],
                [disable MHD error messages])],
    [enable_messages=${enableval}],
    [enable_messages=yes])
-AC_MSG_RESULT($enable_messages)
-if test "$enable_messages" = "yes"
-then
- AC_DEFINE([HAVE_MESSAGES],[1],[Include error messages])
-else
- AC_DEFINE([HAVE_MESSAGES],[0],[Disable error messages])
-fi
+AS_IF([[test "x$enable_messages" = "xyes"]],
+  [ AC_DEFINE([HAVE_MESSAGES],[1],[Define to 1 to enable support for error 
messages.]) ],
+  [[ enable_messages=no ]])
+AC_MSG_RESULT([[$enable_messages]])
 
 
 # optional: have postprocessor?
-AC_MSG_CHECKING(whether to enable postprocessor)
+AC_MSG_CHECKING([[whether to enable postprocessor]])
 AC_ARG_ENABLE([postprocessor],
    [AS_HELP_STRING([--disable-postprocessor],
                [disable MHD PostProcessor functionality])],
    [enable_postprocessor=${enableval}],
    [enable_postprocessor=yes])
-test "x$enable_postprocessor" = "xno" || enable_postprocessor=yes
+AS_IF([[test "x$enable_postprocessor" != "xno"]],
+  [ enable_postprocessor=yes
+    AC_DEFINE([HAVE_POSTPROCESSOR],[1],[Define to 1 if libmicrohttpd is 
compiled with postprocessor support.]) ])
+AM_CONDITIONAL([HAVE_POSTPROCESSOR], [test "x$enable_postprocessor" != "xno"])
 AC_MSG_RESULT([[$enable_postprocessor]])
-AM_CONDITIONAL([HAVE_POSTPROCESSOR],test "x$enable_postprocessor" != "xno")
-if test "x$enable_postprocessor" != "xno"
-then
- AC_DEFINE([HAVE_POSTPROCESSOR],[1],[define to 1 if MHD was build with 
postprocessor.c])
-fi
 
 
 # optional: have zzuf, socat?
@@ -819,38 +814,30 @@
 AM_CONDITIONAL([ENABLE_HTTPS], [test "x$enable_https" = "xyes"])
 
 # optional: HTTP Basic Auth support. Enabled by default
-AC_MSG_CHECKING(whether to support HTTP basic authentication)
+AC_MSG_CHECKING([[whether to support HTTP basic authentication]])
 AC_ARG_ENABLE([bauth],
                AS_HELP_STRING([--disable-bauth],
                        [disable HTTP basic Auth support]),
                [enable_bauth=${enableval}],
                [enable_bauth=yes])
-if test "x$enable_bauth" != "xno"
-then
- enable_bauth=yes
- AC_DEFINE([BAUTH_SUPPORT],[1],[include basic Auth support])
-else
- AC_DEFINE([BAUTH_SUPPORT],[0],[disable basic Auth support])
-fi
-AC_MSG_RESULT($enable_bauth)
-AM_CONDITIONAL(ENABLE_BAUTH, [test "x$enable_bauth" != "xno"])
+AS_IF([[test "x$enable_bauth" != "xno"]],
+  [ enable_bauth=yes
+    AC_DEFINE([BAUTH_SUPPORT],[1],[Define to 1 if libmicrohttpd is compiled 
with basic Auth support.]) ])
+AM_CONDITIONAL([ENABLE_BAUTH], [test "x$enable_bauth" != "xno"])
+AC_MSG_RESULT([[$enable_bauth]])
 
 # optional: HTTP Digest Auth support. Enabled by default
-AC_MSG_CHECKING(whether to support HTTP digest authentication)
+AC_MSG_CHECKING([[whether to support HTTP digest authentication]])
 AC_ARG_ENABLE([dauth],
                AS_HELP_STRING([--disable-dauth],
                        [disable HTTP basic and digest Auth support]),
                [enable_dauth=${enableval}],
                [enable_dauth=yes])
-if test "x$enable_dauth" != "xno"
-then
- enable_dauth=yes
- AC_DEFINE([DAUTH_SUPPORT],[1],[include digest Auth support])
-else
- AC_DEFINE([DAUTH_SUPPORT],[0],[disable digest Auth support])
-fi
-AC_MSG_RESULT($enable_dauth)
-AM_CONDITIONAL(ENABLE_DAUTH, [test "x$enable_dauth" != "xno"])
+AS_IF([[test "x$enable_dauth" != "xno"]],
+  [ enable_dauth=yes
+    AC_DEFINE([DAUTH_SUPPORT],[1],[Define to 1 if libmicrohttpd is compiled 
with digest Auth support.]) ])
+AM_CONDITIONAL([ENABLE_DAUTH], [test "x$enable_dauth" != "xno"])
+AC_MSG_RESULT([[$enable_dauth]])
 
 
 

Modified: libmicrohttpd/src/microhttpd/basicauth.c
===================================================================
--- libmicrohttpd/src/microhttpd/basicauth.c    2016-01-11 20:15:15 UTC (rev 
36805)
+++ libmicrohttpd/src/microhttpd/basicauth.c    2016-01-11 20:15:19 UTC (rev 
36806)
@@ -59,7 +59,7 @@
   header += strlen (_BASIC_BASE);
   if (NULL == (decode = BASE64Decode (header)))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Error decoding basic authentication\n");
 #endif
@@ -68,7 +68,7 @@
   /* Find user:password pattern */
   if (NULL == (separator = strchr (decode, ':')))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG(connection->daemon,
               "Basic authentication doesn't contain ':' separator\n");
 #endif
@@ -86,7 +86,7 @@
       *password = strdup (separator + 1);  
       if (NULL == *password)
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          MHD_DLOG(connection->daemon,
                   "Failed to allocate memory for password\n");
 #endif
@@ -124,7 +124,7 @@
   header = (char*)malloc(hlen);
   if (NULL == header)
   {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
     MHD_DLOG(connection->daemon,
                   "Failed to allocate memory for auth header\n");
 #endif /* HAVE_MESSAGES */

Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c   2016-01-11 20:15:15 UTC (rev 
36805)
+++ libmicrohttpd/src/microhttpd/connection.c   2016-01-11 20:15:19 UTC (rev 
36806)
@@ -56,7 +56,7 @@
  * Intentionally empty here to keep our memory footprint
  * minimal.
  */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #define REQUEST_TOO_BIG "<html><head><title>Request too 
big</title></head><body>Your HTTP header was too big for the memory constraints 
of this webserver.</body></html>"
 #else
 #define REQUEST_TOO_BIG ""
@@ -69,7 +69,7 @@
  * Intentionally empty here to keep our memory footprint
  * minimal.
  */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #define REQUEST_LACKS_HOST "<html><head><title>&quot;Host:&quot; header 
required</title></head><body>In HTTP 1.1, requests must include a 
&quot;Host:&quot; header, and your HTTP 1.1 request lacked such a 
header.</body></html>"
 #else
 #define REQUEST_LACKS_HOST ""
@@ -82,7 +82,7 @@
  * Intentionally empty here to keep our memory footprint
  * minimal.
  */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #define REQUEST_MALFORMED "<html><head><title>Request 
malformed</title></head><body>Your HTTP request was syntactically 
incorrect.</body></html>"
 #else
 #define REQUEST_MALFORMED ""
@@ -94,7 +94,7 @@
  * Intentionally empty here to keep our memory footprint
  * minimal.
  */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #define INTERNAL_ERROR "<html><head><title>Internal server 
error</title></head><body>Some programmer needs to study the manual more 
carefully.</body></html>"
 #else
 #define INTERNAL_ERROR ""
@@ -503,7 +503,7 @@
 connection_close_error (struct MHD_Connection *connection,
                        const char *emsg)
 {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   if (NULL != emsg)
     MHD_DLOG (connection->daemon, emsg);
 #endif
@@ -516,7 +516,7 @@
  * Macro to only include error message in call to
  * "connection_close_error" if we have HAVE_MESSAGES.
  */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #define CONNECTION_CLOSE_ERROR(c, emsg) connection_close_error (c, emsg)
 #else
 #define CONNECTION_CLOSE_ERROR(c, emsg) connection_close_error (c, NULL)
@@ -1054,7 +1054,7 @@
   data = MHD_pool_allocate (connection->pool, size + 1, MHD_NO);
   if (NULL == data)
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                 "Not enough memory for write!\n");
 #endif
@@ -1148,7 +1148,7 @@
     }
   connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
   connection->read_closed = MHD_YES;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   MHD_DLOG (connection->daemon,
             "Error %u (`%s') processing request, closing connection.\n",
             status_code, message);
@@ -1392,7 +1392,7 @@
                                key,
                                value))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                 "Not enough memory to allocate header record!\n");
 #endif
@@ -1432,7 +1432,7 @@
   cpy = MHD_pool_allocate (connection->pool, strlen (hdr) + 1, MHD_YES);
   if (NULL == cpy)
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                 "Not enough memory to parse cookies!\n");
 #endif
@@ -1754,7 +1754,7 @@
         }
       if (processed > used)
         mhd_panic (mhd_panic_cls, __FILE__, __LINE__
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
                   , "API violation"
 #else
                   , NULL
@@ -2040,7 +2040,7 @@
       /* die, http 1.1 request without host and we are pedantic */
       connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
       connection->read_closed = MHD_YES;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                 "Received `%s' request without `%s' header.\n",
                 MHD_HTTP_VERSION_1_1, MHD_HTTP_HEADER_HOST);
@@ -2076,7 +2076,7 @@
           if ( ('\0' != *end) ||
             ( (LONG_MAX == cval) && (errno == ERANGE) ) )
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (connection->daemon,
                         "Failed to parse `%s' header `%s', closing 
connection.\n",
                         MHD_HTTP_HEADER_CONTENT_LENGTH,
@@ -2229,7 +2229,7 @@
               const int err = MHD_socket_errno_;
               if ((err == EINTR) || (err == EAGAIN) || (EWOULDBLOCK == err))
                 break;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (connection->daemon,
                         "Failed to send data: %s\n",
                         MHD_socket_last_strerr_ ());
@@ -2296,7 +2296,7 @@
               {
                 if ((err == EINTR) || (err == EAGAIN) || (EWOULDBLOCK == err))
                   return MHD_YES;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
                 MHD_DLOG (connection->daemon,
                           "Failed to send data: %s\n",
                           MHD_socket_last_strerr_ ());
@@ -2909,7 +2909,7 @@
                          connection->socket_fd,
                          &event))
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          if (0 != (daemon->options & MHD_USE_DEBUG))
            MHD_DLOG (daemon,
                      "Call to epoll_ctl failed: %s\n",

Modified: libmicrohttpd/src/microhttpd/connection_https.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection_https.c     2016-01-11 20:15:15 UTC 
(rev 36805)
+++ libmicrohttpd/src/microhttpd/connection_https.c     2016-01-11 20:15:19 UTC 
(rev 36806)
@@ -65,7 +65,7 @@
          return MHD_YES;
        }
       /* handshake failed */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Error: received handshake message out of context\n");
 #endif

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2016-01-11 20:15:15 UTC (rev 
36805)
+++ libmicrohttpd/src/microhttpd/daemon.c       2016-01-11 20:15:19 UTC (rev 
36806)
@@ -131,7 +131,7 @@
               unsigned int line,
               const char *reason)
 {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   fprintf (stderr,
            "Fatal error in GNU libmicrohttpd %s:%u: %s\n",
           file, line, reason);
@@ -334,7 +334,7 @@
                                &daemon->per_ip_connection_count,
                                &MHD_ip_addr_compare)))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Failed to add IP connection count node\n");
 #endif
@@ -523,7 +523,7 @@
       if (gnutls_certificate_set_x509_trust_mem (daemon->x509_cred, &cert,
                                                 GNUTLS_X509_FMT_PEM) < 0)
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          MHD_DLOG(daemon,
                   "Bad trust certificate format\n");
 #endif
@@ -553,7 +553,7 @@
                                                     daemon->https_key_password,
                                                     0);
 #else
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
        MHD_DLOG (daemon,
                   "Failed to setup x509 certificate/key: pre 3.X.X version " \
                  "of GnuTLS does not support setting key password");
@@ -565,7 +565,7 @@
         ret = gnutls_certificate_set_x509_key_mem (daemon->x509_cred,
                                                    &cert, &key,
                                                    GNUTLS_X509_FMT_PEM);
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       if (0 != ret)
         MHD_DLOG (daemon,
                   "GnuTLS failed to setup x509 certificate/key: %s\n",
@@ -577,7 +577,7 @@
   if (NULL != daemon->cert_callback)
     return 0;
 #endif
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   MHD_DLOG (daemon,
             "You need to specify a certificate and key location\n");
 #endif
@@ -602,7 +602,7 @@
         return GNUTLS_E_MEMORY_ERROR;
       return MHD_init_daemon_certificate (daemon);
     default:
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Error: invalid credentials type %d specified.\n",
                 daemon->cred_type);
@@ -762,7 +762,7 @@
        }
     }
 #if DEBUG_CONNECT
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   if (NULL != max_fd)
     MHD_DLOG (daemon,
               "Maximum socket in select set: %d\n",
@@ -886,7 +886,7 @@
 #endif
             if (0 != err_state)
               {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
                 MHD_DLOG (con->daemon,
                           "Can't add FD to fd_set\n");
 #endif
@@ -898,7 +898,7 @@
            {
              if (EINTR == MHD_socket_errno_)
                continue;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
              MHD_DLOG (con->daemon,
                        "Error during select (%d): `%s'\n",
                        MHD_socket_errno_,
@@ -971,7 +971,7 @@
            {
              if (EINTR == MHD_socket_errno_)
                continue;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
              MHD_DLOG (con->daemon,
                         "Error during poll: `%s'\n",
                        MHD_socket_last_strerr_ ());
@@ -1003,7 +1003,7 @@
   if (MHD_CONNECTION_IN_CLEANUP != con->state)
     {
 #if DEBUG_CLOSE
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (con->daemon,
                 "Processing thread terminating, closing connection\n");
 #endif
@@ -1236,7 +1236,7 @@
     pthread_attr_destroy (&attr);
   return ret;
  ERR:
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   MHD_DLOG (daemon,
            "Failed to set thread stack size\n");
 #endif
@@ -1325,7 +1325,7 @@
   if ( (client_socket >= FD_SETSIZE) &&
        (0 == (daemon->options & (MHD_USE_POLL | MHD_USE_EPOLL_LINUX_ONLY))) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Socket descriptor larger than FD_SETSIZE: %d > %d\n",
                client_socket,
@@ -1341,7 +1341,7 @@
 #endif
 
 
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #if DEBUG_CONNECT
   MHD_DLOG (daemon,
             "Accepted connection on socket %d\n",
@@ -1352,7 +1352,7 @@
        (MHD_NO == MHD_ip_limit_add (daemon, addr, addrlen)) )
     {
       /* above connection limit - reject */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Server reached connection limit (closing inbound 
connection)\n");
 #endif
@@ -1370,7 +1370,7 @@
                               addr, addrlen)) )
     {
 #if DEBUG_CLOSE
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Connection rejected, closing connection\n");
 #endif
@@ -1397,7 +1397,7 @@
   if (NULL == (connection = malloc (sizeof (struct MHD_Connection))))
     {
       eno = errno;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Error allocating memory: %s\n",
                MHD_strerror_ (errno));
@@ -1414,7 +1414,7 @@
   connection->pool = MHD_pool_create (daemon->pool_size);
   if (NULL == connection->pool)
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Error allocating memory: %s\n",
                MHD_strerror_ (errno));
@@ -1433,7 +1433,7 @@
   if (NULL == (connection->addr = malloc (addrlen)))
     {
       eno = errno;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Error allocating memory: %s\n",
                MHD_strerror_ (errno));
@@ -1473,7 +1473,7 @@
          if ( (-1 == flags) ||
               (0 != fcntl (connection->socket_fd, F_SETFL, flags | 
O_NONBLOCK)) )
            {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
              MHD_DLOG (daemon,
                        "Failed to make socket non-blocking: %s\n",
                        MHD_socket_last_strerr_ ());
@@ -1483,7 +1483,7 @@
          unsigned long flags = 1;
          if (0 != ioctlsocket (connection->socket_fd, FIONBIO, &flags))
            {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
              MHD_DLOG (daemon,
                        "Failed to make socket non-blocking: %s\n",
                        MHD_socket_last_strerr_ ());
@@ -1512,7 +1512,7 @@
                                  daemon->x509_cred);
           break;
         default:
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (connection->daemon,
                     "Failed to setup TLS credentials: unknown credential type 
%d\n",
                     daemon->cred_type);
@@ -1570,7 +1570,7 @@
       if (0 != res_thread_create)
         {
          eno = errno;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Failed to create a thread: %s\n",
                     MHD_strerror_ (res_thread_create));
@@ -1583,7 +1583,7 @@
         (MHD_INVALID_PIPE_ != daemon->wpipe[1]) &&
         (1 != MHD_pipe_write_ (daemon->wpipe[1], "n", 1)) )
       {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
        MHD_DLOG (daemon,
                  "failed to signal new connection via pipe");
 #endif
@@ -1603,7 +1603,7 @@
                              &event))
            {
              eno = errno;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "Call to epoll_ctl failed: %s\n",
                         MHD_socket_last_strerr_ ());
@@ -1760,7 +1760,7 @@
   if ( (MHD_INVALID_PIPE_ != daemon->wpipe[1]) &&
        (1 != MHD_pipe_write_ (daemon->wpipe[1], "r", 1)) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "failed to signal resume via pipe");
 #endif
@@ -1853,7 +1853,7 @@
 
   if (0 != ioctlsocket (sock, FIONBIO, &flags))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Failed to make socket non-blocking: %s\n",
                MHD_socket_last_strerr_ ());
@@ -1863,7 +1863,7 @@
       ((dwFlags != (dwFlags & ~HANDLE_FLAG_INHERIT)) &&
        !SetHandleInformation ((HANDLE) sock, HANDLE_FLAG_INHERIT, 0)))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Failed to make socket non-inheritable: %u\n",
                (unsigned int) GetLastError ());
@@ -1883,7 +1883,7 @@
         ( (flags != (flags | FD_CLOEXEC)) &&
           (0 != fcntl (sock, F_SETFD, flags | nonblock | FD_CLOEXEC)) ) ) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Failed to make socket non-inheritable: %s\n",
                MHD_socket_last_strerr_ ());
@@ -1983,7 +1983,7 @@
 #endif
   if ((MHD_INVALID_SOCKET == s) || (addrlen <= 0))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       const int err = MHD_socket_errno_;
       /* This could be a common occurance with multiple worker threads */
       if ( (EINVAL == err) &&
@@ -2005,7 +2005,7 @@
 #if !defined(HAVE_ACCEPT4) || HAVE_ACCEPT4+0 == 0 || 
!defined(HAVE_SOCK_NONBLOCK) || SOCK_CLOEXEC+0 == 0
   make_nonblocking_noninheritable (daemon, s);
 #endif
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #if DEBUG_CONNECT
   MHD_DLOG (daemon,
             "Accepted connection on socket %d\n",
@@ -2133,7 +2133,7 @@
 
   if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Illegal call to MHD_get_timeout\n");
 #endif
@@ -2342,7 +2342,7 @@
       /* single-threaded, go over everything */
       if (MHD_NO == MHD_get_fdset2 (daemon, &rs, &ws, &es, &maxsock, 
FD_SETSIZE))
         {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
         MHD_DLOG (daemon, "Could not obtain daemon fdsets");
 #endif
           err_state = MHD_YES;
@@ -2367,7 +2367,7 @@
                                       &maxsock,
                                       FD_SETSIZE)) )
         {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon, "Could not add listen socket to fdset");
 #endif
           return MHD_NO;
@@ -2392,7 +2392,7 @@
                                         FD_SETSIZE))
             {
 #endif /* MHD_WINSOCK_SOCKETS */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "Could not add control pipe FD to fdset");
 #endif
@@ -2430,7 +2430,7 @@
     {
       if (EINTR == MHD_socket_errno_)
         return (MHD_NO == err_state) ? MHD_YES : MHD_NO;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "select failed: %s\n",
                 MHD_socket_last_strerr_ ());
@@ -2481,7 +2481,7 @@
     p = malloc(sizeof (struct pollfd) * (2 + num_connections));
     if (NULL == p)
       {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
         MHD_DLOG(daemon,
                  "Error allocating memory: %s\n",
                  MHD_strerror_(errno));
@@ -2554,7 +2554,7 @@
         free(p);
         return MHD_YES;
       }
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
        MHD_DLOG (daemon,
                  "poll failed: %s\n",
                  MHD_socket_last_strerr_ ());
@@ -2671,7 +2671,7 @@
     {
       if (EINTR == MHD_socket_errno_)
        return MHD_YES;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "poll failed: %s\n",
                 MHD_socket_last_strerr_ ());
@@ -2764,7 +2764,7 @@
                          daemon->socket_fd,
                          &event))
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Call to epoll_ctl failed: %s\n",
                     MHD_socket_last_strerr_ ());
@@ -2815,7 +2815,7 @@
        {
          if (EINTR == MHD_socket_errno_)
            return MHD_YES;
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Call to epoll_wait failed: %s\n",
                     MHD_socket_last_strerr_ ());
@@ -3087,7 +3087,7 @@
   if ( (MHD_INVALID_PIPE_ == daemon->wpipe[1]) &&
        (0 != (daemon->options & (MHD_USE_SELECT_INTERNALLY | 
MHD_USE_THREAD_PER_CONNECTION))) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Using MHD_quiesce_daemon in this mode requires 
MHD_USE_PIPE_FOR_SHUTDOWN\n");
 #endif
@@ -3241,7 +3241,7 @@
           daemon->worker_pool_size = va_arg (ap, unsigned int);
          if (daemon->worker_pool_size >= (SIZE_MAX / sizeof (struct 
MHD_Daemon)))
            {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
              MHD_DLOG (daemon,
                        "Specified thread pool size (%u) too big\n",
                        daemon->worker_pool_size);
@@ -3253,7 +3253,7 @@
         case MHD_OPTION_HTTPS_MEM_KEY:
          if (0 != (daemon->options & MHD_USE_SSL))
            daemon->https_mem_key = va_arg (ap, const char *);
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          else
            MHD_DLOG (daemon,
                      "MHD HTTPS option %d passed to MHD but MHD_USE_SSL not 
set\n",
@@ -3263,7 +3263,7 @@
         case MHD_OPTION_HTTPS_KEY_PASSWORD:
          if (0 != (daemon->options & MHD_USE_SSL))
            daemon->https_key_password = va_arg (ap, const char *);
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          else
            MHD_DLOG (daemon,
                      "MHD HTTPS option %d passed to MHD but MHD_USE_SSL not 
set\n",
@@ -3273,7 +3273,7 @@
         case MHD_OPTION_HTTPS_MEM_CERT:
          if (0 != (daemon->options & MHD_USE_SSL))
            daemon->https_mem_cert = va_arg (ap, const char *);
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          else
            MHD_DLOG (daemon,
                      "MHD HTTPS option %d passed to MHD but MHD_USE_SSL not 
set\n",
@@ -3283,7 +3283,7 @@
         case MHD_OPTION_HTTPS_MEM_TRUST:
          if (0 != (daemon->options & MHD_USE_SSL))
            daemon->https_mem_trust = va_arg (ap, const char *);
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          else
            MHD_DLOG (daemon,
                      "MHD HTTPS option %d passed to MHD but MHD_USE_SSL not 
set\n",
@@ -3301,7 +3301,7 @@
 
               if (gnutls_dh_params_init (&daemon->https_mem_dhparams) < 0)
                 {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
                   MHD_DLOG(daemon,
                            "Error initializing DH parameters\n");
 #endif
@@ -3312,7 +3312,7 @@
               if (gnutls_dh_params_import_pkcs3 (daemon->https_mem_dhparams, 
&dhpar,
                                                  GNUTLS_X509_FMT_PEM) < 0)
                 {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
                   MHD_DLOG(daemon,
                            "Bad Diffie-Hellman parameters format\n");
 #endif
@@ -3323,7 +3323,7 @@
             }
           else
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "MHD HTTPS option %d passed to MHD but MHD_USE_SSL not 
set\n",
                         opt);
@@ -3340,7 +3340,7 @@
                                          NULL);
              if (GNUTLS_E_SUCCESS != ret)
              {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
                MHD_DLOG (daemon,
                          "Setting priorities to `%s' failed: %s\n",
                          pstr,
@@ -3353,7 +3353,7 @@
           break;
         case MHD_OPTION_HTTPS_CERT_CALLBACK:
 #if GNUTLS_VERSION_MAJOR < 3
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with 
GnuTLS >= 3.0\n");
 #endif
@@ -3377,7 +3377,7 @@
          daemon->socket_fd = va_arg (ap, MHD_socket);
          break;
         case MHD_OPTION_EXTERNAL_LOGGER:
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           daemon->custom_error_log =
             va_arg (ap, VfprintfFunctionPointerType);
           daemon->custom_error_log_cls = va_arg (ap, void *);
@@ -3505,7 +3505,7 @@
           daemon->unescape_callback_cls = va_arg (ap, void *);
           break;
         default:
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           if (((opt >= MHD_OPTION_HTTPS_MEM_KEY) &&
               (opt <= MHD_OPTION_HTTPS_PRIORITIES)) || (opt == 
MHD_OPTION_HTTPS_MEM_TRUST))
             {
@@ -3578,7 +3578,7 @@
 #endif /* !HAVE_EPOLL_CREATE1 */
   if (-1 == daemon->epoll_fd)
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Call to epoll_create1 failed: %s\n",
                 MHD_socket_last_strerr_ ());
@@ -3591,7 +3591,7 @@
       int fdflags = fcntl (daemon->epoll_fd, F_GETFD);
       if (0 > fdflags || 0 > fcntl (daemon->epoll_fd, F_SETFD, fdflags | 
FD_CLOEXEC))
         {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Failed to change flags on epoll fd: %s\n",
                     MHD_socket_last_strerr_ ());
@@ -3611,7 +3611,7 @@
                      daemon->socket_fd,
                      &event))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Call to epoll_ctl failed: %s\n",
                 MHD_socket_last_strerr_ ());
@@ -3629,7 +3629,7 @@
                           daemon->wpipe[0],
                           &event))
         {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Call to epoll_ctl failed: %s\n",
                     MHD_socket_last_strerr_ ());
@@ -3740,7 +3740,7 @@
 #else  /* !SOMAXCONN */
   daemon->listen_backlog_size = 511; /* should be safe value */
 #endif /* !SOMAXCONN */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   daemon->custom_error_log = (MHD_LogCallback) &vfprintf;
   daemon->custom_error_log_cls = stderr;
 #endif
@@ -3753,7 +3753,7 @@
     use_pipe = 0; /* useless if we are using 'external' select */
   if ( (use_pipe) && (0 != MHD_pipe_ (daemon->wpipe)) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Failed to create control pipe: %s\n",
                MHD_strerror_ (errno));
@@ -3766,7 +3766,7 @@
        (1 == use_pipe) &&
        (daemon->wpipe[0] >= FD_SETSIZE) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "file descriptor for control pipe exceeds maximum value\n");
 #endif
@@ -3807,7 +3807,7 @@
       if ( ( (size_t) (daemon->nonce_nc_size * sizeof (struct MHD_NonceNc))) /
           sizeof(struct MHD_NonceNc) != daemon->nonce_nc_size)
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          MHD_DLOG (daemon,
                    "Specified value for NC_SIZE too large\n");
 #endif
@@ -3821,7 +3821,7 @@
       daemon->nnc = malloc (daemon->nonce_nc_size * sizeof (struct 
MHD_NonceNc));
       if (NULL == daemon->nnc)
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          MHD_DLOG (daemon,
                    "Failed to allocate memory for nonce-nc map: %s\n",
                    MHD_strerror_ (errno));
@@ -3837,7 +3837,7 @@
 
   if (MHD_YES != MHD_mutex_create_ (&daemon->nnc_lock))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "MHD failed to initialize nonce-nc mutex\n");
 #endif
@@ -3855,7 +3855,7 @@
   if ( (0 == (flags & MHD_USE_SELECT_INTERNALLY)) &&
        (daemon->worker_pool_size > 0) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "MHD thread pooling only works with 
MHD_USE_SELECT_INTERNALLY\n");
 #endif
@@ -3865,7 +3865,7 @@
   if ( (MHD_USE_SUSPEND_RESUME == (flags & MHD_USE_SUSPEND_RESUME)) &&
        (0 != (flags & MHD_USE_THREAD_PER_CONNECTION)) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Combining MHD_USE_THREAD_PER_CONNECTION and 
MHD_USE_SUSPEND_RESUME is not supported.\n");
 #endif
@@ -3875,7 +3875,7 @@
 #ifdef __SYMBIAN32__
   if (0 != (flags & (MHD_USE_SELECT_INTERNALLY | 
MHD_USE_THREAD_PER_CONNECTION)))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Threaded operations are not supported on Symbian.\n");
 #endif
@@ -3894,7 +3894,7 @@
                                   PF_INET, SOCK_STREAM, 0);
       if (MHD_INVALID_SOCKET == socket_fd)
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Call to socket failed: %s\n",
                     MHD_socket_last_strerr_ ());
@@ -3912,7 +3912,7 @@
                               SO_REUSEADDR,
                               (void*)&on, sizeof (on)))
           {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
             MHD_DLOG (daemon,
                       "setsockopt failed: %s\n",
                       MHD_socket_last_strerr_ ());
@@ -3933,7 +3933,7 @@
                               SO_REUSEADDR,
                               (void*)&on, sizeof (on)))
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "setsockopt failed: %s\n",
                         MHD_socket_last_strerr_ ());
@@ -3955,7 +3955,7 @@
                               SO_REUSEPORT,
                               (void*)&on, sizeof (on)))
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "setsockopt failed: %s\n",
                         MHD_socket_last_strerr_ ());
@@ -3965,7 +3965,7 @@
 #else
           /* we're supposed to allow address:port re-use, but
              on this platform we cannot; fail hard */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Cannot allow listening address reuse: SO_REUSEPORT not 
defined\n");
 #endif
@@ -3986,7 +3986,7 @@
                               SO_EXCLUSIVEADDRUSE,
                               (void*)&on, sizeof (on)))
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "setsockopt failed: %s\n",
                         MHD_socket_last_strerr_ ());
@@ -3994,7 +3994,7 @@
               goto free_and_fail;
             }
 #else /* SO_EXCLUSIVEADDRUSE not defined on W32? */
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Cannot disallow listening address reuse: 
SO_EXCLUSIVEADDRUSE not defined\n");
 #endif
@@ -4051,7 +4051,7 @@
                               IPPROTO_IPV6, IPV6_V6ONLY,
                               (const void*)&v6_only, sizeof (v6_only)))
       {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
             MHD_DLOG (daemon,
                       "setsockopt failed: %s\n",
                       MHD_socket_last_strerr_ ());
@@ -4062,7 +4062,7 @@
        }
       if (-1 == bind (socket_fd, servaddr, addrlen))
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Failed to bind to port %u: %s\n",
                     (unsigned int) port,
@@ -4082,7 +4082,7 @@
                              &daemon->fastopen_queue_size,
                              sizeof (daemon->fastopen_queue_size)))
         {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "setsockopt failed: %s\n",
                     MHD_socket_last_strerr_ ());
@@ -4096,7 +4096,7 @@
          int sk_flags = fcntl (socket_fd, F_GETFL);
          if (0 != fcntl (socket_fd, F_SETFL, sk_flags | O_NONBLOCK))
            {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
              MHD_DLOG (daemon,
                        "Failed to make listen socket non-blocking: %s\n",
                        MHD_socket_last_strerr_ ());
@@ -4109,7 +4109,7 @@
 #endif
       if (listen (socket_fd, daemon->listen_backlog_size) < 0)
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
           MHD_DLOG (daemon,
                     "Failed to listen for connections: %s\n",
                     MHD_socket_last_strerr_ ());
@@ -4127,7 +4127,7 @@
   if ( (socket_fd >= FD_SETSIZE) &&
        (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL_LINUX_ONLY)) ) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Socket descriptor larger than FD_SETSIZE: %d > %d\n",
                 socket_fd,
@@ -4146,7 +4146,7 @@
     {
       if (0 != (flags & MHD_USE_THREAD_PER_CONNECTION))
        {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
          MHD_DLOG (daemon,
                    "Combining MHD_USE_THREAD_PER_CONNECTION and 
MHD_USE_EPOLL_LINUX_ONLY is not supported.\n");
 #endif
@@ -4158,7 +4158,7 @@
 #else
   if (0 != (flags & MHD_USE_EPOLL_LINUX_ONLY))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "epoll is not supported on this platform by this build.\n");
 #endif
@@ -4168,7 +4168,7 @@
 
   if (MHD_YES != MHD_mutex_create_ (&daemon->per_ip_connection_mutex))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "MHD failed to initialize IP connection limit mutex\n");
 #endif
@@ -4179,7 +4179,7 @@
     }
   if (MHD_YES != MHD_mutex_create_ (&daemon->cleanup_connection_mutex))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "MHD failed to initialize IP connection limit mutex\n");
 #endif
@@ -4194,7 +4194,7 @@
   /* initialize HTTPS daemon certificate aspects & send / recv functions */
   if ((0 != (flags & MHD_USE_SSL)) && (0 != MHD_TLS_init (daemon)))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                "Failed to initialize TLS support\n");
 #endif
@@ -4213,7 +4213,7 @@
        (0 != (res_thread_create =
              create_thread (&daemon->pid, daemon, &MHD_select_thread, 
daemon))))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
                 "Failed to create listen thread: %s\n",
                MHD_strerror_ (res_thread_create));
@@ -4282,7 +4282,7 @@
           if ( (MHD_USE_SUSPEND_RESUME == (flags & MHD_USE_SUSPEND_RESUME)) &&
                (0 != MHD_pipe_ (d->wpipe)) )
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "Failed to create worker control pipe: %s\n",
                         MHD_pipe_last_strerror_() );
@@ -4294,7 +4294,7 @@
                (MHD_USE_SUSPEND_RESUME == (flags & MHD_USE_SUSPEND_RESUME)) &&
                (d->wpipe[0] >= FD_SETSIZE) )
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "File descriptor for worker control pipe exceeds 
maximum value\n");
 #endif
@@ -4320,7 +4320,7 @@
           /* Must init cleanup connection mutex for each worker */
           if (MHD_YES != MHD_mutex_create_ (&d->cleanup_connection_mutex))
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                        "MHD failed to initialize cleanup connection mutex for 
thread worker %d\n", i);
 #endif
@@ -4331,7 +4331,7 @@
           if (0 != (res_thread_create =
                    create_thread (&d->pid, daemon, &MHD_select_thread, d)))
             {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         "Failed to create pool thread: %s\n",
                        MHD_strerror_ (res_thread_create));
@@ -4579,7 +4579,7 @@
 #endif
 
 #if DEBUG_CLOSE
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   MHD_DLOG (daemon,
             "MHD listen socket shutdown\n");
 #endif
@@ -4794,7 +4794,7 @@
   switch(feature)
     {
     case MHD_FEATURE_MESSGES:
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       return MHD_YES;
 #else
       return MHD_NO;
@@ -4854,19 +4854,19 @@
       return MHD_NO;
 #endif
     case MHD_FEATURE_BASIC_AUTH:
-#if BAUTH_SUPPORT
+#ifdef BAUTH_SUPPORT
       return MHD_YES;
 #else
       return MHD_NO;
 #endif
     case MHD_FEATURE_DIGEST_AUTH:
-#if DAUTH_SUPPORT
+#ifdef DAUTH_SUPPORT
       return MHD_YES;
 #else
       return MHD_NO;
 #endif
     case MHD_FEATURE_POSTPROCESSOR:
-#if HAVE_POSTPROCESSOR
+#ifdef HAVE_POSTPROCESSOR
       return MHD_YES;
 #else
       return MHD_NO;

Modified: libmicrohttpd/src/microhttpd/digestauth.c
===================================================================
--- libmicrohttpd/src/microhttpd/digestauth.c   2016-01-11 20:15:15 UTC (rev 
36805)
+++ libmicrohttpd/src/microhttpd/digestauth.c   2016-01-11 20:15:19 UTC (rev 
36806)
@@ -344,7 +344,7 @@
        (0 != strcmp(connection->daemon->nnc[off].nonce, nonce)) )
     {
       (void) MHD_mutex_unlock_ (&connection->daemon->nnc_lock);
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Stale nonce received.  If this happens a lot, you should 
probably increase the size of the nonce array.\n");
 #endif
@@ -496,7 +496,7 @@
   argb = strdup (args);
   if (NULL == argb)
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Failed to allocate memory for copy of URI arguments\n");
 #endif /* HAVE_MESSAGES */
@@ -657,7 +657,7 @@
        (0 == lookup_sub_value (nc, sizeof (nc), header, "nc"))  ||
        (0 == lookup_sub_value (response, sizeof (response), header, 
"response")) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Authentication failed, invalid format.\n");
 #endif
@@ -668,7 +668,7 @@
        ( (LONG_MAX == nci) &&
          (ERANGE == errno) ) )
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Authentication failed, invalid format.\n");
 #endif
@@ -691,7 +691,7 @@
     uri = malloc (left + 1);
     if (NULL == uri)
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG(connection->daemon,
                "Failed to allocate memory for auth header processing\n");
 #endif /* HAVE_MESSAGES */
@@ -730,7 +730,7 @@
                      connection->url,
                      strlen (connection->url)))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Authentication failed, URI does not match.\n");
 #endif
@@ -749,7 +749,7 @@
          check_argument_match (connection,
                                args) )
       {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
        MHD_DLOG (connection->daemon,
                  "Authentication failed, arguments do not match.\n");
 #endif
@@ -800,7 +800,7 @@
                   nonce);
   if (MHD_YES != check_nonce_nc (connection, nonce, 0))
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG (connection->daemon,
                "Could not register nonce (is the nonce array size zero?).\n");
 #endif
@@ -822,7 +822,7 @@
     header = malloc(hlen + 1);
     if (NULL == header)
     {
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
       MHD_DLOG(connection->daemon,
                "Failed to allocate memory for auth response header\n");
 #endif /* HAVE_MESSAGES */

Modified: libmicrohttpd/src/microhttpd/internal.c
===================================================================
--- libmicrohttpd/src/microhttpd/internal.c     2016-01-11 20:15:15 UTC (rev 
36805)
+++ libmicrohttpd/src/microhttpd/internal.c     2016-01-11 20:15:19 UTC (rev 
36806)
@@ -26,7 +26,7 @@
 
 #include "internal.h"
 
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #if DEBUG_STATES
 /**
  * State to string dictionary.
@@ -85,7 +85,7 @@
 #endif
 #endif
 
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 /**
  * fprintf-like helper function for logging debug
  * messages.

Modified: libmicrohttpd/src/microhttpd/internal.h
===================================================================
--- libmicrohttpd/src/microhttpd/internal.h     2016-01-11 20:15:15 UTC (rev 
36805)
+++ libmicrohttpd/src/microhttpd/internal.h     2016-01-11 20:15:19 UTC (rev 
36806)
@@ -85,7 +85,7 @@
 #endif
 
 
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 /**
  * Trigger 'panic' action based on fatal errors.
  *
@@ -199,7 +199,7 @@
 
 };
 
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 /**
  * fprintf()-like helper function for logging debug
  * messages.
@@ -475,7 +475,7 @@
 #define DEBUG_STATES MHD_NO
 
 
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
 #if DEBUG_STATES
 const char *
 MHD_state_to_string (enum MHD_CONNECTION_STATE state);
@@ -1055,7 +1055,7 @@
    */
   void *unescape_callback_cls;
 
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   /**
    * Function for logging error messages (if we
    * support error reporting).

Modified: libmicrohttpd/src/testcurl/curl_version_check.c
===================================================================
--- libmicrohttpd/src/testcurl/curl_version_check.c     2016-01-11 20:15:15 UTC 
(rev 36805)
+++ libmicrohttpd/src/testcurl/curl_version_check.c     2016-01-11 20:15:19 UTC 
(rev 36806)
@@ -92,7 +92,7 @@
   int rq_major, rq_minor, rq_micro;
 
   ver = curl_version ();
-#if HAVE_MESSAGES
+#ifdef HAVE_MESSAGES
   fprintf (stderr, "curl version: %s\n", ver);
 #endif
   /*




reply via email to

[Prev in Thread] Current Thread [Next in Thread]