Index: D:/svn/dspy/NEW/libmicrohttpd/tags/0.9.5-r1/src/daemon/daemon.c =================================================================== --- D:/svn/dspy/NEW/libmicrohttpd/tags/0.9.5-r1/src/daemon/daemon.c (revision 693) +++ D:/svn/dspy/NEW/libmicrohttpd/tags/0.9.5-r1/src/daemon/daemon.c (revision 694) @@ -553,7 +553,11 @@ * @param data the 'struct MHD_Connection' this thread will handle * @return always NULL */ +#ifdef MHD_ALLOW_EXTERNAL_CONNECTIONS +void * +#else static void * +#endif MHD_handle_connection (void *data) { struct MHD_Connection *con = data; @@ -676,7 +680,11 @@ * @param i maximum size of other (in bytes) * @return number of bytes actually received */ +#ifdef MHD_ALLOW_EXTERNAL_CONNECTIONS +ssize_t +#else static ssize_t +#endif recv_param_adapter (struct MHD_Connection *connection, void *other, size_t i) { if (connection->socket_fd == -1) @@ -694,7 +702,11 @@ * @param i number of bytes to write * @return actual number of bytes written */ +#ifdef MHD_ALLOW_EXTERNAL_CONNECTIONS +ssize_t +#else static ssize_t +#endif send_param_adapter (struct MHD_Connection *connection, const void *other, size_t i) { Index: D:/svn/dspy/NEW/libmicrohttpd/tags/0.9.5-r1/src/include/microhttpd.h =================================================================== --- D:/svn/dspy/NEW/libmicrohttpd/tags/0.9.5-r1/src/include/microhttpd.h (revision 693) +++ D:/svn/dspy/NEW/libmicrohttpd/tags/0.9.5-r1/src/include/microhttpd.h (revision 694) @@ -1078,7 +1078,39 @@ */ int MHD_run (struct MHD_Daemon *daemon); +#ifdef MHD_ALLOW_EXTERNAL_CONNECTIONS +/** + * Main function of the thread that handles an individual + * connection when MHD_USE_THREAD_PER_CONNECTION is set. + * + * @param data the 'struct MHD_Connection' this thread will handle + * @return always NULL + */ +void *MHD_handle_connection (void *data); +/** + * Callback for receiving data from the socket. + * + * @param conn the MHD connection structure + * @param other where to write received data to + * @param i maximum size of other (in bytes) + * @return number of bytes actually received + */ +ssize_t recv_param_adapter (struct MHD_Connection *connection, + void *other, size_t i); + +/** + * Callback for writing data to the socket. + * + * @param conn the MHD connection structure + * @param other data to write + * @param i number of bytes to write + * @return actual number of bytes written + */ +ssize_t send_param_adapter (struct MHD_Connection *connection, + const void *other, size_t i); +#endif + /* **************** Connection handling functions ***************** */ /**