diff options
-rw-r--r-- | configure.ac | 49 | ||||
-rw-r--r-- | src/include/microhttpd.h | 82 | ||||
-rw-r--r-- | src/include/microspdy.h | 67 | ||||
-rw-r--r-- | src/include/platform.h | 10 | ||||
-rw-r--r-- | src/microhttpd/EXPORT.sym | 39 | ||||
-rw-r--r-- | src/microhttpd/Makefile.am | 4 | ||||
-rw-r--r-- | src/microhttpd/base64.c | 1 | ||||
-rw-r--r-- | src/microhttpd/base64.h | 1 | ||||
-rw-r--r-- | src/microhttpd/connection.c | 7 | ||||
-rw-r--r-- | src/microhttpd/connection.h | 2 | ||||
-rw-r--r-- | src/microhttpd/connection_https.c | 1 | ||||
-rw-r--r-- | src/microhttpd/daemon.c | 16 | ||||
-rw-r--r-- | src/microhttpd/internal.c | 5 | ||||
-rw-r--r-- | src/microhttpd/internal.h | 2 | ||||
-rw-r--r-- | src/microhttpd/md5.c | 6 | ||||
-rw-r--r-- | src/microhttpd/md5.h | 6 | ||||
-rw-r--r-- | src/microhttpd/memorypool.c | 6 | ||||
-rw-r--r-- | src/microhttpd/memorypool.h | 6 | ||||
-rw-r--r-- | src/microhttpd/reason_phrase.c | 1 | ||||
-rw-r--r-- | src/microhttpd/response.c | 2 | ||||
-rw-r--r-- | src/microhttpd/response.h | 2 | ||||
-rw-r--r-- | src/microspdy/EXPORT.sym | 3 | ||||
-rw-r--r-- | src/microspdy/Makefile.am | 6 | ||||
-rw-r--r-- | src/testspdy/common.c | 14 |
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 | ||
87 | AC_CHECK_DECLS([_stati64, _wstat32i64]) | ||
88 | |||
86 | AC_CHECK_PROG(HAVE_CURL_BINARY,[curl],true,false) | 89 | AC_CHECK_PROG(HAVE_CURL_BINARY,[curl],true,false) |
87 | AM_CONDITIONAL(HAVE_CURL_BINARY,$HAVE_CURL_BINARY) | 90 | AM_CONDITIONAL(HAVE_CURL_BINARY,$HAVE_CURL_BINARY) |
88 | AC_CHECK_PROG(HAVE_MAKEINFO_BINARY,[makeinfo],true,false) | 91 | AC_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 |
295 | AC_CHECK_DECLS([TCP_NOPUSH], [], [], [[#include <netinet/tcp.h>]]) | 298 | AC_CHECK_DECLS([TCP_NOPUSH], [], [], [[#include <netinet/tcp.h>]]) |
296 | 299 | ||
300 | HIDDEN_VISIBILITY_CFLAGS="" | ||
301 | case "$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 | ;; | ||
326 | esac | ||
327 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) | ||
328 | |||
297 | # libcurl (required for testing) | 329 | # libcurl (required for testing) |
298 | SAVE_LIBS=$LIBS | 330 | SAVE_LIBS=$LIBS |
299 | 331 | ||
@@ -524,18 +556,7 @@ AM_CONDITIONAL(ENABLE_DAUTH, [test "x$enable_dauth" != "xno"]) | |||
524 | 556 | ||
525 | 557 | ||
526 | 558 | ||
527 | MHD_LIB_LDFLAGS="-export-dynamic -Wl,-no-undefined" | 559 | MHD_LIB_LDFLAGS="-export-dynamic -no-undefined" |
528 | |||
529 | # TODO insert a proper check here | ||
530 | AC_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 |
541 | AC_MSG_CHECKING(whether to compile with support for code coverage analysis) | 562 | AC_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 | */ |
1290 | struct MHD_Daemon * | 1294 | _MHD_EXTERN struct MHD_Daemon * |
1291 | MHD_start_daemon_va (unsigned int flags, | 1295 | MHD_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 | */ |
1314 | struct MHD_Daemon * | 1318 | _MHD_EXTERN struct MHD_Daemon * |
1315 | MHD_start_daemon (unsigned int flags, | 1319 | MHD_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 | */ |
1341 | int | 1345 | _MHD_EXTERN int |
1342 | MHD_quiesce_daemon (struct MHD_Daemon *daemon); | 1346 | MHD_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 | */ |
1351 | void | 1355 | _MHD_EXTERN void |
1352 | MHD_stop_daemon (struct MHD_Daemon *daemon); | 1356 | MHD_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 | */ |
1384 | int | 1388 | _MHD_EXTERN int |
1385 | MHD_add_connection (struct MHD_Daemon *daemon, | 1389 | MHD_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 | */ |
1405 | int | 1409 | _MHD_EXTERN int |
1406 | MHD_get_fdset (struct MHD_Daemon *daemon, | 1410 | MHD_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 | */ |
1427 | int | 1431 | _MHD_EXTERN int |
1428 | MHD_get_timeout (struct MHD_Daemon *daemon, | 1432 | MHD_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 | */ |
1451 | int | 1455 | _MHD_EXTERN int |
1452 | MHD_run (struct MHD_Daemon *daemon); | 1456 | MHD_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 | */ |
1474 | int | 1478 | _MHD_EXTERN int |
1475 | MHD_run_from_select (struct MHD_Daemon *daemon, | 1479 | MHD_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 | */ |
1496 | int | 1500 | _MHD_EXTERN int |
1497 | MHD_get_connection_values (struct MHD_Connection *connection, | 1501 | MHD_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 | */ |
1527 | int | 1531 | _MHD_EXTERN int |
1528 | MHD_set_connection_value (struct MHD_Connection *connection, | 1532 | MHD_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 | */ |
1550 | void | 1554 | _MHD_EXTERN void |
1551 | MHD_set_panic_func (MHD_PanicCallback cb, void *cls); | 1555 | MHD_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 | */ |
1564 | const char * | 1568 | _MHD_EXTERN const char * |
1565 | MHD_lookup_connection_value (struct MHD_Connection *connection, | 1569 | MHD_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 | */ |
1581 | int | 1585 | _MHD_EXTERN int |
1582 | MHD_queue_response (struct MHD_Connection *connection, | 1586 | MHD_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 | */ |
1614 | void | 1618 | _MHD_EXTERN void |
1615 | MHD_suspend_connection (struct MHD_Connection *connection); | 1619 | MHD_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 | */ |
1626 | void | 1630 | _MHD_EXTERN void |
1627 | MHD_resume_connection (struct MHD_Connection *connection); | 1631 | MHD_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 | */ |
1648 | struct MHD_Response * | 1652 | _MHD_EXTERN struct MHD_Response * |
1649 | MHD_create_response_from_callback (uint64_t size, | 1653 | MHD_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 | */ |
1669 | struct MHD_Response * | 1673 | _MHD_EXTERN struct MHD_Response * |
1670 | MHD_create_response_from_data (size_t size, | 1674 | MHD_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 | */ |
1722 | struct MHD_Response * | 1726 | _MHD_EXTERN struct MHD_Response * |
1723 | MHD_create_response_from_buffer (size_t size, | 1727 | MHD_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 | */ |
1739 | struct MHD_Response * | 1743 | _MHD_EXTERN struct MHD_Response * |
1740 | MHD_create_response_from_fd (size_t size, | 1744 | MHD_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 | */ |
1760 | struct MHD_Response * | 1764 | _MHD_EXTERN struct MHD_Response * |
1761 | MHD_create_response_from_fd_at_offset (size_t size, | 1765 | MHD_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 | */ |
1909 | void | 1913 | _MHD_EXTERN void |
1910 | MHD_destroy_response (struct MHD_Response *response); | 1914 | MHD_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 | */ |
1923 | int | 1927 | _MHD_EXTERN int |
1924 | MHD_add_response_header (struct MHD_Response *response, | 1928 | MHD_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 | */ |
1938 | int | 1942 | _MHD_EXTERN int |
1939 | MHD_add_response_footer (struct MHD_Response *response, | 1943 | MHD_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 | */ |
1953 | int | 1957 | _MHD_EXTERN int |
1954 | MHD_del_response_header (struct MHD_Response *response, | 1958 | MHD_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 | */ |
1969 | int | 1973 | _MHD_EXTERN int |
1970 | MHD_get_response_headers (struct MHD_Response *response, | 1974 | MHD_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 | */ |
1982 | const char * | 1986 | _MHD_EXTERN const char * |
1983 | MHD_get_response_header (struct MHD_Response *response, | 1987 | MHD_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 | */ |
2014 | struct MHD_PostProcessor * | 2018 | _MHD_EXTERN struct MHD_PostProcessor * |
2015 | MHD_create_post_processor (struct MHD_Connection *connection, | 2019 | MHD_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 | */ |
2033 | int | 2037 | _MHD_EXTERN int |
2034 | MHD_post_process (struct MHD_PostProcessor *pp, | 2038 | MHD_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 | */ |
2048 | int | 2052 | _MHD_EXTERN int |
2049 | MHD_destroy_post_processor (struct MHD_PostProcessor *pp); | 2053 | MHD_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 | */ |
2071 | char * | 2075 | _MHD_EXTERN char * |
2072 | MHD_digest_auth_get_username (struct MHD_Connection *connection); | 2076 | MHD_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 | */ |
2088 | int | 2092 | _MHD_EXTERN int |
2089 | MHD_digest_auth_check (struct MHD_Connection *connection, | 2093 | MHD_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 | */ |
2110 | int | 2114 | _MHD_EXTERN int |
2111 | MHD_queue_auth_fail_response (struct MHD_Connection *connection, | 2115 | MHD_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 | */ |
2127 | char * | 2131 | _MHD_EXTERN char * |
2128 | MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | 2132 | MHD_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 | */ |
2144 | int | 2148 | _MHD_EXTERN int |
2145 | MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection, | 2149 | MHD_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 | */ |
2162 | const union MHD_ConnectionInfo * | 2166 | _MHD_EXTERN const union MHD_ConnectionInfo * |
2163 | MHD_get_connection_info (struct MHD_Connection *connection, | 2167 | MHD_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 | */ |
2194 | int | 2198 | _MHD_EXTERN int |
2195 | MHD_set_connection_option (struct MHD_Connection *connection, | 2199 | MHD_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 | */ |
2235 | const union MHD_DaemonInfo * | 2239 | _MHD_EXTERN const union MHD_DaemonInfo * |
2236 | MHD_get_daemon_info (struct MHD_Daemon *daemon, | 2240 | MHD_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 | */ |
2247 | const char* | 2251 | _MHD_EXTERN const char* |
2248 | MHD_get_version (void); | 2252 | MHD_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 | */ |
817 | int | 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 | */ |
827 | void | 830 | _MHD_EXTERN void |
828 | SPDY_deinit (); | 831 | SPDY_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 | */ |
846 | void | 849 | _MHD_EXTERN void |
847 | SPDY_set_panic_func (SPDY_PanicCallback cb, | 850 | SPDY_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 | */ |
872 | struct SPDY_Daemon * | 875 | _MHD_EXTERN struct SPDY_Daemon * |
873 | SPDY_start_daemon (uint16_t port, | 876 | SPDY_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 | */ |
890 | void | 893 | _MHD_EXTERN void |
891 | SPDY_stop_daemon (struct SPDY_Daemon *daemon); | 894 | SPDY_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 | */ |
916 | int | 919 | _MHD_EXTERN int |
917 | SPDY_get_fdset (struct SPDY_Daemon * daemon, | 920 | SPDY_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 | */ |
934 | int | 937 | _MHD_EXTERN int |
935 | SPDY_get_timeout (struct SPDY_Daemon * daemon, | 938 | SPDY_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 | */ |
945 | void | 948 | _MHD_EXTERN void |
946 | SPDY_run (struct SPDY_Daemon *daemon); | 949 | SPDY_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 | */ |
961 | void | 964 | _MHD_EXTERN void |
962 | SPDY_close_session(struct SPDY_Session * session); | 965 | SPDY_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 | */ |
972 | void | 975 | _MHD_EXTERN void |
973 | SPDY_set_cls_to_session(struct SPDY_Session * session, | 976 | SPDY_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 | */ |
984 | void * | 987 | _MHD_EXTERN void * |
985 | SPDY_get_cls_from_session(struct SPDY_Session * session); | 988 | SPDY_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 | */ |
995 | socklen_t | 998 | _MHD_EXTERN socklen_t |
996 | SPDY_get_remote_addr(struct SPDY_Session * session, | 999 | SPDY_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 | */ |
1010 | struct SPDY_NameValue * | 1013 | _MHD_EXTERN struct SPDY_NameValue * |
1011 | SPDY_name_value_create (); | 1014 | SPDY_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 | */ |
1024 | int | 1027 | _MHD_EXTERN int |
1025 | SPDY_name_value_add (struct SPDY_NameValue * container, | 1028 | SPDY_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 | */ |
1039 | const char * const * | 1042 | _MHD_EXTERN const char * const * |
1040 | SPDY_name_value_lookup (struct SPDY_NameValue *container, | 1043 | SPDY_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 | */ |
1054 | int | 1057 | _MHD_EXTERN int |
1055 | SPDY_name_value_iterate (struct SPDY_NameValue *container, | 1058 | SPDY_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 | */ |
1066 | void | 1069 | _MHD_EXTERN void |
1067 | SPDY_name_value_destroy (struct SPDY_NameValue * container); | 1070 | SPDY_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 | */ |
1080 | struct SPDY_Session * | 1083 | _MHD_EXTERN struct SPDY_Session * |
1081 | SPDY_get_session_for_request(const struct SPDY_Request * request); | 1084 | SPDY_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 | */ |
1091 | void | 1094 | _MHD_EXTERN void |
1092 | SPDY_set_cls_to_request(struct SPDY_Request * request, | 1095 | SPDY_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 | */ |
1104 | void * | 1107 | _MHD_EXTERN void * |
1105 | SPDY_get_cls_from_request(struct SPDY_Request * request); | 1108 | SPDY_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 | */ |
1135 | struct SPDY_Response * | 1138 | _MHD_EXTERN struct SPDY_Response * |
1136 | SPDY_build_response(int status, | 1139 | SPDY_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 | */ |
1175 | struct SPDY_Response * | 1178 | _MHD_EXTERN struct SPDY_Response * |
1176 | SPDY_build_response_with_callback(int status, | 1179 | SPDY_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 | */ |
1213 | int | 1216 | _MHD_EXTERN int |
1214 | SPDY_queue_response (struct SPDY_Request * request, | 1217 | SPDY_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 | */ |
1233 | void | 1236 | _MHD_EXTERN void |
1234 | SPDY_destroy_response (struct SPDY_Response *response); | 1237 | SPDY_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 | */ |
1247 | const struct SPDY_Settings * | 1250 | _MHD_EXTERN const struct SPDY_Settings * |
1248 | SPDY_settings_create (); | 1251 | SPDY_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 | */ |
1264 | int | 1267 | _MHD_EXTERN int |
1265 | SPDY_settings_add (struct SPDY_Settings *container, | 1268 | SPDY_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 | */ |
1282 | int | 1285 | _MHD_EXTERN int |
1283 | SPDY_settings_lookup (const struct SPDY_Settings * container, | 1286 | SPDY_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 | */ |
1298 | int | 1301 | _MHD_EXTERN int |
1299 | SPDY_settings_iterate (const struct SPDY_Settings * container, | 1302 | SPDY_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 | */ |
1311 | void | 1314 | _MHD_EXTERN void |
1312 | SPDY_settings_destroy (struct SPDY_Settings * container); | 1315 | SPDY_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 | */ |
1333 | int | 1336 | _MHD_EXTERN int |
1334 | SPDY_send_settings (struct SPDY_Session * session, | 1337 | SPDY_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 | */ |
1355 | void | 1358 | _MHD_EXTERN void |
1356 | SPDY_destroy_request (struct SPDY_Request * request); | 1359 | SPDY_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 | */ |
1368 | int | 1371 | _MHD_EXTERN int |
1369 | SPDY_send_ping(struct SPDY_Session * session, | 1372 | SPDY_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 @@ | |||
1 | MHD_start_daemon | ||
2 | MHD_start_daemon_va | ||
3 | MHD_stop_daemon | ||
4 | MHD_get_fdset | ||
5 | MHD_get_timeout | ||
6 | MHD_run | ||
7 | MHD_run_from_select | ||
8 | MHD_get_connection_values | ||
9 | MHD_set_connection_value | ||
10 | MHD_lookup_connection_value | ||
11 | MHD_queue_response | ||
12 | MHD_create_response_from_callback | ||
13 | MHD_create_response_from_data | ||
14 | MHD_create_response_from_fd | ||
15 | MHD_create_response_from_fd_at_offset | ||
16 | MHD_create_response_from_buffer | ||
17 | MHD_destroy_response | ||
18 | MHD_add_response_header | ||
19 | MHD_add_response_footer | ||
20 | MHD_del_response_header | ||
21 | MHD_get_response_headers | ||
22 | MHD_get_response_header | ||
23 | MHD_create_post_processor | ||
24 | MHD_post_process | ||
25 | MHD_quiesce_daemon | ||
26 | MHD_destroy_post_processor | ||
27 | MHD_get_daemon_info | ||
28 | MHD_get_connection_info | ||
29 | MHD_set_panic_func | ||
30 | MHD_get_version | ||
31 | MHD_digest_auth_get_username | ||
32 | MHD_digest_auth_check | ||
33 | MHD_queue_auth_fail_response | ||
34 | MHD_basic_auth_get_username_password | ||
35 | MHD_queue_basic_auth_fail_response | ||
36 | MHD_add_connection | ||
37 | MHD_set_connection_option | ||
38 | MHD_suspend_connection | ||
39 | MHD_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 | ||
11 | EXTRA_DIST = EXPORT.sym | ||
12 | |||
13 | lib_LTLIBRARIES = \ | 12 | lib_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 |
24 | libmicrohttpd_la_LDFLAGS = \ | 23 | libmicrohttpd_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 | ||
29 | if USE_COVERAGE | 27 | if 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 | ||
29 | HIDDEN_SYMBOL | ||
30 | char * | 29 | char * |
31 | BASE64Decode(const char* src) | 30 | BASE64Decode(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 | ||
14 | HIDDEN_SYMBOL | ||
15 | char * | 14 | char * |
16 | BASE64Decode(const char* src); | 15 | BASE64Decode(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 | */ |
260 | void HIDDEN_SYMBOL | 260 | void |
261 | MHD_connection_close (struct MHD_Connection *connection, | 261 | MHD_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 | */ |
1930 | HIDDEN_SYMBOL | ||
1931 | int | 1930 | int |
1932 | MHD_connection_handle_read (struct MHD_Connection *connection) | 1931 | MHD_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 | */ |
1994 | HIDDEN_SYMBOL | ||
1995 | int | 1993 | int |
1996 | MHD_connection_handle_write (struct MHD_Connection *connection) | 1994 | MHD_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 | */ |
2198 | HIDDEN_SYMBOL | ||
2199 | int | 2196 | int |
2200 | MHD_connection_handle_idle (struct MHD_Connection *connection) | 2197 | MHD_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 | */ |
2636 | HIDDEN_SYMBOL | ||
2637 | int | 2633 | int |
2638 | MHD_connection_epoll_update_ (struct MHD_Connection *connection) | 2634 | MHD_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 | */ |
2684 | HIDDEN_SYMBOL | ||
2685 | void | 2680 | void |
2686 | MHD_set_http_callbacks_ (struct MHD_Connection *connection) | 2681 | MHD_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 | */ |
91 | void HIDDEN_SYMBOL | 91 | void |
92 | MHD_connection_close (struct MHD_Connection *connection, | 92 | MHD_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 | */ |
173 | HIDDEN_SYMBOL | ||
174 | void | 173 | void |
175 | MHD_set_https_callbacks (struct MHD_Connection *connection) | 174 | MHD_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 | */ |
124 | HIDDEN_SYMBOL | ||
125 | MHD_PanicCallback mhd_panic; | 124 | MHD_PanicCallback mhd_panic; |
126 | 125 | ||
127 | /** | 126 | /** |
128 | * Closure argument for "mhd_panic". | 127 | * Closure argument for "mhd_panic". |
129 | */ | 128 | */ |
130 | HIDDEN_SYMBOL | ||
131 | void *mhd_panic_cls; | 129 | void *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 | */ |
4161 | void ATTRIBUTE_CONSTRUCTOR | 4159 | FUNC_CONSTRUCTOR (MHD_init) () |
4162 | MHD_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 | ||
4180 | void ATTRIBUTE_DESTRUCTOR | 4177 | FUNC_DESTRUCTOR (MHD_fini) () |
4181 | MHD_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 | */ |
34 | HIDDEN_SYMBOL | ||
35 | const char * | 34 | const char * |
36 | MHD_state_to_string (enum MHD_CONNECTION_STATE state) | 35 | MHD_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 | */ |
94 | void HIDDEN_SYMBOL | 93 | void |
95 | MHD_DLOG (const struct MHD_Daemon *daemon, const char *format, ...) | 94 | MHD_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 | */ |
119 | HIDDEN_SYMBOL | ||
120 | size_t | 118 | size_t |
121 | MHD_http_unescape (void *cls, | 119 | MHD_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 | ||
170 | HIDDEN_SYMBOL | ||
171 | time_t | 168 | time_t |
172 | MHD_monotonic_time (void) | 169 | MHD_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 | */ |
192 | void HIDDEN_SYMBOL | 192 | void |
193 | MHD_DLOG (const struct MHD_Daemon *daemon, | 193 | MHD_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 | */ |
153 | void HIDDEN_SYMBOL | 153 | void |
154 | MD5Init(struct MD5Context *ctx) | 154 | MD5Init(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 | */ |
169 | void HIDDEN_SYMBOL | 169 | void |
170 | MD5Update(struct MD5Context *ctx, | 170 | MD5Update(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 | */ |
221 | void HIDDEN_SYMBOL | 221 | void |
222 | MD5Final (unsigned char digest[16], | 222 | MD5Final (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 | ||
40 | void HIDDEN_SYMBOL | 40 | void |
41 | MD5Init(struct MD5Context *ctx); | 41 | MD5Init(struct MD5Context *ctx); |
42 | 42 | ||
43 | void HIDDEN_SYMBOL | 43 | void |
44 | MD5Update(struct MD5Context *ctx, | 44 | MD5Update(struct MD5Context *ctx, |
45 | const void *buf, | 45 | const void *buf, |
46 | unsigned len); | 46 | unsigned len); |
47 | 47 | ||
48 | void HIDDEN_SYMBOL | 48 | void |
49 | MD5Final(unsigned char digest[MD5_DIGEST_SIZE], | 49 | MD5Final(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 | */ |
86 | HIDDEN_SYMBOL | ||
87 | struct MemoryPool * | 86 | struct MemoryPool * |
88 | MHD_pool_create (size_t max) | 87 | MHD_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 | */ |
130 | void HIDDEN_SYMBOL | 129 | void |
131 | MHD_pool_destroy (struct MemoryPool *pool) | 130 | MHD_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 | */ |
154 | HIDDEN_SYMBOL | ||
155 | void * | 153 | void * |
156 | MHD_pool_allocate (struct MemoryPool *pool, | 154 | MHD_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 | */ |
198 | HIDDEN_SYMBOL | ||
199 | void * | 196 | void * |
200 | MHD_pool_reallocate (struct MemoryPool *pool, | 197 | MHD_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 | */ |
253 | HIDDEN_SYMBOL | ||
254 | void * | 250 | void * |
255 | MHD_pool_reset (struct MemoryPool *pool, | 251 | MHD_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 | */ |
47 | HIDDEN_SYMBOL | ||
48 | struct MemoryPool * | 47 | struct MemoryPool * |
49 | MHD_pool_create (size_t max); | 48 | MHD_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 | */ |
57 | void HIDDEN_SYMBOL | 56 | void |
58 | MHD_pool_destroy (struct MemoryPool *pool); | 57 | MHD_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 | */ |
72 | HIDDEN_SYMBOL | ||
73 | void * | 71 | void * |
74 | MHD_pool_allocate (struct MemoryPool *pool, | 72 | MHD_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 | */ |
95 | HIDDEN_SYMBOL | ||
96 | void * | 93 | void * |
97 | MHD_pool_reallocate (struct MemoryPool *pool, | 94 | MHD_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 | */ |
112 | HIDDEN_SYMBOL | ||
113 | void * | 109 | void * |
114 | MHD_pool_reset (struct MemoryPool *pool, | 110 | MHD_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 | ||
152 | HIDDEN_SYMBOL | ||
153 | const char * | 152 | const char * |
154 | MHD_get_reason_phrase_for (unsigned int code) | 153 | MHD_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 | ||
472 | void HIDDEN_SYMBOL | 472 | void |
473 | MHD_increment_response_rc (struct MHD_Response *response) | 473 | MHD_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 | */ |
34 | void HIDDEN_SYMBOL | 34 | void |
35 | MHD_increment_response_rc (struct MHD_Response *response); | 35 | MHD_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 @@ | |||
1 | SPDY_start_daemon | ||
2 | SPDY_stop_daemon | ||
3 | SPDYF_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 | |||
5 | AM_CPPFLAGS = \ | 5 | 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/microspdy | 8 | -I$(top_srcdir)/src/microspdy \ |
9 | 9 | $(HIDDEN_VISIBILITY_CFLAGS) | |
10 | |||
11 | EXTRA_DIST = EXPORT.sym | ||
12 | 10 | ||
13 | 11 | ||
14 | lib_LTLIBRARIES = \ | 12 | lib_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 | ||
37 | void ATTRIBUTE_CONSTRUCTOR | 37 | FUNC_CONSTRUCTOR (constructor)() |
38 | constructor() | ||
39 | { | 38 | { |
40 | printf("\nTEST START -------------------------------------------------------\n"); | 39 | printf("\nTEST START -------------------------------------------------------\n"); |
41 | } | 40 | } |
42 | 41 | ||
43 | void ATTRIBUTE_DESTRUCTOR | 42 | FUNC_DESTRUCTOR (destructor)() |
44 | destructor() | ||
45 | { | 43 | { |
46 | printf("------------------------------------------------------- TEST END\n"); | 44 | printf("------------------------------------------------------- TEST END\n"); |
47 | } | 45 | } |