[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32036 - in libmicrohttpd: . src/include src/microhttpd src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32036 - in libmicrohttpd: . src/include src/microhttpd src/microspdy src/testspdy |
Date: |
Mon, 27 Jan 2014 07:59:02 +0100 |
Author: LRN
Date: 2014-01-27 07:59:02 +0100 (Mon, 27 Jan 2014)
New Revision: 32036
Removed:
libmicrohttpd/src/microhttpd/EXPORT.sym
libmicrohttpd/src/microspdy/EXPORT.sym
Modified:
libmicrohttpd/configure.ac
libmicrohttpd/src/include/microhttpd.h
libmicrohttpd/src/include/microspdy.h
libmicrohttpd/src/include/platform.h
libmicrohttpd/src/microhttpd/Makefile.am
libmicrohttpd/src/microhttpd/base64.c
libmicrohttpd/src/microhttpd/base64.h
libmicrohttpd/src/microhttpd/connection.c
libmicrohttpd/src/microhttpd/connection.h
libmicrohttpd/src/microhttpd/connection_https.c
libmicrohttpd/src/microhttpd/daemon.c
libmicrohttpd/src/microhttpd/internal.c
libmicrohttpd/src/microhttpd/internal.h
libmicrohttpd/src/microhttpd/md5.c
libmicrohttpd/src/microhttpd/md5.h
libmicrohttpd/src/microhttpd/memorypool.c
libmicrohttpd/src/microhttpd/memorypool.h
libmicrohttpd/src/microhttpd/reason_phrase.c
libmicrohttpd/src/microhttpd/response.c
libmicrohttpd/src/microhttpd/response.h
libmicrohttpd/src/microspdy/Makefile.am
libmicrohttpd/src/testspdy/common.c
Log:
Add decl check for _stati64 (required for newer plibc)
Remove redundant -no-undefined (it's part of mandatory MHD_LIB_LDFLAGS
now)
Remove --export-all-symbols for W32 (visibility is used instead)
Add -fvisibility=hidden configure check (shamelessly borrowed from GTK)
Remove unused -export-symbols-regex check
Define _MHD_EXTERN to "extern" if it's undefined (this is what clients
get)
Mark all public functions with _MHD_EXTERN
Remove HIDDEN_SYMBOL definition
Don't mark hidden functions with HIDDEN_SYMBOL (everything that is not
explicitly public is hidden by default now)
Change constructor macros a bit to apply _MHD_EXTERN to them cleanly
Use HIDDEN_VISIBILITY_CFLAGS when compiling libraries
Remove EXPORT.sym files, don't mention them in EXTRA_DIST, don't use
them to define a list of exported functions
Remove redundant -no-undefined, make sure only the one that gets into
Makefiles directly remains, remove -Wl prefix from it
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2014-01-26 23:20:23 UTC (rev 32035)
+++ libmicrohttpd/configure.ac 2014-01-27 06:59:02 UTC (rev 32036)
@@ -83,6 +83,9 @@
#include <netinet/in.h>
])
+# Needed for plibc.h
+AC_CHECK_DECLS([_stati64, _wstat32i64])
+
AC_CHECK_PROG(HAVE_CURL_BINARY,[curl],true,false)
AM_CONDITIONAL(HAVE_CURL_BINARY,$HAVE_CURL_BINARY)
AC_CHECK_PROG(HAVE_MAKEINFO_BINARY,[makeinfo],true,false)
@@ -163,13 +166,13 @@
AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
AM_CONDITIONAL(HAVE_GNU_LD, false)
AM_CONDITIONAL(HAVE_W32, false)
- LDFLAGS="$LDFLAGS -Wl,no-undefined"
+ LDFLAGS="$LDFLAGS"
;;
*mingw*)
AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
AM_CONDITIONAL(HAVE_W32, true)
- LDFLAGS="$LDFLAGS -Wl,-no-undefined -Wl,--export-all-symbols -lws2_32"
+ LDFLAGS="$LDFLAGS -lws2_32"
AM_CONDITIONAL(HAVE_GNU_LD, true)
# check if PlibC is available
CHECK_PLIBC
@@ -294,6 +297,35 @@
# TCP_NOPUSH
AC_CHECK_DECLS([TCP_NOPUSH], [], [], [[#include <netinet/tcp.h>]])
+HIDDEN_VISIBILITY_CFLAGS=""
+case "$host" in
+ *-*-mingw*)
+ dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport)
+ AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default")))
__declspec(dllexport) extern],
+ [defines how to decorate public symbols while building])
+ HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
+ ;;
+ *)
+ dnl on other compilers, check if we can do -fvisibility=hidden
+ SAVED_CFLAGS="${CFLAGS}"
+ CFLAGS="-fvisibility=hidden"
+ AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
+ AC_TRY_COMPILE([], [int main (void) { return 0; }],
+ AC_MSG_RESULT(yes)
+ enable_fvisibility_hidden=yes,
+ AC_MSG_RESULT(no)
+ enable_fvisibility_hidden=no)
+ CFLAGS="${SAVED_CFLAGS}"
+
+ AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [
+ AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) extern],
+ [defines how to decorate public symbols while building])
+ HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
+ ])
+ ;;
+esac
+AC_SUBST(HIDDEN_VISIBILITY_CFLAGS)
+
# libcurl (required for testing)
SAVE_LIBS=$LIBS
@@ -524,19 +556,8 @@
-MHD_LIB_LDFLAGS="-export-dynamic -Wl,-no-undefined"
+MHD_LIB_LDFLAGS="-export-dynamic -no-undefined"
-# TODO insert a proper check here
-AC_CACHE_CHECK([whether -export-symbols-regex works],
- gn_cv_export_symbols_regex_works,
- [
- case "$host_os" in
- mingw*) gn_cv_export_symbols_regex_works=no;;
- *) gn_cv_export_symbols_regex_works=yes;;
- esac
- ])
-
-
# gcov compilation
AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
AC_ARG_ENABLE([coverage],
Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/include/microhttpd.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -156,6 +156,10 @@
#define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1)
#endif
+#ifndef _MHD_EXTERN
+#define _MHD_EXTERN extern
+#endif
+
/**
* Not all architectures and `printf()`'s support the `long long` type.
* This gives the ability to replace `long long` with just a `long`,
@@ -1287,7 +1291,7 @@
* @return NULL on error, handle to daemon on success
* @ingroup event
*/
-struct MHD_Daemon *
+_MHD_EXTERN struct MHD_Daemon *
MHD_start_daemon_va (unsigned int flags,
uint16_t port,
MHD_AcceptPolicyCallback apc, void *apc_cls,
@@ -1311,7 +1315,7 @@
* @return NULL on error, handle to daemon on success
* @ingroup event
*/
-struct MHD_Daemon *
+_MHD_EXTERN struct MHD_Daemon *
MHD_start_daemon (unsigned int flags,
uint16_t port,
MHD_AcceptPolicyCallback apc, void *apc_cls,
@@ -1338,7 +1342,7 @@
* already not listening anymore
* @ingroup specialized
*/
-int
+_MHD_EXTERN int
MHD_quiesce_daemon (struct MHD_Daemon *daemon);
@@ -1348,7 +1352,7 @@
* @param daemon daemon to stop
* @ingroup event
*/
-void
+_MHD_EXTERN void
MHD_stop_daemon (struct MHD_Daemon *daemon);
@@ -1381,7 +1385,7 @@
* set to indicate further details about the error.
* @ingroup specialized
*/
-int
+_MHD_EXTERN int
MHD_add_connection (struct MHD_Daemon *daemon,
int client_socket,
const struct sockaddr *addr,
@@ -1402,7 +1406,7 @@
* options for this call.
* @ingroup event
*/
-int
+_MHD_EXTERN int
MHD_get_fdset (struct MHD_Daemon *daemon,
fd_set *read_fd_set,
fd_set *write_fd_set,
@@ -1424,7 +1428,7 @@
* necessiate the use of a timeout right now).
* @ingroup event
*/
-int
+_MHD_EXTERN int
MHD_get_timeout (struct MHD_Daemon *daemon,
MHD_UNSIGNED_LONG_LONG *timeout);
@@ -1448,7 +1452,7 @@
* options for this call.
* @ingroup event
*/
-int
+_MHD_EXTERN int
MHD_run (struct MHD_Daemon *daemon);
@@ -1471,7 +1475,7 @@
* @return #MHD_NO on serious errors, #MHD_YES on success
* @ingroup event
*/
-int
+_MHD_EXTERN int
MHD_run_from_select (struct MHD_Daemon *daemon,
const fd_set *read_fd_set,
const fd_set *write_fd_set,
@@ -1493,7 +1497,7 @@
* @return number of entries iterated over
* @ingroup request
*/
-int
+_MHD_EXTERN int
MHD_get_connection_values (struct MHD_Connection *connection,
enum MHD_ValueKind kind,
MHD_KeyValueIterator iterator, void *iterator_cls);
@@ -1524,7 +1528,7 @@
* #MHD_YES on success
* @ingroup request
*/
-int
+_MHD_EXTERN int
MHD_set_connection_value (struct MHD_Connection *connection,
enum MHD_ValueKind kind,
const char *key,
@@ -1547,7 +1551,7 @@
* @param cls passed to @a cb
* @ingroup logging
*/
-void
+_MHD_EXTERN void
MHD_set_panic_func (MHD_PanicCallback cb, void *cls);
@@ -1561,7 +1565,7 @@
* @return NULL if no such item was found
* @ingroup request
*/
-const char *
+_MHD_EXTERN const char *
MHD_lookup_connection_value (struct MHD_Connection *connection,
enum MHD_ValueKind kind,
const char *key);
@@ -1578,7 +1582,7 @@
* #MHD_YES on success or if message has been queued
* @ingroup response
*/
-int
+_MHD_EXTERN int
MHD_queue_response (struct MHD_Connection *connection,
unsigned int status_code,
struct MHD_Response *response);
@@ -1611,7 +1615,7 @@
*
* @param connection the connection to suspend
*/
-void
+_MHD_EXTERN void
MHD_suspend_connection (struct MHD_Connection *connection);
@@ -1623,7 +1627,7 @@
*
* @param connection the connection to resume
*/
-void
+_MHD_EXTERN void
MHD_resume_connection (struct MHD_Connection *connection);
@@ -1645,7 +1649,7 @@
* @return NULL on error (i.e. invalid arguments, out of memory)
* @ingroup response
*/
-struct MHD_Response *
+_MHD_EXTERN struct MHD_Response *
MHD_create_response_from_callback (uint64_t size,
size_t block_size,
MHD_ContentReaderCallback crc, void *crc_cls,
@@ -1666,7 +1670,7 @@
* @deprecated use #MHD_create_response_from_buffer instead
* @ingroup response
*/
-struct MHD_Response *
+_MHD_EXTERN struct MHD_Response *
MHD_create_response_from_data (size_t size,
void *data,
int must_free,
@@ -1719,7 +1723,7 @@
* @return NULL on error (i.e. invalid arguments, out of memory)
* @ingroup response
*/
-struct MHD_Response *
+_MHD_EXTERN struct MHD_Response *
MHD_create_response_from_buffer (size_t size,
void *buffer,
enum MHD_ResponseMemoryMode mode);
@@ -1736,7 +1740,7 @@
* @return NULL on error (i.e. invalid arguments, out of memory)
* @ingroup response
*/
-struct MHD_Response *
+_MHD_EXTERN struct MHD_Response *
MHD_create_response_from_fd (size_t size,
int fd);
@@ -1757,7 +1761,7 @@
* @return NULL on error (i.e. invalid arguments, out of memory)
* @ingroup response
*/
-struct MHD_Response *
+_MHD_EXTERN struct MHD_Response *
MHD_create_response_from_fd_at_offset (size_t size,
int fd,
off_t offset);
@@ -1906,7 +1910,7 @@
* @param response response to destroy
* @ingroup response
*/
-void
+_MHD_EXTERN void
MHD_destroy_response (struct MHD_Response *response);
@@ -1920,7 +1924,7 @@
* or out of memory
* @ingroup response
*/
-int
+_MHD_EXTERN int
MHD_add_response_header (struct MHD_Response *response,
const char *header,
const char *content);
@@ -1935,7 +1939,7 @@
* @return #MHD_NO on error (i.e. invalid footer or content format).
* @ingroup response
*/
-int
+_MHD_EXTERN int
MHD_add_response_footer (struct MHD_Response *response,
const char *footer,
const char *content);
@@ -1950,7 +1954,7 @@
* @return #MHD_NO on error (no such header known)
* @ingroup response
*/
-int
+_MHD_EXTERN int
MHD_del_response_header (struct MHD_Response *response,
const char *header,
const char *content);
@@ -1966,7 +1970,7 @@
* @return number of entries iterated over
* @ingroup response
*/
-int
+_MHD_EXTERN int
MHD_get_response_headers (struct MHD_Response *response,
MHD_KeyValueIterator iterator, void *iterator_cls);
@@ -1979,7 +1983,7 @@
* @return NULL if header does not exist
* @ingroup response
*/
-const char *
+_MHD_EXTERN const char *
MHD_get_response_header (struct MHD_Response *response,
const char *key);
@@ -2011,7 +2015,7 @@
* otherwise a PP handle
* @ingroup request
*/
-struct MHD_PostProcessor *
+_MHD_EXTERN struct MHD_PostProcessor *
MHD_create_post_processor (struct MHD_Connection *connection,
size_t buffer_size,
MHD_PostDataIterator iter, void *iter_cls);
@@ -2030,7 +2034,7 @@
* (out-of-memory, iterator aborted, parse error)
* @ingroup request
*/
-int
+_MHD_EXTERN int
MHD_post_process (struct MHD_PostProcessor *pp,
const char *post_data, size_t post_data_len);
@@ -2045,7 +2049,7 @@
* value of this function
* @ingroup request
*/
-int
+_MHD_EXTERN int
MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
@@ -2068,7 +2072,7 @@
* to the username if found
* @ingroup authentication
*/
-char *
+_MHD_EXTERN char *
MHD_digest_auth_get_username (struct MHD_Connection *connection);
@@ -2085,7 +2089,7 @@
* #MHD_INVALID_NONCE if nonce is invalid
* @ingroup authentication
*/
-int
+_MHD_EXTERN int
MHD_digest_auth_check (struct MHD_Connection *connection,
const char *realm,
const char *username,
@@ -2107,7 +2111,7 @@
* @return #MHD_YES on success, #MHD_NO otherwise
* @ingroup authentication
*/
-int
+_MHD_EXTERN int
MHD_queue_auth_fail_response (struct MHD_Connection *connection,
const char *realm,
const char *opaque,
@@ -2124,7 +2128,7 @@
* to the username if found
* @ingroup authentication
*/
-char *
+_MHD_EXTERN char *
MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
char** password);
@@ -2141,7 +2145,7 @@
* @return #MHD_YES on success, #MHD_NO otherwise
* @ingroup authentication
*/
-int
+_MHD_EXTERN int
MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
const char *realm,
struct MHD_Response *response);
@@ -2159,7 +2163,7 @@
* (or if the @a info_type is unknown)
* @ingroup specialized
*/
-const union MHD_ConnectionInfo *
+_MHD_EXTERN const union MHD_ConnectionInfo *
MHD_get_connection_info (struct MHD_Connection *connection,
enum MHD_ConnectionInfoType info_type,
...);
@@ -2191,7 +2195,7 @@
* @return #MHD_YES on success, #MHD_NO if setting the option failed
* @ingroup specialized
*/
-int
+_MHD_EXTERN int
MHD_set_connection_option (struct MHD_Connection *connection,
enum MHD_CONNECTION_OPTION option,
...);
@@ -2232,7 +2236,7 @@
* (or if the @a info_type is unknown)
* @ingroup specialized
*/
-const union MHD_DaemonInfo *
+_MHD_EXTERN const union MHD_DaemonInfo *
MHD_get_daemon_info (struct MHD_Daemon *daemon,
enum MHD_DaemonInfoType info_type,
...);
@@ -2244,7 +2248,7 @@
* @return static version string, e.g. "0.9.9"
* @ingroup specialized
*/
-const char*
+_MHD_EXTERN const char*
MHD_get_version (void);
Modified: libmicrohttpd/src/include/microspdy.h
===================================================================
--- libmicrohttpd/src/include/microspdy.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/include/microspdy.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -83,6 +83,9 @@
#endif
#endif
+#ifndef _MHD_EXTERN
+#define _MHD_EXTERN extern
+#endif
/**
* return code for "YES".
@@ -814,7 +817,7 @@
* functions can be used now;
* SPDY_NO on error
*/
-int
+_MHD_EXTERN int
(SPDY_init) (enum SPDY_IO_SUBSYSTEM io_subsystem, ...);
#define SPDY_init() SPDY_init(SPDY_IO_SUBSYSTEM_OPENSSL)
@@ -824,7 +827,7 @@
* using the library. It frees and cleans up resources allocated in
* SPDY_init. Currently the function does not do anything.
*/
-void
+_MHD_EXTERN void
SPDY_deinit ();
@@ -843,7 +846,7 @@
* @param cb new error handler
* @param cls passed to error handler
*/
-void
+_MHD_EXTERN void
SPDY_set_panic_func (SPDY_PanicCallback cb,
void *cls);
@@ -869,7 +872,7 @@
* terminated with SPDY_DAEMON_OPTION_END).
* @return NULL on error, handle to daemon on success
*/
-struct SPDY_Daemon *
+_MHD_EXTERN struct SPDY_Daemon *
SPDY_start_daemon (uint16_t port,
const char * certfile,
const char * keyfile,
@@ -887,7 +890,7 @@
*
* @param daemon to stop
*/
-void
+_MHD_EXTERN void
SPDY_stop_daemon (struct SPDY_Daemon *daemon);
@@ -913,7 +916,7 @@
* @param except_fd_set except set
* @return largest FD added to any of the sets
*/
-int
+_MHD_EXTERN int
SPDY_get_fdset (struct SPDY_Daemon * daemon,
fd_set * read_fd_set,
fd_set * write_fd_set,
@@ -931,7 +934,7 @@
* SPDY_NO if no connections exist that
* would necessiate the use of a timeout right now
*/
-int
+_MHD_EXTERN int
SPDY_get_timeout (struct SPDY_Daemon * daemon,
unsigned long long * timeout);
@@ -942,7 +945,7 @@
*
* @param daemon to run
*/
-void
+_MHD_EXTERN void
SPDY_run (struct SPDY_Daemon *daemon);
@@ -958,7 +961,7 @@
*
* @param session handler to be closed
*/
-void
+_MHD_EXTERN void
SPDY_close_session(struct SPDY_Session * session);
@@ -969,7 +972,7 @@
* @param session handler
* @param cls any data pointed by a pointer to be accessible later
*/
-void
+_MHD_EXTERN void
SPDY_set_cls_to_session(struct SPDY_Session * session,
void * cls);
@@ -981,7 +984,7 @@
* @return same pointer added by SPDY_set_cls_to_session() or
* NULL when nothing was associated
*/
-void *
+_MHD_EXTERN void *
SPDY_get_cls_from_session(struct SPDY_Session * session);
@@ -992,7 +995,7 @@
* @param addr out parameter; pointing to remote address
* @return length of the address structure
*/
-socklen_t
+_MHD_EXTERN socklen_t
SPDY_get_remote_addr(struct SPDY_Session * session,
struct sockaddr ** addr);
@@ -1007,7 +1010,7 @@
*
* @return hendler to the new empty structure or NULL on error
*/
-struct SPDY_NameValue *
+_MHD_EXTERN struct SPDY_NameValue *
SPDY_name_value_create ();
@@ -1021,7 +1024,7 @@
* @param value the value itself. Null-terminated string.
* @return SPDY_NO on error or SPDY_YES on success
*/
-int
+_MHD_EXTERN int
SPDY_name_value_add (struct SPDY_NameValue * container,
const char * name,
const char * value);
@@ -1036,7 +1039,7 @@
* @return NULL if no such item was found, or an array containing the
* values
*/
-const char * const *
+_MHD_EXTERN const char * const *
SPDY_name_value_lookup (struct SPDY_NameValue *container,
const char *name,
int * num_values);
@@ -1051,7 +1054,7 @@
* @param iterator_cls extra argument to iterator
* @return number of entries iterated over
*/
-int
+_MHD_EXTERN int
SPDY_name_value_iterate (struct SPDY_NameValue *container,
SPDY_NameValueIterator iterator,
void *iterator_cls);
@@ -1063,7 +1066,7 @@
* functions.
*
*/
-void
+_MHD_EXTERN void
SPDY_name_value_destroy (struct SPDY_NameValue * container);
@@ -1077,7 +1080,7 @@
* @param request for which the session is wanted
* @return session handler for the request
*/
-struct SPDY_Session *
+_MHD_EXTERN struct SPDY_Session *
SPDY_get_session_for_request(const struct SPDY_Request * request);
@@ -1088,7 +1091,7 @@
* @param request with which to associate a pointer
* @param cls any data pointed by a pointer to be accessible later
*/
-void
+_MHD_EXTERN void
SPDY_set_cls_to_request(struct SPDY_Request * request,
void * cls);
@@ -1101,7 +1104,7 @@
* @return same pointer added by SPDY_set_cls_to_request() or
* NULL when nothing was associated
*/
-void *
+_MHD_EXTERN void *
SPDY_get_cls_from_request(struct SPDY_Request * request);
@@ -1132,7 +1135,7 @@
* headers
* @return NULL on error, handle to response object on success
*/
-struct SPDY_Response *
+_MHD_EXTERN struct SPDY_Response *
SPDY_build_response(int status,
const char * statustext,
const char * version,
@@ -1172,7 +1175,7 @@
* SPDY_MAX_SUPPORTED_FRAME_SIZE instead.
* @return NULL on error, handle to response object on success
*/
-struct SPDY_Response *
+_MHD_EXTERN struct SPDY_Response *
SPDY_build_response_with_callback(int status,
const char * statustext,
const char * version,
@@ -1210,7 +1213,7 @@
* @param rrcb_cls extra argument to rcb
* @return SPDY_NO on error or SPDY_YES on success
*/
-int
+_MHD_EXTERN int
SPDY_queue_response (struct SPDY_Request * request,
struct SPDY_Response *response,
bool closestream,
@@ -1230,7 +1233,7 @@
*
* @param response to destroy
*/
-void
+_MHD_EXTERN void
SPDY_destroy_response (struct SPDY_Response *response);
@@ -1244,7 +1247,7 @@
*
* @return hendler to the new empty structure or NULL on error
*/
-const struct SPDY_Settings *
+_MHD_EXTERN const struct SPDY_Settings *
SPDY_settings_create ();
@@ -1261,7 +1264,7 @@
* @return SPDY_NO on error
* or SPDY_YES if a new setting was added
*/
-int
+_MHD_EXTERN int
SPDY_settings_add (struct SPDY_Settings *container,
enum SPDY_SETTINGS id,
enum SPDY_FLAG_SETTINGS
flags,
@@ -1279,7 +1282,7 @@
* @return SPDY_NO if the setting is not into the structure
* or SPDY_YES if it is into it
*/
-int
+_MHD_EXTERN int
SPDY_settings_lookup (const struct SPDY_Settings * container,
enum
SPDY_SETTINGS id,
enum
SPDY_FLAG_SETTINGS * flags,
@@ -1295,7 +1298,7 @@
* @param iterator_cls extra argument to iterator
* @return number of entries iterated over
*/
-int
+_MHD_EXTERN int
SPDY_settings_iterate (const struct SPDY_Settings * container,
SPDY_SettingsIterator iterator,
void *
iterator_cls);
@@ -1308,7 +1311,7 @@
*
* @param container structure which to detroy
*/
-void
+_MHD_EXTERN void
SPDY_settings_destroy (struct SPDY_Settings * container);
@@ -1330,7 +1333,7 @@
* @return SPDY_NO on error or SPDY_YES on
* success
*/
-int
+_MHD_EXTERN int
SPDY_send_settings (struct SPDY_Session * session,
struct SPDY_Settings * settings,
enum SPDY_FLAG_SETTINGS_FRAME flags,
@@ -1352,7 +1355,7 @@
*
* @param request to destroy
*/
-void
+_MHD_EXTERN void
SPDY_destroy_request (struct SPDY_Request * request);
@@ -1365,7 +1368,7 @@
* @param rttcb_cls extra argument to rttcb
* @return SPDY_NO on error or SPDY_YES on success
*/
-int
+_MHD_EXTERN int
SPDY_send_ping(struct SPDY_Session * session,
SPDY_PingCallback rttcb,
void * rttcb_cls);
Modified: libmicrohttpd/src/include/platform.h
===================================================================
--- libmicrohttpd/src/include/platform.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/include/platform.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -111,14 +111,4 @@
#include <plibc.h>
-#define GCC_VERSION (__GNUC__ * 10000 \
- + __GNUC_MINOR__ * 100 \
- + __GNUC_PATCHLEVEL__)
-#if GCC_VERSION > 40000
-#define HIDDEN_SYMBOL __attribute__ ((visibility ("hidden")))
-#else
-#define HIDDEN_SYMBOL
#endif
-
-
-#endif
Deleted: libmicrohttpd/src/microhttpd/EXPORT.sym
===================================================================
--- libmicrohttpd/src/microhttpd/EXPORT.sym 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/EXPORT.sym 2014-01-27 06:59:02 UTC (rev
32036)
@@ -1,39 +0,0 @@
-MHD_start_daemon
-MHD_start_daemon_va
-MHD_stop_daemon
-MHD_get_fdset
-MHD_get_timeout
-MHD_run
-MHD_run_from_select
-MHD_get_connection_values
-MHD_set_connection_value
-MHD_lookup_connection_value
-MHD_queue_response
-MHD_create_response_from_callback
-MHD_create_response_from_data
-MHD_create_response_from_fd
-MHD_create_response_from_fd_at_offset
-MHD_create_response_from_buffer
-MHD_destroy_response
-MHD_add_response_header
-MHD_add_response_footer
-MHD_del_response_header
-MHD_get_response_headers
-MHD_get_response_header
-MHD_create_post_processor
-MHD_post_process
-MHD_quiesce_daemon
-MHD_destroy_post_processor
-MHD_get_daemon_info
-MHD_get_connection_info
-MHD_set_panic_func
-MHD_get_version
-MHD_digest_auth_get_username
-MHD_digest_auth_check
-MHD_queue_auth_fail_response
-MHD_basic_auth_get_username_password
-MHD_queue_basic_auth_fail_response
-MHD_add_connection
-MHD_set_connection_option
-MHD_suspend_connection
-MHD_resume_connection
Modified: libmicrohttpd/src/microhttpd/Makefile.am
===================================================================
--- libmicrohttpd/src/microhttpd/Makefile.am 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/Makefile.am 2014-01-27 06:59:02 UTC (rev
32036)
@@ -6,10 +6,9 @@
$(PLIBC_INCLUDE) \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/daemon \
+ $(HIDDEN_VISIBILITY_CFLAGS) \
@LIBGCRYPT_CFLAGS@
-EXTRA_DIST = EXPORT.sym
-
lib_LTLIBRARIES = \
libmicrohttpd.la
@@ -23,7 +22,6 @@
response.c response.h
libmicrohttpd_la_LDFLAGS = \
$(MHD_LIB_LDFLAGS) \
- -export-symbols $(top_srcdir)/src/microhttpd/EXPORT.sym \
-version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
if USE_COVERAGE
Modified: libmicrohttpd/src/microhttpd/base64.c
===================================================================
--- libmicrohttpd/src/microhttpd/base64.c 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/base64.c 2014-01-27 06:59:02 UTC (rev
32036)
@@ -26,7 +26,6 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-HIDDEN_SYMBOL
char *
BASE64Decode(const char* src)
{
Modified: libmicrohttpd/src/microhttpd/base64.h
===================================================================
--- libmicrohttpd/src/microhttpd/base64.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/base64.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -11,7 +11,6 @@
#include "platform.h"
-HIDDEN_SYMBOL
char *
BASE64Decode(const char* src);
Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/connection.c 2014-01-27 06:59:02 UTC (rev
32036)
@@ -257,7 +257,7 @@
* @param connection connection to close
* @param termination_code termination reason to give
*/
-void HIDDEN_SYMBOL
+void
MHD_connection_close (struct MHD_Connection *connection,
enum MHD_RequestTerminationCode termination_code)
{
@@ -1927,7 +1927,6 @@
* @return always #MHD_YES (we should continue to process the
* connection)
*/
-HIDDEN_SYMBOL
int
MHD_connection_handle_read (struct MHD_Connection *connection)
{
@@ -1991,7 +1990,6 @@
* @return always #MHD_YES (we should continue to process the
* connection)
*/
-HIDDEN_SYMBOL
int
MHD_connection_handle_write (struct MHD_Connection *connection)
{
@@ -2195,7 +2193,6 @@
* @return #MHD_YES if we should continue to process the
* connection (not dead yet), #MHD_NO if it died
*/
-HIDDEN_SYMBOL
int
MHD_connection_handle_idle (struct MHD_Connection *connection)
{
@@ -2633,7 +2630,6 @@
* @return #MHD_YES if we should continue to process the
* connection (not dead yet), #MHD_NO if it died
*/
-HIDDEN_SYMBOL
int
MHD_connection_epoll_update_ (struct MHD_Connection *connection)
{
@@ -2681,7 +2677,6 @@
*
* @param connection connection to initialize
*/
-HIDDEN_SYMBOL
void
MHD_set_http_callbacks_ (struct MHD_Connection *connection)
{
Modified: libmicrohttpd/src/microhttpd/connection.h
===================================================================
--- libmicrohttpd/src/microhttpd/connection.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/connection.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -88,7 +88,7 @@
* @param connection connection to close
* @param termination_code termination reason to give
*/
-void HIDDEN_SYMBOL
+void
MHD_connection_close (struct MHD_Connection *connection,
enum MHD_RequestTerminationCode termination_code);
Modified: libmicrohttpd/src/microhttpd/connection_https.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection_https.c 2014-01-26 23:20:23 UTC
(rev 32035)
+++ libmicrohttpd/src/microhttpd/connection_https.c 2014-01-27 06:59:02 UTC
(rev 32036)
@@ -170,7 +170,6 @@
*
* @param connection which callbacks should be modified
*/
-HIDDEN_SYMBOL
void
MHD_set_https_callbacks (struct MHD_Connection *connection)
{
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/daemon.c 2014-01-27 06:59:02 UTC (rev
32036)
@@ -121,13 +121,11 @@
/**
* Handler for fatal errors.
*/
-HIDDEN_SYMBOL
MHD_PanicCallback mhd_panic;
/**
* Closure argument for "mhd_panic".
*/
-HIDDEN_SYMBOL
void *mhd_panic_cls;
@@ -4141,11 +4139,11 @@
#ifdef __GNUC__
-#define ATTRIBUTE_CONSTRUCTOR __attribute__ ((constructor))
-#define ATTRIBUTE_DESTRUCTOR __attribute__ ((destructor))
+#define FUNC_CONSTRUCTOR(f) static void __attribute__ ((constructor)) f
+#define FUNC_DESTRUCTOR(f) static void __attribute__ ((destructor)) f
#else // !__GNUC__
-#define ATTRIBUTE_CONSTRUCTOR
-#define ATTRIBUTE_DESTRUCTOR
+#define FUNC_CONSTRUCTOR(f) _MHD_EXTERN void f
+#define FUNC_DESTRUCTOR(f) _MHD_EXTERN void f
#endif // __GNUC__
#if HTTPS_SUPPORT
@@ -4158,8 +4156,7 @@
/**
* Initialize do setup work.
*/
-void ATTRIBUTE_CONSTRUCTOR
-MHD_init ()
+FUNC_CONSTRUCTOR (MHD_init) ()
{
mhd_panic = &mhd_panic_std;
mhd_panic_cls = NULL;
@@ -4177,8 +4174,7 @@
}
-void ATTRIBUTE_DESTRUCTOR
-MHD_fini ()
+FUNC_DESTRUCTOR (MHD_fini) ()
{
#if HTTPS_SUPPORT
gnutls_global_deinit ();
Modified: libmicrohttpd/src/microhttpd/internal.c
===================================================================
--- libmicrohttpd/src/microhttpd/internal.c 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/internal.c 2014-01-27 06:59:02 UTC (rev
32036)
@@ -31,7 +31,6 @@
/**
* State to string dictionary.
*/
-HIDDEN_SYMBOL
const char *
MHD_state_to_string (enum MHD_CONNECTION_STATE state)
{
@@ -91,7 +90,7 @@
* fprintf-like helper function for logging debug
* messages.
*/
-void HIDDEN_SYMBOL
+void
MHD_DLOG (const struct MHD_Daemon *daemon, const char *format, ...)
{
va_list va;
@@ -116,7 +115,6 @@
* @return length of the resulting val (strlen(val) maybe
* shorter afterwards due to elimination of escape sequences)
*/
-HIDDEN_SYMBOL
size_t
MHD_http_unescape (void *cls,
struct MHD_Connection *connection,
@@ -167,7 +165,6 @@
}
-HIDDEN_SYMBOL
time_t
MHD_monotonic_time (void)
{
Modified: libmicrohttpd/src/microhttpd/internal.h
===================================================================
--- libmicrohttpd/src/microhttpd/internal.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/internal.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -189,7 +189,7 @@
* fprintf-like helper function for logging debug
* messages.
*/
-void HIDDEN_SYMBOL
+void
MHD_DLOG (const struct MHD_Daemon *daemon,
const char *format, ...);
#endif
Modified: libmicrohttpd/src/microhttpd/md5.c
===================================================================
--- libmicrohttpd/src/microhttpd/md5.c 2014-01-26 23:20:23 UTC (rev 32035)
+++ libmicrohttpd/src/microhttpd/md5.c 2014-01-27 06:59:02 UTC (rev 32036)
@@ -150,7 +150,7 @@
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
* initialization constants.
*/
-void HIDDEN_SYMBOL
+void
MD5Init(struct MD5Context *ctx)
{
ctx->buf[0] = 0x67452301;
@@ -166,7 +166,7 @@
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
-void HIDDEN_SYMBOL
+void
MD5Update(struct MD5Context *ctx,
const void *data,
unsigned len)
@@ -218,7 +218,7 @@
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
-void HIDDEN_SYMBOL
+void
MD5Final (unsigned char digest[16],
struct MD5Context *ctx)
{
Modified: libmicrohttpd/src/microhttpd/md5.h
===================================================================
--- libmicrohttpd/src/microhttpd/md5.h 2014-01-26 23:20:23 UTC (rev 32035)
+++ libmicrohttpd/src/microhttpd/md5.h 2014-01-27 06:59:02 UTC (rev 32036)
@@ -37,15 +37,15 @@
};
-void HIDDEN_SYMBOL
+void
MD5Init(struct MD5Context *ctx);
-void HIDDEN_SYMBOL
+void
MD5Update(struct MD5Context *ctx,
const void *buf,
unsigned len);
-void HIDDEN_SYMBOL
+void
MD5Final(unsigned char digest[MD5_DIGEST_SIZE],
struct MD5Context *ctx);
Modified: libmicrohttpd/src/microhttpd/memorypool.c
===================================================================
--- libmicrohttpd/src/microhttpd/memorypool.c 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/memorypool.c 2014-01-27 06:59:02 UTC (rev
32036)
@@ -83,7 +83,6 @@
* @param max maximum size of the pool
* @return NULL on error
*/
-HIDDEN_SYMBOL
struct MemoryPool *
MHD_pool_create (size_t max)
{
@@ -127,7 +126,7 @@
*
* @param pool memory pool to destroy
*/
-void HIDDEN_SYMBOL
+void
MHD_pool_destroy (struct MemoryPool *pool)
{
if (pool == NULL)
@@ -151,7 +150,6 @@
* @return NULL if the pool cannot support size more
* bytes
*/
-HIDDEN_SYMBOL
void *
MHD_pool_allocate (struct MemoryPool *pool,
size_t size, int from_end)
@@ -195,7 +193,6 @@
* NULL if the pool cannot support @a new_size
* bytes (old continues to be valid for @a old_size)
*/
-HIDDEN_SYMBOL
void *
MHD_pool_reallocate (struct MemoryPool *pool,
void *old,
@@ -250,7 +247,6 @@
* @param size how many bytes need to be kept at this address
* @return addr new address of @a keep (if it had to change)
*/
-HIDDEN_SYMBOL
void *
MHD_pool_reset (struct MemoryPool *pool,
void *keep,
Modified: libmicrohttpd/src/microhttpd/memorypool.h
===================================================================
--- libmicrohttpd/src/microhttpd/memorypool.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/memorypool.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -44,7 +44,6 @@
* @param max maximum size of the pool
* @return NULL on error
*/
-HIDDEN_SYMBOL
struct MemoryPool *
MHD_pool_create (size_t max);
@@ -54,7 +53,7 @@
*
* @param pool memory pool to destroy
*/
-void HIDDEN_SYMBOL
+void
MHD_pool_destroy (struct MemoryPool *pool);
@@ -69,7 +68,6 @@
* @return NULL if the pool cannot support size more
* bytes
*/
-HIDDEN_SYMBOL
void *
MHD_pool_allocate (struct MemoryPool *pool,
size_t size, int from_end);
@@ -92,7 +90,6 @@
* NULL if the pool cannot support new_size
* bytes (old continues to be valid for old_size)
*/
-HIDDEN_SYMBOL
void *
MHD_pool_reallocate (struct MemoryPool *pool,
void *old,
@@ -109,7 +106,6 @@
* @param size how many bytes need to be kept at this address
* @return addr new address of "keep" (if it had to change)
*/
-HIDDEN_SYMBOL
void *
MHD_pool_reset (struct MemoryPool *pool,
void *keep,
Modified: libmicrohttpd/src/microhttpd/reason_phrase.c
===================================================================
--- libmicrohttpd/src/microhttpd/reason_phrase.c 2014-01-26 23:20:23 UTC
(rev 32035)
+++ libmicrohttpd/src/microhttpd/reason_phrase.c 2014-01-27 06:59:02 UTC
(rev 32036)
@@ -149,7 +149,6 @@
};
-HIDDEN_SYMBOL
const char *
MHD_get_reason_phrase_for (unsigned int code)
{
Modified: libmicrohttpd/src/microhttpd/response.c
===================================================================
--- libmicrohttpd/src/microhttpd/response.c 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/response.c 2014-01-27 06:59:02 UTC (rev
32036)
@@ -469,7 +469,7 @@
}
-void HIDDEN_SYMBOL
+void
MHD_increment_response_rc (struct MHD_Response *response)
{
pthread_mutex_lock (&response->mutex);
Modified: libmicrohttpd/src/microhttpd/response.h
===================================================================
--- libmicrohttpd/src/microhttpd/response.h 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microhttpd/response.h 2014-01-27 06:59:02 UTC (rev
32036)
@@ -31,7 +31,7 @@
* Increment response RC. Should this be part of the
* public API?
*/
-void HIDDEN_SYMBOL
+void
MHD_increment_response_rc (struct MHD_Response *response);
Deleted: libmicrohttpd/src/microspdy/EXPORT.sym
===================================================================
--- libmicrohttpd/src/microspdy/EXPORT.sym 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microspdy/EXPORT.sym 2014-01-27 06:59:02 UTC (rev
32036)
@@ -1,3 +0,0 @@
-SPDY_start_daemon
-SPDY_stop_daemon
-SPDYF_monotonic_time
Modified: libmicrohttpd/src/microspdy/Makefile.am
===================================================================
--- libmicrohttpd/src/microspdy/Makefile.am 2014-01-26 23:20:23 UTC (rev
32035)
+++ libmicrohttpd/src/microspdy/Makefile.am 2014-01-27 06:59:02 UTC (rev
32036)
@@ -5,12 +5,10 @@
AM_CPPFLAGS = \
$(PLIBC_INCLUDE) \
-I$(top_srcdir)/src/include \
- -I$(top_srcdir)/src/microspdy
+ -I$(top_srcdir)/src/microspdy \
+ $(HIDDEN_VISIBILITY_CFLAGS)
-EXTRA_DIST = EXPORT.sym
-
-
lib_LTLIBRARIES = \
libmicrospdy.la
Modified: libmicrohttpd/src/testspdy/common.c
===================================================================
--- libmicrohttpd/src/testspdy/common.c 2014-01-26 23:20:23 UTC (rev 32035)
+++ libmicrohttpd/src/testspdy/common.c 2014-01-27 06:59:02 UTC (rev 32036)
@@ -27,21 +27,19 @@
#include <sys/time.h>
#ifdef __GNUC__
-#define ATTRIBUTE_CONSTRUCTOR __attribute__ ((constructor))
-#define ATTRIBUTE_DESTRUCTOR __attribute__ ((destructor))
+#define FUNC_CONSTRUCTOR(f) static void __attribute__ ((constructor)) f
+#define FUNC_DESTRUCTOR(f) static void __attribute__ ((destructor)) f
#else // !__GNUC__
-#define ATTRIBUTE_CONSTRUCTOR
-#define ATTRIBUTE_DESTRUCTOR
+#define FUNC_CONSTRUCTOR(f) _MHD_EXTERN void f
+#define FUNC_DESTRUCTOR(f) _MHD_EXTERN void f
#endif // __GNUC__
-void ATTRIBUTE_CONSTRUCTOR
-constructor()
+FUNC_CONSTRUCTOR (constructor)()
{
printf("\nTEST START
-------------------------------------------------------\n");
}
-void ATTRIBUTE_DESTRUCTOR
-destructor()
+FUNC_DESTRUCTOR (destructor)()
{
printf("------------------------------------------------------- TEST
END\n");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32036 - in libmicrohttpd: . src/include src/microhttpd src/microspdy src/testspdy,
gnunet <=