gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 02/14: Added _MHD_EXTERN to the all public functions def


From: gnunet
Subject: [libmicrohttpd] 02/14: Added _MHD_EXTERN to the all public functions definitions
Date: Tue, 19 Apr 2022 19:31:09 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 1c116801200b0cafac4f16f7f9ccecf69a23c1aa
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Apr 18 09:49:30 2022 +0300

    Added _MHD_EXTERN to the all public functions definitions
    
    Previously it was inconsistent, some function definitions used
    _MHD_EXTERN, while other definitions was used without _MHD_EXTERN.
---
 src/include/microhttpd.h       |  2 +-
 src/microhttpd/basicauth.c     |  4 ++--
 src/microhttpd/connection.c    | 16 ++++++++--------
 src/microhttpd/daemon.c        | 30 +++++++++++++++---------------
 src/microhttpd/digestauth.c    |  6 +++---
 src/microhttpd/internal.c      |  2 +-
 src/microhttpd/mhd_panic.c     |  2 +-
 src/microhttpd/postprocessor.c |  6 +++---
 src/microhttpd/reason_phrase.c |  4 ++--
 src/microhttpd/response.c      | 26 +++++++++++++-------------
 10 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 45e3524e..614107c4 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -96,7 +96,7 @@ extern "C"
  * they are parsed as decimal numbers.
  * Example: 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00097504
+#define MHD_VERSION 0x00097505
 
 /* If generic headers don't work on your platform, include headers
    which define 'va_list', 'size_t', 'ssize_t', 'intptr_t',
diff --git a/src/microhttpd/basicauth.c b/src/microhttpd/basicauth.c
index b6d88ba3..f3c5f5b9 100644
--- a/src/microhttpd/basicauth.c
+++ b/src/microhttpd/basicauth.c
@@ -43,7 +43,7 @@
  *      to the username if found
  * @ingroup authentication
  */
