gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r23342 - in libmicrohttpd: . src/daemon


From: gnunet
Subject: [GNUnet-SVN] r23342 - in libmicrohttpd: . src/daemon
Date: Tue, 21 Aug 2012 14:37:36 +0200

Author: grothoff
Date: 2012-08-21 14:37:36 +0200 (Tue, 21 Aug 2012)
New Revision: 23342

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/daemon/daemon.c
Log:
use int instead of enums in va_arg calls

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2012-08-21 12:33:51 UTC (rev 23341)
+++ libmicrohttpd/ChangeLog     2012-08-21 12:37:36 UTC (rev 23342)
@@ -1,3 +1,8 @@
+Tue Aug 21 14:36:17 CEST 2012
+       Use "int" instead of "enum X" in 'va_arg' calls to be nice to
+       compilers that use 'short' (i.e. 8 or 16 bit) enums but pass
+       enums still as "int" in varargs. (See discussion on mailinglist). -CG/MV
+
 Tue Aug 21 14:31:54 CEST 2012
        Reduce default size in post processor buffer (for small systems;
        performance impact on large systems should be minimal). -CG/MV

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2012-08-21 12:33:51 UTC (rev 23341)
+++ libmicrohttpd/src/daemon/daemon.c   2012-08-21 12:37:36 UTC (rev 23342)
@@ -1748,7 +1748,7 @@
   const char *pstr;
 #endif
   
-  while (MHD_OPTION_END != (opt = va_arg (ap, enum MHD_OPTION)))
+  while (MHD_OPTION_END != (opt = (enum MHD_OPTION) va_arg (ap, int)))
     {
       switch (opt)
         {
@@ -1821,7 +1821,7 @@
 #endif
           break;
        case MHD_OPTION_HTTPS_CRED_TYPE:
-         daemon->cred_type = va_arg (ap, gnutls_credentials_type_t);
+         daemon->cred_type = (gnutls_credentials_type_t) va_arg (ap, int);
          break;
         case MHD_OPTION_HTTPS_PRIORITIES:
          if (0 != (daemon->options & MHD_USE_SSL))




reply via email to

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