aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac49
-rw-r--r--src/include/microhttpd.h82
-rw-r--r--src/include/microspdy.h67
-rw-r--r--src/include/platform.h10
-rw-r--r--src/microhttpd/EXPORT.sym39
-rw-r--r--src/microhttpd/Makefile.am4
-rw-r--r--src/microhttpd/base64.c1
-rw-r--r--src/microhttpd/base64.h1
-rw-r--r--src/microhttpd/connection.c7
-rw-r--r--src/microhttpd/connection.h2
-rw-r--r--src/microhttpd/connection_https.c1
-rw-r--r--src/microhttpd/daemon.c16
-rw-r--r--src/microhttpd/internal.c5
-rw-r--r--src/microhttpd/internal.h2
-rw-r--r--src/microhttpd/md5.c6
-rw-r--r--src/microhttpd/md5.h6
-rw-r--r--src/microhttpd/memorypool.c6
-rw-r--r--src/microhttpd/memorypool.h6
-rw-r--r--src/microhttpd/reason_phrase.c1
-rw-r--r--src/microhttpd/response.c2
-rw-r--r--src/microhttpd/response.h2
-rw-r--r--src/microspdy/EXPORT.sym3
-rw-r--r--src/microspdy/Makefile.am6
-rw-r--r--src/testspdy/common.c14
24 files changed, 142 insertions, 196 deletions
diff --git a/configure.ac b/configure.ac
index 85f7ef04..836f602c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,9 @@ AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
83 #include <netinet/in.h> 83 #include <netinet/in.h>
84 ]) 84 ])
85 85
86# Needed for plibc.h
87AC_CHECK_DECLS([_stati64, _wstat32i64])
88
86AC_CHECK_PROG(HAVE_CURL_BINARY,[curl],true,false) 89AC_CHECK_PROG(HAVE_CURL_BINARY,[curl],true,false)
87AM_CONDITIONAL(HAVE_CURL_BINARY,$HAVE_CURL_BINARY) 90AM_CONDITIONAL(HAVE_CURL_BINARY,$HAVE_CURL_BINARY)
88AC_CHECK_PROG(HAVE_MAKEINFO_BINARY,[makeinfo],true,false) 91AC_CHECK_PROG(HAVE_MAKEINFO_BINARY,[makeinfo],true,false)
@@ -163,13 +166,13 @@ netbsd*)
163 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system]) 166 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
164 AM_CONDITIONAL(HAVE_GNU_LD, false) 167 AM_CONDITIONAL(HAVE_GNU_LD, false)
165 AM_CONDITIONAL(HAVE_W32, false) 168 AM_CONDITIONAL(HAVE_W32, false)
166 LDFLAGS="$LDFLAGS -Wl,no-undefined" 169 LDFLAGS="$LDFLAGS"
167 ;; 170 ;;
168*mingw*) 171*mingw*)
169 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system]) 172 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
170 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) 173 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
171 AM_CONDITIONAL(HAVE_W32, true) 174 AM_CONDITIONAL(HAVE_W32, true)
172 LDFLAGS="$LDFLAGS -Wl,-no-undefined -Wl,--export-all-symbols -lws2_32" 175 LDFLAGS="$LDFLAGS -lws2_32"
173 AM_CONDITIONAL(HAVE_GNU_LD, true) 176 AM_CONDITIONAL(HAVE_GNU_LD, true)
174 # check if PlibC is available 177 # check if PlibC is available
175 CHECK_PLIBC 178 CHECK_PLIBC
@@ -294,6 +297,35 @@ AC_CHECK_DECLS([TCP_CORK], [], [], [[#include <netinet/tcp.h>]])
294# TCP_NOPUSH 297# TCP_NOPUSH
295AC_CHECK_DECLS([TCP_NOPUSH], [], [], [[#include <netinet/tcp.h>]]) 298AC_CHECK_DECLS([TCP_NOPUSH], [], [], [[#include <netinet/tcp.h>]])
296 299
300HIDDEN_VISIBILITY_CFLAGS=""
301case "$host" in
302 *-*-mingw*)
303 dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport)
304 AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern],
305 [defines how to decorate public symbols while building])
306 HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
307 ;;
308 *)
309 dnl on other compilers, check if we can do -fvisibility=hidden
310 SAVED_CFLAGS="${CFLAGS}"
311 CFLAGS="-fvisibility=hidden"
312 AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
313 AC_TRY_COMPILE([], [int main (void) { return 0; }],
314 AC_MSG_RESULT(yes)
315 enable_fvisibility_hidden=yes,
316 AC_MSG_RESULT(no)
317 enable_fvisibility_hidden=no)
318 CFLAGS="${SAVED_CFLAGS}"
319
320 AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [
321 AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) extern],
322 [defines how to decorate public symbols while building])
323 HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
324 ])
325 ;;
326esac
327AC_SUBST(HIDDEN_VISIBILITY_CFLAGS)
328
297# libcurl (required for testing) 329# libcurl (required for testing)
298SAVE_LIBS=$LIBS 330SAVE_LIBS=$LIBS
299 331
@@ -524,18 +556,7 @@ AM_CONDITIONAL(ENABLE_DAUTH, [test "x$enable_dauth" != "xno"])
524 556
525 557
526 558
527MHD_LIB_LDFLAGS="-export-dynamic -Wl,-no-undefined" 559MHD_LIB_LDFLAGS="-export-dynamic -no-undefined"
528
529# TODO insert a proper check here
530AC_CACHE_CHECK([whether -export-symbols-regex works],
531 gn_cv_export_symbols_regex_works,
532 [
533 case "$host_os" in
534 mingw*) gn_cv_export_symbols_regex_works=no;;
535 *) gn_cv_export_symbols_regex_works=yes;;
536 esac
537 ])
538
539 560
540# gcov compilation 561# gcov compilation
541AC_MSG_CHECKING(whether to compile with support for code coverage analysis) 562AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 53b4015e..5ced10f0 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -156,6 +156,10 @@ extern "C"
156#define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1) 156#define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1)
157#endif 157#endif
158 158
159#ifndef _MHD_EXTERN
160#define _MHD_EXTERN extern
161#endif
162
159/** 163/**
160 * Not all architectures and `printf()`'s support the `long long` type. 164 * Not all architectures and `printf()`'s support the `long long` type.
161 * This gives the ability to replace `long long` with just a `long`, 165 * This gives the ability to replace `long long` with just a `long`,
@@ -1287,7 +1291,7 @@ typedef int
1287 * @return NULL on error, handle to daemon on success 1291 * @return NULL on error, handle to daemon on success
1288 * @ingroup event 1292 * @ingroup event
1289 */ 1293 */
1290struct MHD_Daemon * 1294_MHD_EXTERN struct MHD_Daemon *
1291MHD_start_daemon_va (unsigned int flags, 1295MHD_start_daemon_va (unsigned int flags,
1292 uint16_t port, 1296 uint16_t port,
1293 MHD_AcceptPolicyCallback apc, void *apc_cls, 1297 MHD_AcceptPolicyCallback apc, void *apc_cls,
@@ -1311,7 +1315,7 @@ MHD_start_daemon_va (unsigned int flags,
1311 * @return NULL on error, handle to daemon on success 1315 * @return NULL on error, handle to daemon on success
1312 * @ingroup event 1316 * @ingroup event
1313 */ 1317 */
1314struct MHD_Daemon * 1318_MHD_EXTERN struct MHD_Daemon *
1315MHD_start_daemon (unsigned int flags, 1319MHD_start_daemon (unsigned int flags,
1316 uint16_t port, 1320 uint16_t port,
1317 MHD_AcceptPolicyCallback apc, void *apc_cls, 1321 MHD_AcceptPolicyCallback apc, void *apc_cls,
@@ -1338,7 +1342,7 @@ MHD_start_daemon (unsigned int flags,
1338 * already not listening anymore 1342 * already not listening anymore
1339 * @ingroup specialized 1343 * @ingroup specialized
1340 */ 1344 */
1341int 1345_MHD_EXTERN int
1342MHD_quiesce_daemon (struct MHD_Daemon *daemon); 1346MHD_quiesce_daemon (struct MHD_Daemon *daemon);
1343 1347
1344 1348
@@ -1348,7 +1352,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon);
1348 * @param daemon daemon to stop 1352 * @param daemon daemon to stop
1349 * @ingroup event 1353 * @ingroup event
1350 */ 1354 */
1351void 1355_MHD_EXTERN void
1352MHD_stop_daemon (struct MHD_Daemon *daemon); 1356MHD_stop_daemon (struct MHD_Daemon *daemon);
1353 1357
1354 1358
@@ -1381,7 +1385,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon);
1381 * set to indicate further details about the error. 1385 * set to indicate further details about the error.
1382 * @ingroup specialized 1386 * @ingroup specialized
1383 */ 1387 */
1384int 1388_MHD_EXTERN int
1385MHD_add_connection (struct MHD_Daemon *daemon, 1389MHD_add_connection (struct MHD_Daemon *daemon,
1386 int client_socket, 1390 int client_socket,
1387 const struct sockaddr *addr, 1391 const struct sockaddr *addr,
@@ -1402,7 +1406,7 @@ MHD_add_connection (struct MHD_Daemon *daemon,
1402 * options for this call. 1406 * options for this call.
1403 * @ingroup event 1407 * @ingroup event
1404 */ 1408 */
1405int 1409_MHD_EXTERN int
1406MHD_get_fdset (struct MHD_Daemon *daemon, 1410MHD_get_fdset (struct MHD_Daemon *daemon,
1407 fd_set *read_fd_set, 1411 fd_set *read_fd_set,
1408 fd_set *write_fd_set, 1412 fd_set *write_fd_set,
@@ -1424,7 +1428,7 @@ MHD_get_fdset (struct MHD_Daemon *daemon,
1424 * necessiate the use of a timeout right now). 1428 * necessiate the use of a timeout right now).
1425 * @ingroup event 1429 * @ingroup event
1426 */ 1430 */
1427int 1431_MHD_EXTERN int
1428MHD_get_timeout (struct MHD_Daemon *daemon, 1432MHD_get_timeout (struct MHD_Daemon *daemon,
1429 MHD_UNSIGNED_LONG_LONG *timeout); 1433 MHD_UNSIGNED_LONG_LONG *timeout);
1430 1434
@@ -1448,7 +1452,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
1448 * options for this call. 1452 * options for this call.
1449 * @ingroup event 1453 * @ingroup event
1450 */ 1454 */
1451int 1455_MHD_EXTERN int
1452MHD_run (struct MHD_Daemon *daemon); 1456MHD_run (struct MHD_Daemon *daemon);
1453 1457
1454 1458
@@ -1471,7 +1475,7 @@ MHD_run (struct MHD_Daemon *daemon);
1471 * @return #MHD_NO on serious errors, #MHD_YES on success 1475 * @return #MHD_NO on serious errors, #MHD_YES on success
1472 * @ingroup event 1476 * @ingroup event
1473 */ 1477 */
1474int 1478_MHD_EXTERN int
1475MHD_run_from_select (struct MHD_Daemon *daemon, 1479MHD_run_from_select (struct MHD_Daemon *daemon,
1476 const fd_set *read_fd_set, 1480 const fd_set *read_fd_set,
1477 const fd_set *write_fd_set, 1481 const fd_set *write_fd_set,
@@ -1493,7 +1497,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
1493 * @return number of entries iterated over 1497 * @return number of entries iterated over
1494 * @ingroup request 1498 * @ingroup request
1495 */ 1499 */
1496int 1500_MHD_EXTERN int
1497MHD_get_connection_values (struct MHD_Connection *connection, 1501MHD_get_connection_values (struct MHD_Connection *connection,
1498 enum MHD_ValueKind kind, 1502 enum MHD_ValueKind kind,
1499 MHD_KeyValueIterator iterator, void *iterator_cls); 1503 MHD_KeyValueIterator iterator, void *iterator_cls);
@@ -1524,7 +1528,7 @@ MHD_get_connection_values (struct MHD_Connection *connection,
1524 * #MHD_YES on success 1528 * #MHD_YES on success
1525 * @ingroup request 1529 * @ingroup request
1526 */ 1530 */
1527int 1531_MHD_EXTERN int
1528MHD_set_connection_value (struct MHD_Connection *connection, 1532MHD_set_connection_value (struct MHD_Connection *connection,
1529 enum MHD_ValueKind kind, 1533 enum MHD_ValueKind kind,
1530 const char *key, 1534 const char *key,
@@ -1547,7 +1551,7 @@ MHD_set_connection_value (struct MHD_Connection *connection,
1547 * @param cls passed to @a cb 1551 * @param cls passed to @a cb
1548 * @ingroup logging 1552 * @ingroup logging
1549 */ 1553 */
1550void 1554_MHD_EXTERN void
1551MHD_set_panic_func (MHD_PanicCallback cb, void *cls); 1555MHD_set_panic_func (MHD_PanicCallback cb, void *cls);
1552 1556
1553 1557
@@ -1561,7 +1565,7 @@ MHD_set_panic_func (MHD_PanicCallback cb, void *cls);
1561 * @return NULL if no such item was found 1565 * @return NULL if no such item was found
1562 * @ingroup request 1566 * @ingroup request
1563 */ 1567 */
1564const char * 1568_MHD_EXTERN const char *
1565MHD_lookup_connection_value (struct MHD_Connection *connection, 1569MHD_lookup_connection_value (struct MHD_Connection *connection,
1566 enum MHD_ValueKind kind, 1570 enum MHD_ValueKind kind,
1567 const char *key); 1571 const char *key);
@@ -1578,7 +1582,7 @@ MHD_lookup_connection_value (struct MHD_Connection *connection,
1578 * #MHD_YES on success or if message has been queued 1582 * #MHD_YES on success or if message has been queued
1579 * @ingroup response 1583 * @ingroup response
1580 */ 1584 */
1581int 1585_MHD_EXTERN int
1582MHD_queue_response (struct MHD_Connection *connection, 1586MHD_queue_response (struct MHD_Connection *connection,
1583 unsigned int status_code, 1587 unsigned int status_code,
1584 struct MHD_Response *response); 1588 struct MHD_Response *response);
@@ -1611,7 +1615,7 @@ MHD_queue_response (struct MHD_Connection *connection,
1611 * 1615 *
1612 * @param connection the connection to suspend 1616 * @param connection the connection to suspend
1613 */ 1617 */
1614void 1618_MHD_EXTERN void
1615MHD_suspend_connection (struct MHD_Connection *connection); 1619MHD_suspend_connection (struct MHD_Connection *connection);
1616 1620
1617 1621
@@ -1623,7 +1627,7 @@ MHD_suspend_connection (struct MHD_Connection *connection);
1623 * 1627 *
1624 * @param connection the connection to resume 1628 * @param connection the connection to resume
1625 */ 1629 */
1626void 1630_MHD_EXTERN void
1627MHD_resume_connection (struct MHD_Connection *connection); 1631MHD_resume_connection (struct MHD_Connection *connection);
1628 1632
1629 1633
@@ -1645,7 +1649,7 @@ MHD_resume_connection (struct MHD_Connection *connection);
1645 * @return NULL on error (i.e. invalid arguments, out of memory) 1649 * @return NULL on error (i.e. invalid arguments, out of memory)
1646 * @ingroup response 1650 * @ingroup response
1647 */ 1651 */
1648struct MHD_Response * 1652_MHD_EXTERN struct MHD_Response *
1649MHD_create_response_from_callback (uint64_t size, 1653MHD_create_response_from_callback (uint64_t size,
1650 size_t block_size, 1654 size_t block_size,
1651 MHD_ContentReaderCallback crc, void *crc_cls, 1655 MHD_ContentReaderCallback crc, void *crc_cls,
@@ -1666,7 +1670,7 @@ MHD_create_response_from_callback (uint64_t size,
1666 * @deprecated use #MHD_create_response_from_buffer instead 1670 * @deprecated use #MHD_create_response_from_buffer instead
1667 * @ingroup response 1671 * @ingroup response
1668 */ 1672 */
1669struct MHD_Response * 1673_MHD_EXTERN struct MHD_Response *
1670MHD_create_response_from_data (size_t size, 1674MHD_create_response_from_data (size_t size,
1671 void *data, 1675 void *data,
1672 int must_free, 1676 int must_free,
@@ -1719,7 +1723,7 @@ enum MHD_ResponseMemoryMode
1719 * @return NULL on error (i.e. invalid arguments, out of memory) 1723 * @return NULL on error (i.e. invalid arguments, out of memory)
1720 * @ingroup response 1724 * @ingroup response
1721 */ 1725 */
1722struct MHD_Response * 1726_MHD_EXTERN struct MHD_Response *
1723MHD_create_response_from_buffer (size_t size, 1727MHD_create_response_from_buffer (size_t size,
1724 void *buffer, 1728 void *buffer,
1725 enum MHD_ResponseMemoryMode mode); 1729 enum MHD_ResponseMemoryMode mode);
@@ -1736,7 +1740,7 @@ MHD_create_response_from_buffer (size_t size,
1736 * @return NULL on error (i.e. invalid arguments, out of memory) 1740 * @return NULL on error (i.e. invalid arguments, out of memory)
1737 * @ingroup response 1741 * @ingroup response
1738 */ 1742 */
1739struct MHD_Response * 1743_MHD_EXTERN struct MHD_Response *
1740MHD_create_response_from_fd (size_t size, 1744MHD_create_response_from_fd (size_t size,
1741 int fd); 1745 int fd);
1742 1746
@@ -1757,7 +1761,7 @@ MHD_create_response_from_fd (size_t size,
1757 * @return NULL on error (i.e. invalid arguments, out of memory) 1761 * @return NULL on error (i.e. invalid arguments, out of memory)
1758 * @ingroup response 1762 * @ingroup response
1759 */ 1763 */
1760struct MHD_Response * 1764_MHD_EXTERN struct MHD_Response *
1761MHD_create_response_from_fd_at_offset (size_t size, 1765MHD_create_response_from_fd_at_offset (size_t size,
1762 int fd, 1766 int fd,
1763 off_t offset); 1767 off_t offset);
@@ -1906,7 +1910,7 @@ MHD_create_response_for_upgrade (MHD_UpgradeHandler upgrade_handler,
1906 * @param response response to destroy 1910 * @param response response to destroy
1907 * @ingroup response 1911 * @ingroup response
1908 */ 1912 */
1909void 1913_MHD_EXTERN void
1910MHD_destroy_response (struct MHD_Response *response); 1914MHD_destroy_response (struct MHD_Response *response);
1911 1915
1912 1916
@@ -1920,7 +1924,7 @@ MHD_destroy_response (struct MHD_Response *response);
1920 * or out of memory 1924 * or out of memory
1921 * @ingroup response 1925 * @ingroup response
1922 */ 1926 */
1923int 1927_MHD_EXTERN int
1924MHD_add_response_header (struct MHD_Response *response, 1928MHD_add_response_header (struct MHD_Response *response,
1925 const char *header, 1929 const char *header,
1926 const char *content); 1930 const char *content);
@@ -1935,7 +1939,7 @@ MHD_add_response_header (struct MHD_Response *response,
1935 * @return #MHD_NO on error (i.e. invalid footer or content format). 1939 * @return #MHD_NO on error (i.e. invalid footer or content format).
1936 * @ingroup response 1940 * @ingroup response
1937 */ 1941 */
1938int 1942_MHD_EXTERN int
1939MHD_add_response_footer (struct MHD_Response *response, 1943MHD_add_response_footer (struct MHD_Response *response,
1940 const char *footer, 1944 const char *footer,
1941 const char *content); 1945 const char *content);
@@ -1950,7 +1954,7 @@ MHD_add_response_footer (struct MHD_Response *response,
1950 * @return #MHD_NO on error (no such header known) 1954 * @return #MHD_NO on error (no such header known)
1951 * @ingroup response 1955 * @ingroup response
1952 */ 1956 */
1953int 1957_MHD_EXTERN int
1954MHD_del_response_header (struct MHD_Response *response, 1958MHD_del_response_header (struct MHD_Response *response,
1955 const char *header, 1959 const char *header,
1956 const char *content); 1960 const char *content);
@@ -1966,7 +1970,7 @@ MHD_del_response_header (struct MHD_Response *response,
1966 * @return number of entries iterated over 1970 * @return number of entries iterated over
1967 * @ingroup response 1971 * @ingroup response
1968 */ 1972 */
1969int 1973_MHD_EXTERN int
1970MHD_get_response_headers (struct MHD_Response *response, 1974MHD_get_response_headers (struct MHD_Response *response,
1971 MHD_KeyValueIterator iterator, void *iterator_cls); 1975 MHD_KeyValueIterator iterator, void *iterator_cls);
1972 1976
@@ -1979,7 +1983,7 @@ MHD_get_response_headers (struct MHD_Response *response,
1979 * @return NULL if header does not exist 1983 * @return NULL if header does not exist
1980 * @ingroup response 1984 * @ingroup response
1981 */ 1985 */
1982const char * 1986_MHD_EXTERN const char *
1983MHD_get_response_header (struct MHD_Response *response, 1987MHD_get_response_header (struct MHD_Response *response,
1984 const char *key); 1988 const char *key);
1985 1989
@@ -2011,7 +2015,7 @@ MHD_get_response_header (struct MHD_Response *response,
2011 * otherwise a PP handle 2015 * otherwise a PP handle
2012 * @ingroup request 2016 * @ingroup request
2013 */ 2017 */
2014struct MHD_PostProcessor * 2018_MHD_EXTERN struct MHD_PostProcessor *
2015MHD_create_post_processor (struct MHD_Connection *connection, 2019MHD_create_post_processor (struct MHD_Connection *connection,
2016 size_t buffer_size, 2020 size_t buffer_size,
2017 MHD_PostDataIterator iter, void *iter_cls); 2021 MHD_PostDataIterator iter, void *iter_cls);
@@ -2030,7 +2034,7 @@ MHD_create_post_processor (struct MHD_Connection *connection,
2030 * (out-of-memory, iterator aborted, parse error) 2034 * (out-of-memory, iterator aborted, parse error)
2031 * @ingroup request 2035 * @ingroup request
2032 */ 2036 */
2033int 2037_MHD_EXTERN int
2034MHD_post_process (struct MHD_PostProcessor *pp, 2038MHD_post_process (struct MHD_PostProcessor *pp,
2035 const char *post_data, size_t post_data_len); 2039 const char *post_data, size_t post_data_len);
2036 2040
@@ -2045,7 +2049,7 @@ MHD_post_process (struct MHD_PostProcessor *pp,
2045 * value of this function 2049 * value of this function
2046 * @ingroup request 2050 * @ingroup request
2047 */ 2051 */
2048int 2052_MHD_EXTERN int
2049MHD_destroy_post_processor (struct MHD_PostProcessor *pp); 2053MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
2050 2054
2051 2055
@@ -2068,7 +2072,7 @@ MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
2068 * to the username if found 2072 * to the username if found
2069 * @ingroup authentication 2073 * @ingroup authentication
2070 */ 2074 */
2071char * 2075_MHD_EXTERN char *
2072MHD_digest_auth_get_username (struct MHD_Connection *connection); 2076MHD_digest_auth_get_username (struct MHD_Connection *connection);
2073 2077
2074 2078
@@ -2085,7 +2089,7 @@ MHD_digest_auth_get_username (struct MHD_Connection *connection);
2085 * #MHD_INVALID_NONCE if nonce is invalid 2089 * #MHD_INVALID_NONCE if nonce is invalid
2086 * @ingroup authentication 2090 * @ingroup authentication
2087 */ 2091 */
2088int 2092_MHD_EXTERN int
2089MHD_digest_auth_check (struct MHD_Connection *connection, 2093MHD_digest_auth_check (struct MHD_Connection *connection,
2090 const char *realm, 2094 const char *realm,
2091 const char *username, 2095 const char *username,
@@ -2107,7 +2111,7 @@ MHD_digest_auth_check (struct MHD_Connection *connection,
2107 * @return #MHD_YES on success, #MHD_NO otherwise 2111 * @return #MHD_YES on success, #MHD_NO otherwise
2108 * @ingroup authentication 2112 * @ingroup authentication
2109 */ 2113 */
2110int 2114_MHD_EXTERN int
2111MHD_queue_auth_fail_response (struct MHD_Connection *connection, 2115MHD_queue_auth_fail_response (struct MHD_Connection *connection,
2112 const char *realm, 2116 const char *realm,
2113 const char *opaque, 2117 const char *opaque,
@@ -2124,7 +2128,7 @@ MHD_queue_auth_fail_response (struct MHD_Connection *connection,
2124 * to the username if found 2128 * to the username if found
2125 * @ingroup authentication 2129 * @ingroup authentication
2126 */ 2130 */
2127char * 2131_MHD_EXTERN char *
2128MHD_basic_auth_get_username_password (struct MHD_Connection *connection, 2132MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
2129 char** password); 2133 char** password);
2130 2134
@@ -2141,7 +2145,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
2141 * @return #MHD_YES on success, #MHD_NO otherwise 2145 * @return #MHD_YES on success, #MHD_NO otherwise
2142 * @ingroup authentication 2146 * @ingroup authentication
2143 */ 2147 */
2144int 2148_MHD_EXTERN int
2145MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection, 2149MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
2146 const char *realm, 2150 const char *realm,
2147 struct MHD_Response *response); 2151 struct MHD_Response *response);
@@ -2159,7 +2163,7 @@ MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
2159 * (or if the @a info_type is unknown) 2163 * (or if the @a info_type is unknown)
2160 * @ingroup specialized 2164 * @ingroup specialized
2161 */ 2165 */
2162const union MHD_ConnectionInfo * 2166_MHD_EXTERN const union MHD_ConnectionInfo *
2163MHD_get_connection_info (struct MHD_Connection *connection, 2167MHD_get_connection_info (struct MHD_Connection *connection,
2164 enum MHD_ConnectionInfoType info_type, 2168 enum MHD_ConnectionInfoType info_type,
2165 ...); 2169 ...);
@@ -2191,7 +2195,7 @@ enum MHD_CONNECTION_OPTION
2191 * @return #MHD_YES on success, #MHD_NO if setting the option failed 2195 * @return #MHD_YES on success, #MHD_NO if setting the option failed
2192 * @ingroup specialized 2196 * @ingroup specialized
2193 */ 2197 */
2194int 2198_MHD_EXTERN int
2195MHD_set_connection_option (struct MHD_Connection *connection, 2199MHD_set_connection_option (struct MHD_Connection *connection,
2196 enum MHD_CONNECTION_OPTION option, 2200 enum MHD_CONNECTION_OPTION option,
2197 ...); 2201 ...);
@@ -2232,7 +2236,7 @@ union MHD_DaemonInfo
2232 * (or if the @a info_type is unknown) 2236 * (or if the @a info_type is unknown)
2233 * @ingroup specialized 2237 * @ingroup specialized
2234 */ 2238 */
2235const union MHD_DaemonInfo * 2239_MHD_EXTERN const union MHD_DaemonInfo *
2236MHD_get_daemon_info (struct MHD_Daemon *daemon, 2240MHD_get_daemon_info (struct MHD_Daemon *daemon,
2237 enum MHD_DaemonInfoType info_type, 2241 enum MHD_DaemonInfoType info_type,
2238 ...); 2242 ...);
@@ -2244,7 +2248,7 @@ MHD_get_daemon_info (struct MHD_Daemon *daemon,
2244 * @return static version string, e.g. "0.9.9" 2248 * @return static version string, e.g. "0.9.9"
2245 * @ingroup specialized 2249 * @ingroup specialized
2246 */ 2250 */
2247const char* 2251_MHD_EXTERN const char*
2248MHD_get_version (void); 2252MHD_get_version (void);
2249 2253
2250 2254
diff --git a/src/include/microspdy.h b/src/include/microspdy.h
index 1e1e229e..b69714a9 100644
--- a/src/include/microspdy.h
+++ b/src/include/microspdy.h
@@ -83,6 +83,9 @@
83#endif 83#endif
84#endif 84#endif
85 85
86#ifndef _MHD_EXTERN
87#define _MHD_EXTERN extern
88#endif
86 89
87/** 90/**
88 * return code for "YES". 91 * return code for "YES".
@@ -814,7 +817,7 @@ typedef void
814 * functions can be used now; 817 * functions can be used now;
815 * SPDY_NO on error 818 * SPDY_NO on error
816 */ 819 */
817int 820_MHD_EXTERN int
818(SPDY_init) (enum SPDY_IO_SUBSYSTEM io_subsystem, ...); 821(SPDY_init) (enum SPDY_IO_SUBSYSTEM io_subsystem, ...);
819#define SPDY_init() SPDY_init(SPDY_IO_SUBSYSTEM_OPENSSL) 822#define SPDY_init() SPDY_init(SPDY_IO_SUBSYSTEM_OPENSSL)
820 823
@@ -824,7 +827,7 @@ int
824 * using the library. It frees and cleans up resources allocated in 827 * using the library. It frees and cleans up resources allocated in
825 * SPDY_init. Currently the function does not do anything. 828 * SPDY_init. Currently the function does not do anything.
826 */ 829 */
827void 830_MHD_EXTERN void
828SPDY_deinit (); 831SPDY_deinit ();
829 832
830 833
@@ -843,7 +846,7 @@ SPDY_deinit ();
843 * @param cb new error handler 846 * @param cb new error handler
844 * @param cls passed to error handler 847 * @param cls passed to error handler
845 */ 848 */
846void 849_MHD_EXTERN void
847SPDY_set_panic_func (SPDY_PanicCallback cb, 850SPDY_set_panic_func (SPDY_PanicCallback cb,
848 void *cls); 851 void *cls);
849 852
@@ -869,7 +872,7 @@ SPDY_set_panic_func (SPDY_PanicCallback cb,
869 * terminated with SPDY_DAEMON_OPTION_END). 872 * terminated with SPDY_DAEMON_OPTION_END).
870 * @return NULL on error, handle to daemon on success 873 * @return NULL on error, handle to daemon on success
871 */ 874 */
872struct SPDY_Daemon * 875_MHD_EXTERN struct SPDY_Daemon *
873SPDY_start_daemon (uint16_t port, 876SPDY_start_daemon (uint16_t port,
874 const char * certfile, 877 const char * certfile,
875 const char * keyfile, 878 const char * keyfile,
@@ -887,7 +890,7 @@ SPDY_start_daemon (uint16_t port,
887 * 890 *
888 * @param daemon to stop 891 * @param daemon to stop
889 */ 892 */
890void 893_MHD_EXTERN void
891SPDY_stop_daemon (struct SPDY_Daemon *daemon); 894SPDY_stop_daemon (struct SPDY_Daemon *daemon);
892 895
893 896
@@ -913,7 +916,7 @@ SPDY_stop_daemon (struct SPDY_Daemon *daemon);
913 * @param except_fd_set except set 916 * @param except_fd_set except set
914 * @return largest FD added to any of the sets 917 * @return largest FD added to any of the sets
915 */ 918 */
916int 919_MHD_EXTERN int
917SPDY_get_fdset (struct SPDY_Daemon * daemon, 920SPDY_get_fdset (struct SPDY_Daemon * daemon,
918 fd_set * read_fd_set, 921 fd_set * read_fd_set,
919 fd_set * write_fd_set, 922 fd_set * write_fd_set,
@@ -931,7 +934,7 @@ SPDY_get_fdset (struct SPDY_Daemon * daemon,
931 * SPDY_NO if no connections exist that 934 * SPDY_NO if no connections exist that
932 * would necessiate the use of a timeout right now 935 * would necessiate the use of a timeout right now
933 */ 936 */
934int 937_MHD_EXTERN int
935SPDY_get_timeout (struct SPDY_Daemon * daemon, 938SPDY_get_timeout (struct SPDY_Daemon * daemon,
936 unsigned long long * timeout); 939 unsigned long long * timeout);
937 940
@@ -942,7 +945,7 @@ SPDY_get_timeout (struct SPDY_Daemon * daemon,
942 * 945 *
943 * @param daemon to run 946 * @param daemon to run
944 */ 947 */
945void 948_MHD_EXTERN void
946SPDY_run (struct SPDY_Daemon *daemon); 949SPDY_run (struct SPDY_Daemon *daemon);
947 950
948 951
@@ -958,7 +961,7 @@ SPDY_run (struct SPDY_Daemon *daemon);
958 * 961 *
959 * @param session handler to be closed 962 * @param session handler to be closed
960 */ 963 */
961void 964_MHD_EXTERN void
962SPDY_close_session(struct SPDY_Session * session); 965SPDY_close_session(struct SPDY_Session * session);
963 966
964 967
@@ -969,7 +972,7 @@ SPDY_close_session(struct SPDY_Session * session);
969 * @param session handler 972 * @param session handler
970 * @param cls any data pointed by a pointer to be accessible later 973 * @param cls any data pointed by a pointer to be accessible later
971 */ 974 */
972void 975_MHD_EXTERN void
973SPDY_set_cls_to_session(struct SPDY_Session * session, 976SPDY_set_cls_to_session(struct SPDY_Session * session,
974 void * cls); 977 void * cls);
975 978
@@ -981,7 +984,7 @@ SPDY_set_cls_to_session(struct SPDY_Session * session,
981 * @return same pointer added by SPDY_set_cls_to_session() or 984 * @return same pointer added by SPDY_set_cls_to_session() or
982 * NULL when nothing was associated 985 * NULL when nothing was associated
983 */ 986 */
984void * 987_MHD_EXTERN void *
985SPDY_get_cls_from_session(struct SPDY_Session * session); 988SPDY_get_cls_from_session(struct SPDY_Session * session);
986 989
987 990
@@ -992,7 +995,7 @@ SPDY_get_cls_from_session(struct SPDY_Session * session);
992 * @param addr out parameter; pointing to remote address 995 * @param addr out parameter; pointing to remote address
993 * @return length of the address structure 996 * @return length of the address structure
994 */ 997 */
995socklen_t 998_MHD_EXTERN socklen_t
996SPDY_get_remote_addr(struct SPDY_Session * session, 999SPDY_get_remote_addr(struct SPDY_Session * session,
997 struct sockaddr ** addr); 1000 struct sockaddr ** addr);
998 1001
@@ -1007,7 +1010,7 @@ SPDY_get_remote_addr(struct SPDY_Session * session,
1007 * 1010 *
1008 * @return hendler to the new empty structure or NULL on error 1011 * @return hendler to the new empty structure or NULL on error
1009 */ 1012 */
1010struct SPDY_NameValue * 1013_MHD_EXTERN struct SPDY_NameValue *
1011SPDY_name_value_create (); 1014SPDY_name_value_create ();
1012 1015
1013 1016
@@ -1021,7 +1024,7 @@ SPDY_name_value_create ();
1021 * @param value the value itself. Null-terminated string. 1024 * @param value the value itself. Null-terminated string.
1022 * @return SPDY_NO on error or SPDY_YES on success 1025 * @return SPDY_NO on error or SPDY_YES on success
1023 */ 1026 */
1024int 1027_MHD_EXTERN int
1025SPDY_name_value_add (struct SPDY_NameValue * container, 1028SPDY_name_value_add (struct SPDY_NameValue * container,
1026 const char * name, 1029 const char * name,
1027 const char * value); 1030 const char * value);
@@ -1036,7 +1039,7 @@ SPDY_name_value_add (struct SPDY_NameValue * container,
1036 * @return NULL if no such item was found, or an array containing the 1039 * @return NULL if no such item was found, or an array containing the
1037 * values 1040 * values
1038 */ 1041 */
1039const char * const * 1042_MHD_EXTERN const char * const *
1040SPDY_name_value_lookup (struct SPDY_NameValue *container, 1043SPDY_name_value_lookup (struct SPDY_NameValue *container,
1041 const char *name, 1044 const char *name,
1042 int * num_values); 1045 int * num_values);
@@ -1051,7 +1054,7 @@ SPDY_name_value_lookup (struct SPDY_NameValue *container,
1051 * @param iterator_cls extra argument to iterator 1054 * @param iterator_cls extra argument to iterator
1052 * @return number of entries iterated over 1055 * @return number of entries iterated over
1053 */ 1056 */
1054int 1057_MHD_EXTERN int
1055SPDY_name_value_iterate (struct SPDY_NameValue *container, 1058SPDY_name_value_iterate (struct SPDY_NameValue *container,
1056 SPDY_NameValueIterator iterator, 1059 SPDY_NameValueIterator iterator,
1057 void *iterator_cls); 1060 void *iterator_cls);
@@ -1063,7 +1066,7 @@ SPDY_name_value_iterate (struct SPDY_NameValue *container,
1063 * functions. 1066 * functions.
1064 * 1067 *
1065 */ 1068 */
1066void 1069_MHD_EXTERN void
1067SPDY_name_value_destroy (struct SPDY_NameValue * container); 1070SPDY_name_value_destroy (struct SPDY_NameValue * container);
1068 1071
1069 1072
@@ -1077,7 +1080,7 @@ SPDY_name_value_destroy (struct SPDY_NameValue * container);
1077 * @param request for which the session is wanted 1080 * @param request for which the session is wanted
1078 * @return session handler for the request 1081 * @return session handler for the request
1079 */ 1082 */
1080struct SPDY_Session * 1083_MHD_EXTERN struct SPDY_Session *
1081SPDY_get_session_for_request(const struct SPDY_Request * request); 1084SPDY_get_session_for_request(const struct SPDY_Request * request);
1082 1085
1083 1086
@@ -1088,7 +1091,7 @@ SPDY_get_session_for_request(const struct SPDY_Request * request);
1088 * @param request with which to associate a pointer 1091 * @param request with which to associate a pointer
1089 * @param cls any data pointed by a pointer to be accessible later 1092 * @param cls any data pointed by a pointer to be accessible later
1090 */ 1093 */
1091void 1094_MHD_EXTERN void
1092SPDY_set_cls_to_request(struct SPDY_Request * request, 1095SPDY_set_cls_to_request(struct SPDY_Request * request,
1093 void * cls); 1096 void * cls);
1094 1097
@@ -1101,7 +1104,7 @@ SPDY_set_cls_to_request(struct SPDY_Request * request,
1101 * @return same pointer added by SPDY_set_cls_to_request() or 1104 * @return same pointer added by SPDY_set_cls_to_request() or
1102 * NULL when nothing was associated 1105 * NULL when nothing was associated
1103 */ 1106 */
1104void * 1107_MHD_EXTERN void *
1105SPDY_get_cls_from_request(struct SPDY_Request * request); 1108SPDY_get_cls_from_request(struct SPDY_Request * request);
1106 1109
1107 1110
@@ -1132,7 +1135,7 @@ SPDY_get_cls_from_request(struct SPDY_Request * request);
1132 * headers 1135 * headers
1133 * @return NULL on error, handle to response object on success 1136 * @return NULL on error, handle to response object on success
1134 */ 1137 */
1135struct SPDY_Response * 1138_MHD_EXTERN struct SPDY_Response *
1136SPDY_build_response(int status, 1139SPDY_build_response(int status,
1137 const char * statustext, 1140 const char * statustext,
1138 const char * version, 1141 const char * version,
@@ -1172,7 +1175,7 @@ SPDY_build_response(int status,
1172 * SPDY_MAX_SUPPORTED_FRAME_SIZE instead. 1175 * SPDY_MAX_SUPPORTED_FRAME_SIZE instead.
1173 * @return NULL on error, handle to response object on success 1176 * @return NULL on error, handle to response object on success
1174 */ 1177 */
1175struct SPDY_Response * 1178_MHD_EXTERN struct SPDY_Response *
1176SPDY_build_response_with_callback(int status, 1179SPDY_build_response_with_callback(int status,
1177 const char * statustext, 1180 const char * statustext,
1178 const char * version, 1181 const char * version,
@@ -1210,7 +1213,7 @@ SPDY_build_response_with_callback(int status,
1210 * @param rrcb_cls extra argument to rcb 1213 * @param rrcb_cls extra argument to rcb
1211 * @return SPDY_NO on error or SPDY_YES on success 1214 * @return SPDY_NO on error or SPDY_YES on success
1212 */ 1215 */
1213int 1216_MHD_EXTERN int
1214SPDY_queue_response (struct SPDY_Request * request, 1217SPDY_queue_response (struct SPDY_Request * request,
1215 struct SPDY_Response *response, 1218 struct SPDY_Response *response,
1216 bool closestream, 1219 bool closestream,
@@ -1230,7 +1233,7 @@ SPDY_queue_response (struct SPDY_Request * request,
1230 * 1233 *
1231 * @param response to destroy 1234 * @param response to destroy
1232 */ 1235 */
1233void 1236_MHD_EXTERN void
1234SPDY_destroy_response (struct SPDY_Response *response); 1237SPDY_destroy_response (struct SPDY_Response *response);
1235 1238
1236 1239
@@ -1244,7 +1247,7 @@ SPDY_destroy_response (struct SPDY_Response *response);
1244 * 1247 *
1245 * @return hendler to the new empty structure or NULL on error 1248 * @return hendler to the new empty structure or NULL on error
1246 */ 1249 */
1247const struct SPDY_Settings * 1250_MHD_EXTERN const struct SPDY_Settings *
1248SPDY_settings_create (); 1251SPDY_settings_create ();
1249 1252
1250 1253
@@ -1261,7 +1264,7 @@ SPDY_settings_create ();
1261 * @return SPDY_NO on error 1264 * @return SPDY_NO on error
1262 * or SPDY_YES if a new setting was added 1265 * or SPDY_YES if a new setting was added
1263 */ 1266 */
1264int 1267_MHD_EXTERN int
1265SPDY_settings_add (struct SPDY_Settings *container, 1268SPDY_settings_add (struct SPDY_Settings *container,
1266 enum SPDY_SETTINGS id, 1269 enum SPDY_SETTINGS id,
1267 enum SPDY_FLAG_SETTINGS flags, 1270 enum SPDY_FLAG_SETTINGS flags,
@@ -1279,7 +1282,7 @@ SPDY_settings_add (struct SPDY_Settings *container,
1279 * @return SPDY_NO if the setting is not into the structure 1282 * @return SPDY_NO if the setting is not into the structure
1280 * or SPDY_YES if it is into it 1283 * or SPDY_YES if it is into it
1281 */ 1284 */
1282int 1285_MHD_EXTERN int
1283SPDY_settings_lookup (const struct SPDY_Settings * container, 1286SPDY_settings_lookup (const struct SPDY_Settings * container,
1284 enum SPDY_SETTINGS id, 1287 enum SPDY_SETTINGS id,
1285 enum SPDY_FLAG_SETTINGS * flags, 1288 enum SPDY_FLAG_SETTINGS * flags,
@@ -1295,7 +1298,7 @@ SPDY_settings_lookup (const struct SPDY_Settings * container,
1295 * @param iterator_cls extra argument to iterator 1298 * @param iterator_cls extra argument to iterator
1296 * @return number of entries iterated over 1299 * @return number of entries iterated over
1297 */ 1300 */
1298int 1301_MHD_EXTERN int
1299SPDY_settings_iterate (const struct SPDY_Settings * container, 1302SPDY_settings_iterate (const struct SPDY_Settings * container,
1300 SPDY_SettingsIterator iterator, 1303 SPDY_SettingsIterator iterator,
1301 void * iterator_cls); 1304 void * iterator_cls);
@@ -1308,7 +1311,7 @@ SPDY_settings_iterate (const struct SPDY_Settings * container,
1308 * 1311 *
1309 * @param container structure which to detroy 1312 * @param container structure which to detroy
1310 */ 1313 */
1311void 1314_MHD_EXTERN void
1312SPDY_settings_destroy (struct SPDY_Settings * container); 1315SPDY_settings_destroy (struct SPDY_Settings * container);
1313 1316
1314 1317
@@ -1330,7 +1333,7 @@ SPDY_settings_destroy (struct SPDY_Settings * container);
1330 * @return SPDY_NO on error or SPDY_YES on 1333 * @return SPDY_NO on error or SPDY_YES on
1331 * success 1334 * success
1332 */ 1335 */
1333int 1336_MHD_EXTERN int
1334SPDY_send_settings (struct SPDY_Session * session, 1337SPDY_send_settings (struct SPDY_Session * session,
1335 struct SPDY_Settings * settings, 1338 struct SPDY_Settings * settings,
1336 enum SPDY_FLAG_SETTINGS_FRAME flags, 1339 enum SPDY_FLAG_SETTINGS_FRAME flags,
@@ -1352,7 +1355,7 @@ SPDY_send_settings (struct SPDY_Session * session,
1352 * 1355 *
1353 * @param request to destroy 1356 * @param request to destroy
1354 */ 1357 */
1355void 1358_MHD_EXTERN void
1356SPDY_destroy_request (struct SPDY_Request * request); 1359SPDY_destroy_request (struct SPDY_Request * request);
1357 1360
1358 1361
@@ -1365,7 +1368,7 @@ SPDY_destroy_request (struct SPDY_Request * request);
1365 * @param rttcb_cls extra argument to rttcb 1368 * @param rttcb_cls extra argument to rttcb
1366 * @return SPDY_NO on error or SPDY_YES on success 1369 * @return SPDY_NO on error or SPDY_YES on success
1367 */ 1370 */
1368int 1371_MHD_EXTERN int
1369SPDY_send_ping(struct SPDY_Session * session, 1372SPDY_send_ping(struct SPDY_Session * session,
1370 SPDY_PingCallback rttcb, 1373 SPDY_PingCallback rttcb,
1371 void * rttcb_cls); 1374 void * rttcb_cls);
diff --git a/src/include/platform.h b/src/include/platform.h
index bcf36ac6..f8f75f0d 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -111,14 +111,4 @@
111 111
112#include <plibc.h> 112#include <plibc.h>
113 113
114#define GCC_VERSION (__GNUC__ * 10000 \
115 + __GNUC_MINOR__ * 100 \
116 + __GNUC_PATCHLEVEL__)
117#if GCC_VERSION > 40000
118#define HIDDEN_SYMBOL __attribute__ ((visibility ("hidden")))
119#else
120#define HIDDEN_SYMBOL
121#endif
122
123
124#endif 114#endif
diff --git a/src/microhttpd/EXPORT.sym b/src/microhttpd/EXPORT.sym
deleted file mode 100644
index 402a0ef3..00000000
--- a/src/microhttpd/EXPORT.sym
+++ /dev/null
@@ -1,39 +0,0 @@
1MHD_start_daemon
2MHD_start_daemon_va
3MHD_stop_daemon
4MHD_get_fdset
5MHD_get_timeout
6MHD_run
7MHD_run_from_select
8MHD_get_connection_values
9MHD_set_connection_value
10MHD_lookup_connection_value
11MHD_queue_response
12MHD_create_response_from_callback
13MHD_create_response_from_data
14MHD_create_response_from_fd
15MHD_create_response_from_fd_at_offset
16MHD_create_response_from_buffer
17MHD_destroy_response
18MHD_add_response_header
19MHD_add_response_footer
20MHD_del_response_header
21MHD_get_response_headers
22MHD_get_response_header
23MHD_create_post_processor
24MHD_post_process
25MHD_quiesce_daemon
26MHD_destroy_post_processor
27MHD_get_daemon_info
28MHD_get_connection_info
29MHD_set_panic_func
30MHD_get_version
31MHD_digest_auth_get_username
32MHD_digest_auth_check
33MHD_queue_auth_fail_response
34MHD_basic_auth_get_username_password
35MHD_queue_basic_auth_fail_response
36MHD_add_connection
37MHD_set_connection_option
38MHD_suspend_connection
39MHD_resume_connection
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index 54706f56..d3c4b286 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -6,10 +6,9 @@ AM_CPPFLAGS = \
6 $(PLIBC_INCLUDE) \ 6 $(PLIBC_INCLUDE) \
7 -I$(top_srcdir)/src/include \ 7 -I$(top_srcdir)/src/include \
8 -I$(top_srcdir)/src/daemon \ 8 -I$(top_srcdir)/src/daemon \
9 $(HIDDEN_VISIBILITY_CFLAGS) \
9 @LIBGCRYPT_CFLAGS@ 10 @LIBGCRYPT_CFLAGS@
10 11
11EXTRA_DIST = EXPORT.sym
12
13lib_LTLIBRARIES = \ 12lib_LTLIBRARIES = \
14 libmicrohttpd.la 13 libmicrohttpd.la
15 14
@@ -23,7 +22,6 @@ libmicrohttpd_la_SOURCES = \
23 response.c response.h 22 response.c response.h
24libmicrohttpd_la_LDFLAGS = \ 23libmicrohttpd_la_LDFLAGS = \
25 $(MHD_LIB_LDFLAGS) \ 24 $(MHD_LIB_LDFLAGS) \
26 -export-symbols $(top_srcdir)/src/microhttpd/EXPORT.sym \
27 -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@ 25 -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
28 26
29if USE_COVERAGE 27if USE_COVERAGE
diff --git a/src/microhttpd/base64.c b/src/microhttpd/base64.c
index 3e390b8b..4fb4755e 100644
--- a/src/microhttpd/base64.c
+++ b/src/microhttpd/base64.c
@@ -26,7 +26,6 @@ static const char base64_digits[] =
26 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 26 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
27 27
28 28
29HIDDEN_SYMBOL
30char * 29char *
31BASE64Decode(const char* src) 30BASE64Decode(const char* src)
32{ 31{
diff --git a/src/microhttpd/base64.h b/src/microhttpd/base64.h
index 34948c07..ba96ca0c 100644
--- a/src/microhttpd/base64.h
+++ b/src/microhttpd/base64.h
@@ -11,7 +11,6 @@
11 11
12#include "platform.h" 12#include "platform.h"
13 13
14HIDDEN_SYMBOL
15char * 14char *
16BASE64Decode(const char* src); 15BASE64Decode(const char* src);
17 16
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 7709a92d..684c5b01 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -257,7 +257,7 @@ need_100_continue (struct MHD_Connection *connection)
257 * @param connection connection to close 257 * @param connection connection to close
258 * @param termination_code termination reason to give 258 * @param termination_code termination reason to give
259 */ 259 */
260void HIDDEN_SYMBOL 260void
261MHD_connection_close (struct MHD_Connection *connection, 261MHD_connection_close (struct MHD_Connection *connection,
262 enum MHD_RequestTerminationCode termination_code) 262 enum MHD_RequestTerminationCode termination_code)
263{ 263{
@@ -1927,7 +1927,6 @@ update_last_activity (struct MHD_Connection *connection)
1927 * @return always #MHD_YES (we should continue to process the 1927 * @return always #MHD_YES (we should continue to process the
1928 * connection) 1928 * connection)
1929 */ 1929 */
1930HIDDEN_SYMBOL
1931int 1930int
1932MHD_connection_handle_read (struct MHD_Connection *connection) 1931MHD_connection_handle_read (struct MHD_Connection *connection)
1933{ 1932{
@@ -1991,7 +1990,6 @@ MHD_connection_handle_read (struct MHD_Connection *connection)
1991 * @return always #MHD_YES (we should continue to process the 1990 * @return always #MHD_YES (we should continue to process the
1992 * connection) 1991 * connection)
1993 */ 1992 */
1994HIDDEN_SYMBOL
1995int 1993int
1996MHD_connection_handle_write (struct MHD_Connection *connection) 1994MHD_connection_handle_write (struct MHD_Connection *connection)
1997{ 1995{
@@ -2195,7 +2193,6 @@ cleanup_connection (struct MHD_Connection *connection)
2195 * @return #MHD_YES if we should continue to process the 2193 * @return #MHD_YES if we should continue to process the
2196 * connection (not dead yet), #MHD_NO if it died 2194 * connection (not dead yet), #MHD_NO if it died
2197 */ 2195 */
2198HIDDEN_SYMBOL
2199int 2196int
2200MHD_connection_handle_idle (struct MHD_Connection *connection) 2197MHD_connection_handle_idle (struct MHD_Connection *connection)
2201{ 2198{
@@ -2633,7 +2630,6 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
2633 * @return #MHD_YES if we should continue to process the 2630 * @return #MHD_YES if we should continue to process the
2634 * connection (not dead yet), #MHD_NO if it died 2631 * connection (not dead yet), #MHD_NO if it died
2635 */ 2632 */
2636HIDDEN_SYMBOL
2637int 2633int
2638MHD_connection_epoll_update_ (struct MHD_Connection *connection) 2634MHD_connection_epoll_update_ (struct MHD_Connection *connection)
2639{ 2635{
@@ -2681,7 +2677,6 @@ MHD_connection_epoll_update_ (struct MHD_Connection *connection)
2681 * 2677 *
2682 * @param connection connection to initialize 2678 * @param connection connection to initialize
2683 */ 2679 */
2684HIDDEN_SYMBOL
2685void 2680void
2686MHD_set_http_callbacks_ (struct MHD_Connection *connection) 2681MHD_set_http_callbacks_ (struct MHD_Connection *connection)
2687{ 2682{
diff --git a/src/microhttpd/connection.h b/src/microhttpd/connection.h
index 1520d46e..4b87c3ef 100644
--- a/src/microhttpd/connection.h
+++ b/src/microhttpd/connection.h
@@ -88,7 +88,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection);
88 * @param connection connection to close 88 * @param connection connection to close
89 * @param termination_code termination reason to give 89 * @param termination_code termination reason to give
90 */ 90 */
91void HIDDEN_SYMBOL 91void
92MHD_connection_close (struct MHD_Connection *connection, 92MHD_connection_close (struct MHD_Connection *connection,
93 enum MHD_RequestTerminationCode termination_code); 93 enum MHD_RequestTerminationCode termination_code);
94 94
diff --git a/src/microhttpd/connection_https.c b/src/microhttpd/connection_https.c
index 474eece7..b566d83c 100644
--- a/src/microhttpd/connection_https.c
+++ b/src/microhttpd/connection_https.c
@@ -170,7 +170,6 @@ MHD_tls_connection_handle_idle (struct MHD_Connection *connection)
170 * 170 *
171 * @param connection which callbacks should be modified 171 * @param connection which callbacks should be modified
172 */ 172 */
173HIDDEN_SYMBOL
174void 173void
175MHD_set_https_callbacks (struct MHD_Connection *connection) 174MHD_set_https_callbacks (struct MHD_Connection *connection)
176{ 175{
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index fb7eb145..b0a940fe 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -121,13 +121,11 @@ mhd_panic_std (void *cls,
121/** 121/**
122 * Handler for fatal errors. 122 * Handler for fatal errors.
123 */ 123 */
124HIDDEN_SYMBOL
125MHD_PanicCallback mhd_panic; 124MHD_PanicCallback mhd_panic;
126 125
127/** 126/**
128 * Closure argument for "mhd_panic". 127 * Closure argument for "mhd_panic".
129 */ 128 */
130HIDDEN_SYMBOL
131void *mhd_panic_cls; 129void *mhd_panic_cls;
132 130
133 131
@@ -4141,11 +4139,11 @@ MHD_get_version (void)
4141 4139
4142 4140
4143#ifdef __GNUC__ 4141#ifdef __GNUC__
4144#define ATTRIBUTE_CONSTRUCTOR __attribute__ ((constructor)) 4142#define FUNC_CONSTRUCTOR(f) static void __attribute__ ((constructor)) f
4145#define ATTRIBUTE_DESTRUCTOR __attribute__ ((destructor)) 4143#define FUNC_DESTRUCTOR(f) static void __attribute__ ((destructor)) f
4146#else // !__GNUC__ 4144#else // !__GNUC__
4147#define ATTRIBUTE_CONSTRUCTOR 4145#define FUNC_CONSTRUCTOR(f) _MHD_EXTERN void f
4148#define ATTRIBUTE_DESTRUCTOR 4146#define FUNC_DESTRUCTOR(f) _MHD_EXTERN void f
4149#endif // __GNUC__ 4147#endif // __GNUC__
4150 4148
4151#if HTTPS_SUPPORT 4149#if HTTPS_SUPPORT
@@ -4158,8 +4156,7 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
4158/** 4156/**
4159 * Initialize do setup work. 4157 * Initialize do setup work.
4160 */ 4158 */
4161void ATTRIBUTE_CONSTRUCTOR 4159FUNC_CONSTRUCTOR (MHD_init) ()
4162MHD_init ()
4163{ 4160{
4164 mhd_panic = &mhd_panic_std; 4161 mhd_panic = &mhd_panic_std;
4165 mhd_panic_cls = NULL; 4162 mhd_panic_cls = NULL;
@@ -4177,8 +4174,7 @@ MHD_init ()
4177} 4174}
4178 4175
4179 4176
4180void ATTRIBUTE_DESTRUCTOR 4177FUNC_DESTRUCTOR (MHD_fini) ()
4181MHD_fini ()
4182{ 4178{
4183#if HTTPS_SUPPORT 4179#if HTTPS_SUPPORT
4184 gnutls_global_deinit (); 4180 gnutls_global_deinit ();
diff --git a/src/microhttpd/internal.c b/src/microhttpd/internal.c
index 7afaba74..9b234fea 100644
--- a/src/microhttpd/internal.c
+++ b/src/microhttpd/internal.c
@@ -31,7 +31,6 @@
31/** 31/**
32 * State to string dictionary. 32 * State to string dictionary.
33 */ 33 */
34HIDDEN_SYMBOL
35const char * 34const char *
36MHD_state_to_string (enum MHD_CONNECTION_STATE state) 35MHD_state_to_string (enum MHD_CONNECTION_STATE state)
37{ 36{
@@ -91,7 +90,7 @@ MHD_state_to_string (enum MHD_CONNECTION_STATE state)
91 * fprintf-like helper function for logging debug 90 * fprintf-like helper function for logging debug
92 * messages. 91 * messages.
93 */ 92 */
94void HIDDEN_SYMBOL 93void
95MHD_DLOG (const struct MHD_Daemon *daemon, const char *format, ...) 94MHD_DLOG (const struct MHD_Daemon *daemon, const char *format, ...)
96{ 95{
97 va_list va; 96 va_list va;
@@ -116,7 +115,6 @@ MHD_DLOG (const struct MHD_Daemon *daemon, const char *format, ...)
116 * @return length of the resulting val (strlen(val) maybe 115 * @return length of the resulting val (strlen(val) maybe
117 * shorter afterwards due to elimination of escape sequences) 116 * shorter afterwards due to elimination of escape sequences)
118 */ 117 */
119HIDDEN_SYMBOL
120size_t 118size_t
121MHD_http_unescape (void *cls, 119MHD_http_unescape (void *cls,
122 struct MHD_Connection *connection, 120 struct MHD_Connection *connection,
@@ -167,7 +165,6 @@ MHD_http_unescape (void *cls,
167} 165}
168 166
169 167
170HIDDEN_SYMBOL
171time_t 168time_t
172MHD_monotonic_time (void) 169MHD_monotonic_time (void)
173{ 170{
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 6146e2ac..9d50de25 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -189,7 +189,7 @@ struct MHD_NonceNc
189 * fprintf-like helper function for logging debug 189 * fprintf-like helper function for logging debug
190 * messages. 190 * messages.
191 */ 191 */
192void HIDDEN_SYMBOL 192void
193MHD_DLOG (const struct MHD_Daemon *daemon, 193MHD_DLOG (const struct MHD_Daemon *daemon,
194 const char *format, ...); 194 const char *format, ...);
195#endif 195#endif
diff --git a/src/microhttpd/md5.c b/src/microhttpd/md5.c
index 309f492c..e35d5f26 100644
--- a/src/microhttpd/md5.c
+++ b/src/microhttpd/md5.c
@@ -150,7 +150,7 @@ MD5Transform(uint32_t buf[4],
150 * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious 150 * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
151 * initialization constants. 151 * initialization constants.
152 */ 152 */
153void HIDDEN_SYMBOL 153void
154MD5Init(struct MD5Context *ctx) 154MD5Init(struct MD5Context *ctx)
155{ 155{
156 ctx->buf[0] = 0x67452301; 156 ctx->buf[0] = 0x67452301;
@@ -166,7 +166,7 @@ MD5Init(struct MD5Context *ctx)
166 * Update context to reflect the concatenation of another buffer full 166 * Update context to reflect the concatenation of another buffer full
167 * of bytes. 167 * of bytes.
168 */ 168 */
169void HIDDEN_SYMBOL 169void
170MD5Update(struct MD5Context *ctx, 170MD5Update(struct MD5Context *ctx,
171 const void *data, 171 const void *data,
172 unsigned len) 172 unsigned len)
@@ -218,7 +218,7 @@ MD5Update(struct MD5Context *ctx,
218 * Final wrapup - pad to 64-byte boundary with the bit pattern 218 * Final wrapup - pad to 64-byte boundary with the bit pattern
219 * 1 0* (64-bit count of bits processed, MSB-first) 219 * 1 0* (64-bit count of bits processed, MSB-first)
220 */ 220 */
221void HIDDEN_SYMBOL 221void
222MD5Final (unsigned char digest[16], 222MD5Final (unsigned char digest[16],
223 struct MD5Context *ctx) 223 struct MD5Context *ctx)
224{ 224{
diff --git a/src/microhttpd/md5.h b/src/microhttpd/md5.h
index 077b2e8c..5e77774c 100644
--- a/src/microhttpd/md5.h
+++ b/src/microhttpd/md5.h
@@ -37,15 +37,15 @@ struct MD5Context
37}; 37};
38 38
39 39
40void HIDDEN_SYMBOL 40void
41MD5Init(struct MD5Context *ctx); 41MD5Init(struct MD5Context *ctx);
42 42
43void HIDDEN_SYMBOL 43void
44MD5Update(struct MD5Context *ctx, 44MD5Update(struct MD5Context *ctx,
45 const void *buf, 45 const void *buf,
46 unsigned len); 46 unsigned len);
47 47
48void HIDDEN_SYMBOL 48void
49MD5Final(unsigned char digest[MD5_DIGEST_SIZE], 49MD5Final(unsigned char digest[MD5_DIGEST_SIZE],
50 struct MD5Context *ctx); 50 struct MD5Context *ctx);
51 51
diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c
index 06ef06b9..57962c17 100644
--- a/src/microhttpd/memorypool.c
+++ b/src/microhttpd/memorypool.c
@@ -83,7 +83,6 @@ struct MemoryPool
83 * @param max maximum size of the pool 83 * @param max maximum size of the pool
84 * @return NULL on error 84 * @return NULL on error
85 */ 85 */
86HIDDEN_SYMBOL
87struct MemoryPool * 86struct MemoryPool *
88MHD_pool_create (size_t max) 87MHD_pool_create (size_t max)
89{ 88{
@@ -127,7 +126,7 @@ MHD_pool_create (size_t max)
127 * 126 *
128 * @param pool memory pool to destroy 127 * @param pool memory pool to destroy
129 */ 128 */
130void HIDDEN_SYMBOL 129void
131MHD_pool_destroy (struct MemoryPool *pool) 130MHD_pool_destroy (struct MemoryPool *pool)
132{ 131{
133 if (pool == NULL) 132 if (pool == NULL)
@@ -151,7 +150,6 @@ MHD_pool_destroy (struct MemoryPool *pool)
151 * @return NULL if the pool cannot support size more 150 * @return NULL if the pool cannot support size more
152 * bytes 151 * bytes
153 */ 152 */
154HIDDEN_SYMBOL
155void * 153void *
156MHD_pool_allocate (struct MemoryPool *pool, 154MHD_pool_allocate (struct MemoryPool *pool,
157 size_t size, int from_end) 155 size_t size, int from_end)
@@ -195,7 +193,6 @@ MHD_pool_allocate (struct MemoryPool *pool,
195 * NULL if the pool cannot support @a new_size 193 * NULL if the pool cannot support @a new_size
196 * bytes (old continues to be valid for @a old_size) 194 * bytes (old continues to be valid for @a old_size)
197 */ 195 */
198HIDDEN_SYMBOL
199void * 196void *
200MHD_pool_reallocate (struct MemoryPool *pool, 197MHD_pool_reallocate (struct MemoryPool *pool,
201 void *old, 198 void *old,
@@ -250,7 +247,6 @@ MHD_pool_reallocate (struct MemoryPool *pool,
250 * @param size how many bytes need to be kept at this address 247 * @param size how many bytes need to be kept at this address
251 * @return addr new address of @a keep (if it had to change) 248 * @return addr new address of @a keep (if it had to change)
252 */ 249 */
253HIDDEN_SYMBOL
254void * 250void *
255MHD_pool_reset (struct MemoryPool *pool, 251MHD_pool_reset (struct MemoryPool *pool,
256 void *keep, 252 void *keep,
diff --git a/src/microhttpd/memorypool.h b/src/microhttpd/memorypool.h
index 5fc52e6d..bf929d2f 100644
--- a/src/microhttpd/memorypool.h
+++ b/src/microhttpd/memorypool.h
@@ -44,7 +44,6 @@ struct MemoryPool;
44 * @param max maximum size of the pool 44 * @param max maximum size of the pool
45 * @return NULL on error 45 * @return NULL on error
46 */ 46 */
47HIDDEN_SYMBOL
48struct MemoryPool * 47struct MemoryPool *
49MHD_pool_create (size_t max); 48MHD_pool_create (size_t max);
50 49
@@ -54,7 +53,7 @@ MHD_pool_create (size_t max);
54 * 53 *
55 * @param pool memory pool to destroy 54 * @param pool memory pool to destroy
56 */ 55 */
57void HIDDEN_SYMBOL 56void
58MHD_pool_destroy (struct MemoryPool *pool); 57MHD_pool_destroy (struct MemoryPool *pool);
59 58
60 59
@@ -69,7 +68,6 @@ MHD_pool_destroy (struct MemoryPool *pool);
69 * @return NULL if the pool cannot support size more 68 * @return NULL if the pool cannot support size more
70 * bytes 69 * bytes
71 */ 70 */
72HIDDEN_SYMBOL
73void * 71void *
74MHD_pool_allocate (struct MemoryPool *pool, 72MHD_pool_allocate (struct MemoryPool *pool,
75 size_t size, int from_end); 73 size_t size, int from_end);
@@ -92,7 +90,6 @@ MHD_pool_allocate (struct MemoryPool *pool,
92 * NULL if the pool cannot support new_size 90 * NULL if the pool cannot support new_size
93 * bytes (old continues to be valid for old_size) 91 * bytes (old continues to be valid for old_size)
94 */ 92 */
95HIDDEN_SYMBOL
96void * 93void *
97MHD_pool_reallocate (struct MemoryPool *pool, 94MHD_pool_reallocate (struct MemoryPool *pool,
98 void *old, 95 void *old,
@@ -109,7 +106,6 @@ MHD_pool_reallocate (struct MemoryPool *pool,
109 * @param size how many bytes need to be kept at this address 106 * @param size how many bytes need to be kept at this address
110 * @return addr new address of "keep" (if it had to change) 107 * @return addr new address of "keep" (if it had to change)
111 */ 108 */
112HIDDEN_SYMBOL
113void * 109void *
114MHD_pool_reset (struct MemoryPool *pool, 110MHD_pool_reset (struct MemoryPool *pool,
115 void *keep, 111 void *keep,
diff --git a/src/microhttpd/reason_phrase.c b/src/microhttpd/reason_phrase.c
index f97d1fbf..c809fdd2 100644
--- a/src/microhttpd/reason_phrase.c
+++ b/src/microhttpd/reason_phrase.c
@@ -149,7 +149,6 @@ static const struct MHD_Reason_Block reasons[] = {
149}; 149};
150 150
151 151
152HIDDEN_SYMBOL
153const char * 152const char *
154MHD_get_reason_phrase_for (unsigned int code) 153MHD_get_reason_phrase_for (unsigned int code)
155{ 154{
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index c95b9176..abaa64ca 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -469,7 +469,7 @@ MHD_destroy_response (struct MHD_Response *response)
469} 469}
470 470
471 471
472void HIDDEN_SYMBOL 472void
473MHD_increment_response_rc (struct MHD_Response *response) 473MHD_increment_response_rc (struct MHD_Response *response)
474{ 474{
475 pthread_mutex_lock (&response->mutex); 475 pthread_mutex_lock (&response->mutex);
diff --git a/src/microhttpd/response.h b/src/microhttpd/response.h
index c79b0058..dcf19350 100644
--- a/src/microhttpd/response.h
+++ b/src/microhttpd/response.h
@@ -31,7 +31,7 @@
31 * Increment response RC. Should this be part of the 31 * Increment response RC. Should this be part of the
32 * public API? 32 * public API?
33 */ 33 */
34void HIDDEN_SYMBOL 34void
35MHD_increment_response_rc (struct MHD_Response *response); 35MHD_increment_response_rc (struct MHD_Response *response);
36 36
37 37
diff --git a/src/microspdy/EXPORT.sym b/src/microspdy/EXPORT.sym
deleted file mode 100644
index e0bb71ad..00000000
--- a/src/microspdy/EXPORT.sym
+++ /dev/null
@@ -1,3 +0,0 @@
1SPDY_start_daemon
2SPDY_stop_daemon
3SPDYF_monotonic_time
diff --git a/src/microspdy/Makefile.am b/src/microspdy/Makefile.am
index 9ad451bd..3a343ddc 100644
--- a/src/microspdy/Makefile.am
+++ b/src/microspdy/Makefile.am
@@ -5,10 +5,8 @@ endif
5AM_CPPFLAGS = \ 5AM_CPPFLAGS = \
6 $(PLIBC_INCLUDE) \ 6 $(PLIBC_INCLUDE) \
7 -I$(top_srcdir)/src/include \ 7 -I$(top_srcdir)/src/include \
8 -I$(top_srcdir)/src/microspdy 8 -I$(top_srcdir)/src/microspdy \
9 9 $(HIDDEN_VISIBILITY_CFLAGS)
10
11EXTRA_DIST = EXPORT.sym
12 10
13 11
14lib_LTLIBRARIES = \ 12lib_LTLIBRARIES = \
diff --git a/src/testspdy/common.c b/src/testspdy/common.c
index 65bcbcce..98c2d674 100644
--- a/src/testspdy/common.c
+++ b/src/testspdy/common.c
@@ -27,21 +27,19 @@
27#include <sys/time.h> 27#include <sys/time.h>
28 28
29#ifdef __GNUC__ 29#ifdef __GNUC__
30#define ATTRIBUTE_CONSTRUCTOR __attribute__ ((constructor)) 30#define FUNC_CONSTRUCTOR(f) static void __attribute__ ((constructor)) f
31#define ATTRIBUTE_DESTRUCTOR __attribute__ ((destructor)) 31#define FUNC_DESTRUCTOR(f) static void __attribute__ ((destructor)) f
32#else // !__GNUC__ 32#else // !__GNUC__
33#define ATTRIBUTE_CONSTRUCTOR 33#define FUNC_CONSTRUCTOR(f) _MHD_EXTERN void f
34#define ATTRIBUTE_DESTRUCTOR 34#define FUNC_DESTRUCTOR(f) _MHD_EXTERN void f
35#endif // __GNUC__ 35#endif // __GNUC__
36 36
37void ATTRIBUTE_CONSTRUCTOR 37FUNC_CONSTRUCTOR (constructor)()
38constructor()
39{ 38{
40 printf("\nTEST START -------------------------------------------------------\n"); 39 printf("\nTEST START -------------------------------------------------------\n");
41} 40}
42 41
43void ATTRIBUTE_DESTRUCTOR 42FUNC_DESTRUCTOR (destructor)()
44destructor()
45{ 43{
46 printf("------------------------------------------------------- TEST END\n"); 44 printf("------------------------------------------------------- TEST END\n");
47} 45}