-char *
+_MHD_EXTERN char *
 MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
                                       char **password)
 {
@@ -120,7 +120,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection 
*connection,
  * @return #MHD_YES on success, #MHD_NO otherwise
  * @ingroup authentication
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
                                     const char *realm,
                                     struct MHD_Response *response)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 36e74900..792337a4 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -380,7 +380,7 @@ recv_param_adapter (struct MHD_Connection *connection,
  *         -1 if connection is NULL.
  * @ingroup request
  */
-int
+_MHD_EXTERN int
 MHD_get_connection_values (struct MHD_Connection *connection,
                            enum MHD_ValueKind kind,
                            MHD_KeyValueIterator iterator,
@@ -419,7 +419,7 @@ MHD_get_connection_values (struct MHD_Connection 
*connection,
  *         -1 if connection is NULL.
  * @ingroup request
  */
-int
+_MHD_EXTERN int
 MHD_get_connection_values_n (struct MHD_Connection *connection,
                              enum MHD_ValueKind kind,
                              MHD_KeyValueIteratorN iterator,
@@ -532,7 +532,7 @@ MHD_set_connection_value_n_nocheck_ (struct MHD_Connection 
*connection,
  *         #MHD_YES on success
  * @ingroup request
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_set_connection_value_n (struct MHD_Connection *connection,
                             enum MHD_ValueKind kind,
                             const char *key,
@@ -579,7 +579,7 @@ MHD_set_connection_value_n (struct MHD_Connection 
*connection,
  *         #MHD_YES on success
  * @ingroup request
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_set_connection_value (struct MHD_Connection *connection,
                           enum MHD_ValueKind kind,
                           const char *key,
@@ -608,7 +608,7 @@ MHD_set_connection_value (struct MHD_Connection *connection,
  * @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)
@@ -5004,7 +5004,7 @@ MHD_set_http_callbacks_ (struct MHD_Connection 
*connection)
  *         (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,
                          ...)
@@ -5068,7 +5068,7 @@ MHD_get_connection_info (struct MHD_Connection 
*connection,
  * @return #MHD_YES on success, #MHD_NO if setting the option failed
  * @ingroup specialized
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_set_connection_option (struct MHD_Connection *connection,
                            enum MHD_CONNECTION_OPTION option,
                            ...)
@@ -5175,7 +5175,7 @@ MHD_set_connection_option (struct MHD_Connection 
*connection,
  * @ingroup response
  * @sa #MHD_AccessHandlerCallback
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_queue_response (struct MHD_Connection *connection,
                     unsigned int status_code,
                     struct MHD_Response *response)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 1cca1b30..fa4715e9 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -691,7 +691,7 @@ MHD_TLS_init (struct MHD_Daemon *daemon)
  *         fit fd_set.
  * @ingroup event
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_get_fdset (struct MHD_Daemon *daemon,
                fd_set *read_fd_set,
                fd_set *write_fd_set,
@@ -1099,7 +1099,7 @@ internal_get_fdset2 (struct MHD_Daemon *daemon,
  *         fit fd_set.
  * @ingroup event
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_get_fdset2 (struct MHD_Daemon *daemon,
                 fd_set *read_fd_set,
                 fd_set *write_fd_set,
@@ -3171,7 +3171,7 @@ internal_suspend_connection_ (struct MHD_Connection 
*connection)
  *
  * @sa #MHD_AccessHandlerCallback
  */
-void
+_MHD_EXTERN void
 MHD_suspend_connection (struct MHD_Connection *connection)
 {
   struct MHD_Daemon *const daemon = connection->daemon;
@@ -3214,7 +3214,7 @@ MHD_suspend_connection (struct MHD_Connection *connection)
  *
  * @param connection the connection to resume
  */
-void
+_MHD_EXTERN void
 MHD_resume_connection (struct MHD_Connection *connection)
 {
   struct MHD_Daemon *daemon = connection->daemon;
@@ -3411,7 +3411,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
  *        set to indicate further details about the error.
  * @ingroup specialized
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_add_connection (struct MHD_Daemon *daemon,
                     MHD_socket client_socket,
                     const struct sockaddr *addr,
@@ -3893,7 +3893,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon)
  *         not used and no data processing is pending.
  * @ingroup event
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_get_timeout (struct MHD_Daemon *daemon,
                  MHD_UNSIGNED_LONG_LONG *timeout)
 {
@@ -4125,7 +4125,7 @@ internal_run_from_select (struct MHD_Daemon *daemon,
  * @return #MHD_NO on serious errors, #MHD_YES on success
  * @ingroup event
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_run_from_select (struct MHD_Daemon *daemon,
                      const fd_set *read_fd_set,
                      const fd_set *write_fd_set,
@@ -5205,7 +5205,7 @@ MHD_epoll (struct MHD_Daemon *daemon,
  *         options for this call.
  * @ingroup event
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_run (struct MHD_Daemon *daemon)
 {
   if ( (daemon->shutdown) ||
@@ -5449,7 +5449,7 @@ unescape_wrapper (void *cls,
  * @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,
@@ -5494,7 +5494,7 @@ MHD_start_daemon (unsigned int flags,
  *         the daemon was already not listening anymore
  * @ingroup specialized
  */
-MHD_socket
+_MHD_EXTERN MHD_socket
 MHD_quiesce_daemon (struct MHD_Daemon *daemon)
 {
 #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
@@ -6382,7 +6382,7 @@ setup_epoll_to_listen (struct MHD_Daemon *daemon)
  * @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,
@@ -7651,7 +7651,7 @@ close_all_connections (struct MHD_Daemon *daemon)
  * @param daemon daemon to stop
  * @ingroup event
  */
-void
+_MHD_EXTERN void
 MHD_stop_daemon (struct MHD_Daemon *daemon)
 {
   MHD_socket fd;
@@ -7833,7 +7833,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
  *         (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,
                      ...)
@@ -7889,7 +7889,7 @@ MHD_get_daemon_info (struct MHD_Daemon *daemon,
  * @return static version string, e.g. "0.9.9"
  * @ingroup specialized
  */
-const char *
+_MHD_EXTERN const char *
 MHD_get_version (void)
 {
 #ifdef PACKAGE_VERSION
@@ -7923,7 +7923,7 @@ MHD_get_version (void)
  * feature is not supported or feature is unknown.
  * @ingroup specialized
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_is_feature_supported (enum MHD_FEATURE feature)
 {
   switch (feature)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 8526ae40..8b9abd18 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -614,7 +614,7 @@ check_nonce_nc (struct MHD_Connection *connection,
  * @warning Returned value must be freed by #MHD_free().
  * @ingroup authentication
  */
-char *
+_MHD_EXTERN char *
 MHD_digest_auth_get_username (struct MHD_Connection *connection)
 {
   char user[MAX_USERNAME_LENGTH];
@@ -1342,7 +1342,7 @@ MHD_digest_auth_check_digest (struct MHD_Connection 
*connection,
  * @note Available since #MHD_VERSION 0x00096200
  * @ingroup authentication
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
                                const char *realm,
                                const char *opaque,
@@ -1470,7 +1470,7 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection 
*connection,
  * @ingroup authentication
  * @deprecated use MHD_queue_auth_fail_response2()
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_queue_auth_fail_response (struct MHD_Connection *connection,
                               const char *realm,
                               const char *opaque,
diff --git a/src/microhttpd/internal.c b/src/microhttpd/internal.c
index 055deb32..5453329c 100644
--- a/src/microhttpd/internal.c
+++ b/src/microhttpd/internal.c
@@ -142,7 +142,7 @@ MHD_unescape_plus (char *arg)
  * @return length of the resulting val (`strlen(val)` may be
  *  shorter afterwards due to elimination of escape sequences)
  */
-size_t
+_MHD_EXTERN size_t
 MHD_http_unescape (char *val)
 {
   char *rpos = val;
diff --git a/src/microhttpd/mhd_panic.c b/src/microhttpd/mhd_panic.c
index 1efba20d..ae2db248 100644
--- a/src/microhttpd/mhd_panic.c
+++ b/src/microhttpd/mhd_panic.c
@@ -88,7 +88,7 @@ mhd_panic_std (void *cls,
  * @param cls passed to @a cb
  * @ingroup logging
  */
-void
+_MHD_EXTERN void
 MHD_set_panic_func (MHD_PanicCallback cb,
                     void *cls)
 {
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index 0d6a00ab..d32ecc22 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -252,7 +252,7 @@ struct MHD_PostProcessor
 };
 
 
-struct MHD_PostProcessor *
+_MHD_EXTERN struct MHD_PostProcessor *
 MHD_create_post_processor (struct MHD_Connection *connection,
                            size_t buffer_size,
                            MHD_PostDataIterator iter,
@@ -1455,7 +1455,7 @@ END:
 }
 
 
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_post_process (struct MHD_PostProcessor *pp,
                   const char *post_data,
                   size_t post_data_len)
@@ -1483,7 +1483,7 @@ MHD_post_process (struct MHD_PostProcessor *pp,
 }
 
 
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_destroy_post_processor (struct MHD_PostProcessor *pp)
 {
   enum MHD_Result ret;
diff --git a/src/microhttpd/reason_phrase.c b/src/microhttpd/reason_phrase.c
index 9a07b2ad..5ccc44b4 100644
--- a/src/microhttpd/reason_phrase.c
+++ b/src/microhttpd/reason_phrase.c
@@ -174,7 +174,7 @@ static const struct MHD_Reason_Block reasons[] = {
 };
 
 
-const char *
+_MHD_EXTERN const char *
 MHD_get_reason_phrase_for (unsigned int code)
 {
   if ( (code >= 100) &&
@@ -185,7 +185,7 @@ MHD_get_reason_phrase_for (unsigned int code)
 }
 
 
-size_t
+_MHD_EXTERN size_t
 MHD_get_reason_phrase_len_for (unsigned int code)
 {
   if ( (code >= 100) &&
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index ab04061c..05131fd5 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -489,7 +489,7 @@ del_response_header_connection (struct MHD_Response 
*response,
  *         or out of memory
  * @ingroup response
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_add_response_header (struct MHD_Response *response,
                          const char *header,
                          const char *content)
@@ -584,7 +584,7 @@ MHD_add_response_header (struct MHD_Response *response,
  * @return #MHD_NO on error (i.e. invalid footer or content format).
  * @ingroup response
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_add_response_footer (struct MHD_Response *response,
                          const char *footer,
                          const char *content)
@@ -610,7 +610,7 @@ MHD_add_response_footer (struct MHD_Response *response,
  * @return #MHD_NO on error (no such header known)
  * @ingroup response
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_del_response_header (struct MHD_Response *response,
                          const char *header,
                          const char *content)
@@ -692,7 +692,7 @@ MHD_del_response_header (struct MHD_Response *response,
  * @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)
@@ -724,7 +724,7 @@ MHD_get_response_headers (struct MHD_Response *response,
  * @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)
 {
@@ -856,7 +856,7 @@ MHD_check_response_header_token_ci (const struct 
MHD_Response *response,
  * @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,
@@ -897,7 +897,7 @@ MHD_create_response_from_callback (uint64_t size,
  * @param ... #MHD_RO_END terminated list of options
  * @return #MHD_YES on success, #MHD_NO on error
  */
-enum MHD_Result
+_MHD_EXTERN enum MHD_Result
 MHD_set_response_options (struct MHD_Response *response,
                           enum MHD_ResponseFlags flags,
                           ...)
@@ -1111,7 +1111,7 @@ free_callback (void *cls)
  * @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)
@@ -1231,7 +1231,7 @@ MHD_create_response_from_pipe (int fd)
  * @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)
 {
@@ -1290,7 +1290,7 @@ MHD_create_response_from_fd64 (uint64_t size,
  * @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,
@@ -1348,7 +1348,7 @@ MHD_create_response_from_data (size_t size,
  * @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)
@@ -1613,7 +1613,7 @@ MHD_create_response_from_iovec (const struct MHD_IoVec 
*iov,
  * @note Available since #MHD_VERSION 0x00097503
  * @ingroup response
  */
-struct MHD_Response *
+_MHD_EXTERN struct MHD_Response *
 MHD_create_response_empty (enum MHD_ResponseFlags flags)
 {
   struct MHD_Response *r;
@@ -2044,7 +2044,7 @@ MHD_create_response_for_upgrade (MHD_UpgradeHandler 
upgrade_handler,
  * @param response response to destroy
  * @ingroup response
  */
-void
+_MHD_EXTERN void
 MHD_destroy_response (struct MHD_Response *response)
 {
   struct MHD_HTTP_Res_Header *pos;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]