Index: src/daemon/connection.c =================================================================== --- src/daemon/connection.c (revision 550) +++ src/daemon/connection.c (working copy) @@ -526,8 +526,8 @@ MHD_HTTP_HEADER_CONTENT_LENGTH)) { SPRINTF (buf, - "%llu", - (unsigned long long)connection->response->total_size); + "%" LONG_LONG_PRINTF "u", + (unsigned LONG_LONG)connection->response->total_size); MHD_add_response_header (connection->response, MHD_HTTP_HEADER_CONTENT_LENGTH, buf); } @@ -1641,7 +1641,7 @@ parse_connection_headers (struct MHD_Connection *connection) { const char *clen; - unsigned long long cval; + unsigned LONG_LONG cval; struct MHD_Response *response; const char *enc; @@ -1675,7 +1675,7 @@ MHD_HTTP_HEADER_CONTENT_LENGTH); if (clen != NULL) { - if (1 != SSCANF (clen, "%llu", &cval)) + if (1 != SSCANF (clen, "%" LONG_LONG_PRINTF "u", &cval)) { #if HAVE_MESSAGES MHD_DLOG (connection->daemon, Index: src/daemon/daemon.c =================================================================== --- src/daemon/daemon.c (revision 550) +++ src/daemon/daemon.c (working copy) @@ -1042,7 +1042,7 @@ * necessiate the use of a timeout right now). */ int -MHD_get_timeout (struct MHD_Daemon *daemon, unsigned long long *timeout) +MHD_get_timeout (struct MHD_Daemon *daemon, unsigned LONG_LONG *timeout) { time_t earliest_deadline; time_t now; @@ -1094,7 +1094,7 @@ fd_set es; int max; struct timeval timeout; - unsigned long long ltimeout; + unsigned LONG_LONG ltimeout; int ds; timeout.tv_sec = 0; Index: src/include/microhttpd.h =================================================================== --- src/include/microhttpd.h (revision 550) +++ src/include/microhttpd.h (working copy) @@ -141,6 +141,17 @@ #define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1) #endif +/** + * Not all architectures and printf's support the long long type. + * This gives the ability to replace long long with just a long, + * standard int or a short. + */ +#ifndef LONG_LONG +#define LONG_LONG long long +#endif +#ifndef LONG_LONG_PRINTF +#define LONG_LONG_PRITNF ll +#endif /** * HTTP response codes. @@ -1027,7 +1038,7 @@ * not used (or no connections exist that would * necessiate the use of a timeout right now). */ -int MHD_get_timeout (struct MHD_Daemon *daemon, unsigned long long *timeout); +int MHD_get_timeout (struct MHD_Daemon *daemon, unsigned LONG_LONG *timeout); /**