commit 6938522dcd5c1257b54787cc8a55d2b963c7f4bc
parent 22a11420e889cc305d79b492ba8c09303d06fa93
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Fri, 5 Sep 2025 11:18:43 +0200
Replace static inline macros with updated internal macros style
Diffstat:
16 files changed, 84 insertions(+), 84 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -1417,9 +1417,9 @@ int main(void)
]
)
AS_IF([test "x$ac_cv_c_inline" != "xno" && test "x${mhd_cv_cc_kwd_forceinline}" != "xnone"],
- [AC_DEFINE_UNQUOTED([MHD_static_inline_],[static $mhd_cv_cc_kwd_forceinline],[Define to prefix which will be used with MHD static inline functions.])]
+ [AC_DEFINE_UNQUOTED([mhd_static_inline],[static $mhd_cv_cc_kwd_forceinline],[Define to prefix which will be used with MHD internal static inline functions.])]
,
- [AC_DEFINE([MHD_static_inline_],[static inline],[Define to prefix which will be used with MHD static inline functions.])]
+ [AC_DEFINE([mhd_static_inline],[static inline],[Define to prefix which will be used with MHD static inline functions.])]
)
SAVE_ac_c_werror_flag="$ac_c_werror_flag"
diff --git a/src/incl_priv/mhd_sys_options.h b/src/incl_priv/mhd_sys_options.h
@@ -559,9 +559,9 @@
# define MHD_FAVOR_FAST_CODE 1
#endif /* !MHD_FAVOR_FAST_CODE && !MHD_FAVOR_SMALL_CODE */
-#if defined(MHD_FAVOR_SMALL_CODE) && defined(MHD_static_inline_)
-# undef MHD_static_inline_
-# define MHD_static_inline_ static inline /* give compiler more freedom */
+#if defined(MHD_FAVOR_SMALL_CODE) && defined(mhd_static_inline)
+# undef mhd_static_inline
+# define mhd_static_inline static inline /* give compiler more freedom */
#endif
#ifndef MHD_ASAN_ACTIVE
diff --git a/src/mhd2/auth_digest.c b/src/mhd2/auth_digest.c
@@ -876,7 +876,7 @@ get_rq_auth_digest_params (struct MHD_Request *restrict req)
* @param params the Digest Authorization parameters
* @return the type of username
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ enum MHD_DigestAuthUsernameType
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ enum MHD_DigestAuthUsernameType
get_rq_uname_type (const struct mhd_AuthDigesReqParams *params)
{
if (NULL != params->username.value.cstr)
@@ -908,7 +908,7 @@ get_rq_uname_type (const struct mhd_AuthDigesReqParams *params)
* @return the total size required for 'username' and
* 'userhash_bin' is userhash is used
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ size_t
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ size_t
get_rq_unames_size (const struct mhd_AuthDigesReqParams *params,
enum MHD_DigestAuthUsernameType uname_type)
{
@@ -1334,7 +1334,7 @@ mhd_request_get_auth_digest_info (
* @param algo the MHD_DigestAuthAlgo value
* @return the base hash calculation algorithm
*/
-MHD_static_inline_ enum MHD_DigestBaseAlgo
+mhd_static_inline enum MHD_DigestBaseAlgo
get_base_digest_algo (enum MHD_DigestAuthAlgo algo)
{
unsigned int base_algo;
@@ -1356,7 +1356,7 @@ get_base_digest_algo (enum MHD_DigestAuthAlgo algo)
* @return the size of the digest (in bytes) or zero if the input value is not
* supported/valid
*/
-MHD_static_inline_ size_t
+mhd_static_inline size_t
digest_get_hash_size (enum MHD_DigestAuthAlgo algo)
{
#ifdef MHD_SUPPORT_MD5
@@ -1462,7 +1462,7 @@ struct DigestAlgorithm
* @param da the digest calculation structure to identify
* @return the size of the digest.
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ unsigned int
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ unsigned int
digest_get_size (struct DigestAlgorithm *da)
{
mhd_assert (! da->uninitialised);
@@ -1501,7 +1501,7 @@ digest_get_size (struct DigestAlgorithm *da)
* To make any real digest calculation, #digest_setup_and_init() must be called.
* @param da the digest calculation
*/
-MHD_static_inline_ void
+mhd_static_inline void
digest_setup_zero (struct DigestAlgorithm *da)
{
#ifndef NDEBUG
@@ -1523,7 +1523,7 @@ digest_setup_zero (struct DigestAlgorithm *da)
* #digest_setup_and_init() or by #digest_setup_zero().
* @param da the digest calculation
*/
-MHD_static_inline_ void
+mhd_static_inline void
digest_deinit (struct DigestAlgorithm *da)
{
mhd_assert (! da->uninitialised);
@@ -1566,7 +1566,7 @@ digest_deinit (struct DigestAlgorithm *da)
* @return boolean 'true' if successfully set-up,
* false otherwise.
*/
-MHD_static_inline_ MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_ bool
+mhd_static_inline MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_ bool
digest_init_one_time (struct DigestAlgorithm *da,
enum MHD_DigestBaseAlgo algo)
{
@@ -1636,7 +1636,7 @@ digest_init_one_time (struct DigestAlgorithm *da,
* @param size the size of the @a data in bytes
* @param data the data to process
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_IN_SIZE_ (3, 2) void
digest_update (struct DigestAlgorithm *restrict da,
size_t size,
@@ -1690,7 +1690,7 @@ digest_update (struct DigestAlgorithm *restrict da,
* @param da the digest calculation
* @param str the zero-terminated string to process
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_CSTR_ (2) void
digest_update_str (struct DigestAlgorithm *restrict da,
const char *restrict str)
@@ -1706,7 +1706,7 @@ digest_update_str (struct DigestAlgorithm *restrict da,
* @param da the digest calculation
* @param buf the sized buffer with the data
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_CSTR_ (2) void
digest_update_cbuf (struct DigestAlgorithm *restrict da,
const struct mhd_BufferConst *restrict buf)
@@ -1722,7 +1722,7 @@ digest_update_cbuf (struct DigestAlgorithm *restrict da,
* @param da the digest calculation
* @param buf the sized buffer with the data
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_CSTR_ (2) void
digest_update_buf (struct DigestAlgorithm *restrict da,
const struct mhd_Buffer *restrict buf)
@@ -1737,7 +1737,7 @@ digest_update_buf (struct DigestAlgorithm *restrict da,
* Feed digest calculation with single colon ':' character.
* @param da the digest calculation
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ void
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ void
digest_update_with_colon (struct DigestAlgorithm *da)
{
static const uint8_t colon = (uint8_t) ':';
@@ -1753,7 +1753,7 @@ digest_update_with_colon (struct DigestAlgorithm *da)
* @param[out] digest the pointer to the buffer to put calculated digest,
* must be at least digest_get_size(da) bytes large
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_OUT_ (2) void
digest_calc_hash (struct DigestAlgorithm *da,
uint8_t *digest)
@@ -1833,7 +1833,7 @@ digest_calc_hash (struct DigestAlgorithm *da,
*
* @param da the structure to reset
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ void
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ void
digest_reset (struct DigestAlgorithm *da)
{
mhd_assert (! da->uninitialised);
@@ -1921,7 +1921,7 @@ digest_reset (struct DigestAlgorithm *da)
* @return 'true' if external error occurs,
* 'false' otherwise
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ bool
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ bool
digest_has_error (struct DigestAlgorithm *da)
{
mhd_assert (! da->uninitialised);
@@ -1982,7 +1982,7 @@ digest_has_error (struct DigestAlgorithm *da)
* @param[out] ha1_bin the output buffer, must have at least
* #digest_get_size(da) bytes available
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_IN_SIZE_ (2, 3) MHD_FN_PAR_IN_SIZE_ (4, 5)
MHD_FN_PAR_CSTR_ (6) MHD_FN_PAR_OUT_ (7) void
calc_userdigest (struct DigestAlgorithm *restrict da,
@@ -2050,7 +2050,7 @@ MHD_digest_auth_calc_userdigest (enum MHD_DigestAuthAlgo algo,
* @param[out] digest_bin the output buffer, must have at least
* #MHD_digest_get_hash_size(algo) bytes available
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_IN_SIZE_ (3, 2) MHD_FN_PAR_IN_SIZE_ (5, 4) MHD_FN_PAR_OUT_ (6) void
calc_userhash (struct DigestAlgorithm *da,
const size_t username_len,
@@ -2140,7 +2140,7 @@ MHD_digest_auth_calc_userhash_hex (
* @return 'true' if timestamp was extracted,
* 'false' if nonce does not have valid timestamp.
*/
-MHD_static_inline_ uint_fast32_t
+mhd_static_inline uint_fast32_t
get_nonce_timestamp (const uint8_t nonce[mhd_AUTH_DIGEST_NONCE_BIN_SIZE])
{
return (uint_fast32_t)
@@ -2647,7 +2647,7 @@ get_unquoted_param_copy (const struct mhd_RqDAuthParam *param,
* @return true is parameter is equal to the given string,
* false otherwise
*/
-MHD_static_inline_ MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_IN_SIZE_ (3,2) bool
is_param_equal (const struct mhd_RqDAuthParam *restrict param,
const size_t str_len,
@@ -2673,7 +2673,7 @@ is_param_equal (const struct mhd_RqDAuthParam *restrict param,
* @return true is parameter is caseless equal to the given string,
* false otherwise
*/
-MHD_static_inline_ MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_IN_SIZE_ (3,2) bool
is_param_equal_caseless (const struct mhd_RqDAuthParam *restrict param,
const size_t str_len,
diff --git a/src/mhd2/conn_mark_ready.h b/src/mhd2/conn_mark_ready.h
@@ -62,7 +62,7 @@
* @param c the connection to mark
* @param d the daemon for the connection
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ void
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ void
mhd_conn_mark_ready (struct MHD_Connection *restrict c,
struct MHD_Daemon *restrict d)
{
@@ -90,7 +90,7 @@ mhd_conn_mark_ready (struct MHD_Connection *restrict c,
* @param c the connection to mark
* @param d the daemon for the connection
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ void
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ void
mhd_conn_mark_unready (struct MHD_Connection *restrict c,
struct MHD_Daemon *restrict d)
{
@@ -119,7 +119,7 @@ mhd_conn_mark_unready (struct MHD_Connection *restrict c,
* @param force_ready ignore network states and mark the connection as "ready"
* @param d the daemon for the connection
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ void
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ void
mhd_conn_mark_ready_update3 (struct MHD_Connection *restrict c,
bool force_ready,
struct MHD_Daemon *restrict d)
@@ -143,7 +143,7 @@ mhd_conn_mark_ready_update3 (struct MHD_Connection *restrict c,
* @param c the connection to update
* @param d the daemon for the connection
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ void
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ void
mhd_conn_mark_ready_update2 (struct MHD_Connection *restrict c,
struct MHD_Daemon *restrict d)
{
@@ -158,7 +158,7 @@ mhd_conn_mark_ready_update2 (struct MHD_Connection *restrict c,
* from the connection.
* @param c the connection to update
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ void
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ void
mhd_conn_mark_ready_update (struct MHD_Connection *restrict c)
{
mhd_conn_mark_ready_update2 (c,
diff --git a/src/mhd2/daemon_logger.h b/src/mhd2/daemon_logger.h
@@ -137,7 +137,7 @@ mhd_logger (struct MHD_Daemon *daemon,
*
* Always use with #mhd_LOG_FMT() for the format string.
*/
-MHD_static_inline_ void
+mhd_static_inline void
mhd_LOG_PRINT (struct MHD_Daemon *daemon,
enum MHD_StatusCode sc,
const char *fm,
diff --git a/src/mhd2/events_process.c b/src/mhd2/events_process.c
@@ -455,7 +455,7 @@ daemon_accept_new_conns (struct MHD_Daemon *restrict d)
* @return 'true' if connection should not be used for HTTP communication
* 'false' if connection should be processed as HTTP
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ bool
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ bool
is_conn_excluded_from_http_comm (struct MHD_Connection *restrict c)
{
#ifdef MHD_SUPPORT_UPGRADE
@@ -796,7 +796,7 @@ ext_events_update_registrations (struct MHD_Daemon *restrict d)
* set to non-zero in case of WinSock)
* @param d the daemon object
*/
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_INOUT_ (2)
MHD_FN_PAR_INOUT_ (3) void
fd_set_wrap (MHD_Socket fd,
diff --git a/src/mhd2/extr_events_funcs.h b/src/mhd2/extr_events_funcs.h
@@ -82,7 +82,7 @@ mhd_log_extr_event_dereg_failed (struct MHD_Daemon *restrict d);
* @param app_cntx_old the previous application FD context
* @param ecb_cntx the MHD FD context
*/
-MHD_static_inline_
+mhd_static_inline
MHD_FN_PAR_NONNULL_ (1) void *
mhd_daemon_extr_event_reg (struct MHD_Daemon *d,
MHD_Socket fd,
diff --git a/src/mhd2/mhd_atomic_counter.h b/src/mhd2/mhd_atomic_counter.h
@@ -216,7 +216,7 @@ struct mhd_AtomicCounter
* @param pcnt the pointer to the counter to increment
* @return the counter value before the increment
*/
-MHD_static_inline_ mhd_ATOMIC_COUNTER_TYPE
+mhd_static_inline mhd_ATOMIC_COUNTER_TYPE
mhd_atomic_counter_get_inc (struct mhd_AtomicCounter *pcnt)
{
mhd_ATOMIC_COUNTER_TYPE ret;
@@ -235,7 +235,7 @@ mhd_atomic_counter_get_inc (struct mhd_AtomicCounter *pcnt)
* @param pcnt the pointer to the counter to decrement
* @return the counter value before the decrement
*/
-MHD_static_inline_ mhd_ATOMIC_COUNTER_TYPE
+mhd_static_inline mhd_ATOMIC_COUNTER_TYPE
mhd_atomic_counter_get_dec (struct mhd_AtomicCounter *pcnt)
{
mhd_ATOMIC_COUNTER_TYPE ret;
@@ -412,7 +412,7 @@ mhd_atomic_counter_get (struct mhd_AtomicCounter *pcnt);
* @param pcnt the pointer to the counter to increment
* @return the counter value before the increment
*/
-MHD_static_inline_ mhd_ATOMIC_COUNTER_TYPE
+mhd_static_inline mhd_ATOMIC_COUNTER_TYPE
mhd_atomic_counter_get_inc (struct mhd_AtomicCounter *pcnt)
{
mhd_assert (mhd_ATOMIC_COUNTER_MAX != (pcnt->count));
@@ -427,7 +427,7 @@ mhd_atomic_counter_get_inc (struct mhd_AtomicCounter *pcnt)
* @param pcnt the pointer to the counter to decrement
* @return the counter value before the decrement
*/
-MHD_static_inline_ mhd_ATOMIC_COUNTER_TYPE
+mhd_static_inline mhd_ATOMIC_COUNTER_TYPE
mhd_atomic_counter_get_dec (struct mhd_AtomicCounter *pcnt)
{
mhd_assert (0 != ((pcnt)->count));
diff --git a/src/mhd2/mhd_bithelpers.h b/src/mhd2/mhd_bithelpers.h
@@ -91,7 +91,7 @@ mhd_DATA_TRUNCATION_RUNTIME_CHECK_DISABLE
# define mhd_BYTES_SWAP32(value32) \
((uint32_t)__builtin_bswap32 ((uint32_t) value32))
#else /* ! mhd_HAS_BUILTIN(__builtin_bswap32) */
-MHD_static_inline_ uint32_t
+mhd_static_inline uint32_t
mhd_BYTES_SWAP32 (uint32_t value32)
{
uint32_t ret;
@@ -120,7 +120,7 @@ mhd_BYTES_SWAP32 (uint32_t value32)
# define mhd_BYTES_SWAP64(value64) \
((uint64_t) __builtin_bswap64 ((uint64_t) value64))
#else /* ! mhd_HAS_BUILTIN(__builtin_bswap64) */
-MHD_static_inline_ uint64_t
+mhd_static_inline uint64_t
mhd_BYTES_SWAP64(uint64_t value64)
{
uint64_t ret;
@@ -166,7 +166,7 @@ mhd_BYTES_SWAP64(uint64_t value64)
* put 64-bit value64 to addr in little-endian mode.
*/
/* Slow version that works with unaligned addr and with any byte order */
-MHD_static_inline_ void
+mhd_static_inline void
mhd_PUT_64BIT_LE_SLOW(void *addr, uint64_t value64)
{
uint8_t *const dst = (uint8_t *) addr;
@@ -210,7 +210,7 @@ mhd_PUT_64BIT_LE_SLOW(void *addr, uint64_t value64)
* put 32-bit value32 to addr in little-endian mode.
*/
/* Slow version that works with unaligned addr and with any byte order */
-MHD_static_inline_ void
+mhd_static_inline void
mhd_PUT_32BIT_LE_SLOW(void *addr, uint32_t value32)
{
uint8_t *const dst = (uint8_t *) addr;
@@ -251,7 +251,7 @@ mhd_PUT_32BIT_LE_SLOW(void *addr, uint32_t value32)
* and return it in native-endian mode.
*/
/* Slow version that works with unaligned addr and with any byte order */
-MHD_static_inline_ uint32_t
+mhd_static_inline uint32_t
mhd_GET_32BIT_LE_SLOW(const void *addr)
{
const uint8_t *const src = (const uint8_t *) addr;
@@ -280,7 +280,7 @@ mhd_GET_32BIT_LE_SLOW(const void *addr)
# define mhd_GET_32BIT_LE_UNALIGN(addr) mhd_GET_32BIT_LE (addr)
#else /* ! mhd_GET_32BIT_LE_ALLOW_UNALIGNED */
/* Get value safely from an unaligned address */
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ uint32_t
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ uint32_t
mhd_GET_32BIT_LE_UNALIGN (const void *addr)
{
uint32_t aligned_src;
@@ -295,7 +295,7 @@ mhd_GET_32BIT_LE_UNALIGN (const void *addr)
* and return it in native-endian mode.
*/
/* Slow version that works with unaligned addr and with any byte order */
-MHD_static_inline_ uint64_t
+mhd_static_inline uint64_t
mhd_GET_64BIT_LE_SLOW (const void *addr)
{
const uint8_t *const src = (const uint8_t *) addr;
@@ -325,7 +325,7 @@ mhd_GET_64BIT_LE_SLOW (const void *addr)
#ifdef mhd_GET_64BIT_LE_ALLOW_UNALIGNED
# define mhd_GET_64BIT_LE_UNALIGN(addr) mhd_GET_64BIT_LE (addr)
#else /* !mhd_GET_64BIT_LE_ALLOW_UNALIGNED */
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_ uint64_t
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_ uint64_t
mhd_GET_64BIT_LE_UNALIGN (const void *addr)
{
uint64_t aligned_src;
@@ -345,7 +345,7 @@ mhd_GET_64BIT_LE_UNALIGN (const void *addr)
# define mhd_GET_UINTFAST32_LE(addr) \
mhd_GET_64BIT_LE ((addr))
#else /* future-proof */
-MHD_static_inline_ uint_fast32_t
+mhd_static_inline uint_fast32_t
mhd_GET_UINTFAST32_LE(const void *addr)
{
const uint8_t *const src = (const uint8_t *) addr;
@@ -363,7 +363,7 @@ mhd_GET_UINTFAST32_LE(const void *addr)
* in big-endian mode.
*/
/* Slow version that works with unaligned addr and with any byte order */
-MHD_static_inline_ void
+mhd_static_inline void
mhd_PUT_64BIT_BE_SLOW(void *addr, uint64_t value64)
{
uint8_t *const dst = (uint8_t *) addr;
@@ -413,7 +413,7 @@ mhd_PUT_64BIT_BE_SLOW(void *addr, uint64_t value64)
mhd_BYTES_SWAP64 (*(const uint64_t*) (addr))
#else /* mhd_BYTE_ORDER != mhd_LITTLE_ENDIAN */
/* Endianness was not detected or non-standard like PDP-endian */
-MHD_static_inline_ uint64_t
+mhd_static_inline uint64_t
mhd_GET_64BIT_BE(const void *addr)
{
const uint8_t *const src = (const uint8_t *) addr;
@@ -445,7 +445,7 @@ mhd_GET_64BIT_BE(const void *addr)
((*(uint32_t*) (addr)) = mhd_BYTES_SWAP32 (value32))
#else /* mhd_BYTE_ORDER != mhd_LITTLE_ENDIAN */
/* Endianness was not detected or non-standard like PDP-endian */
-MHD_static_inline_ void
+mhd_static_inline void
mhd_PUT_32BIT_BE(void *addr, uint32_t value32)
{
uint8_t *const dst = (uint8_t *) addr;
@@ -470,7 +470,7 @@ mhd_PUT_32BIT_BE(void *addr, uint32_t value32)
mhd_BYTES_SWAP32 (*(const uint32_t*) (addr))
#else /* mhd_BYTE_ORDER != mhd_LITTLE_ENDIAN */
/* Endianness was not detected or non-standard like PDP-endian */
-MHD_static_inline_ uint32_t
+mhd_static_inline uint32_t
mhd_GET_32BIT_BE(const void *addr)
{
const uint8_t *const src = (const uint8_t *) addr;
@@ -498,7 +498,7 @@ mhd_GET_32BIT_BE(const void *addr)
# define mhd_PUT_UINTFAST32_BE(addr, uif32) \
mhd_PUT_64BIT_BE ((addr),(uif32))
#else /* future-proof */
-MHD_static_inline_ void
+mhd_static_inline void
mhd_PUT_UINTFAST32_BE(void *addr, uint_fast32_t uif32)
{
uint8_t *const dst = (uint8_t *) addr;
@@ -518,7 +518,7 @@ mhd_PUT_UINTFAST32_BE(void *addr, uint_fast32_t uif32)
# define mhd_GET_UINTFAST32_BE(addr) \
mhd_GET_64BIT_BE ((addr))
#else /* future-proof */
-MHD_static_inline_ uint_fast32_t
+mhd_static_inline uint_fast32_t
mhd_GET_UINTFAST32_BE(const void *addr)
{
size_t i;
@@ -550,7 +550,7 @@ mhd_GET_UINTFAST32_BE(const void *addr)
# define mhd_ROTR32(value32, bits) \
((uint32_t) __builtin_rotateright32 ((value32), (bits)))
#else /* ! __builtin_rotateright32 */
-MHD_static_inline_ uint32_t
+mhd_static_inline uint32_t
mhd_ROTR32 (uint32_t value32, unsigned int bits)
{
bits &= 31u;
@@ -577,7 +577,7 @@ mhd_ROTR32 (uint32_t value32, unsigned int bits)
# define mhd_ROTL32(value32, bits) \
((uint32_t) __builtin_rotateleft32 ((value32), (bits)))
#else /* ! __builtin_rotateleft32 */
-MHD_static_inline_ uint32_t
+mhd_static_inline uint32_t
mhd_ROTL32 (uint32_t value32, unsigned int bits)
{
bits &= 31u;
@@ -604,7 +604,7 @@ mhd_ROTL32 (uint32_t value32, unsigned int bits)
# define mhd_ROTR64(value64, bits) \
((uint64_t) __builtin_rotateright64 ((value64), (bits)))
#else /* ! __builtin_rotateright64 */
-MHD_static_inline_ uint64_t
+mhd_static_inline uint64_t
mhd_ROTR64 (uint64_t value64, unsigned int bits)
{
bits &= 63u;
diff --git a/src/mhd2/mhd_lib_init.c b/src/mhd2/mhd_lib_init.c
@@ -326,7 +326,7 @@ AUTOINIT_FUNCS_USR_DLLMAIN_NAME (HINSTANCE hinst,
* @return 'true' if succeed,
* 'false' if failed
*/
-MHD_static_inline_ bool
+mhd_static_inline bool
mhd_lib_sockets_init_w32 (void)
{
WSADATA wsd;
@@ -344,7 +344,7 @@ mhd_lib_sockets_init_w32 (void)
/**
* De-initialise W32 sockets
*/
-MHD_static_inline_ void
+mhd_static_inline void
mhd_lib_sockets_deinit_w32 (void)
{
(void) WSACleanup ();
diff --git a/src/mhd2/mhd_mono_clock.c b/src/mhd2/mhd_mono_clock.c
@@ -215,7 +215,7 @@ mclock_deinit_clock_get_time (void)
* if either of the input values is zero, the other input value
* returned
*/
-MHD_static_inline_ uint_fast32_t
+mhd_static_inline uint_fast32_t
mclock_gcd (uint_fast32_t a, uint_fast32_t b)
{
if (0 == b)
diff --git a/src/mhd2/mhd_str.c b/src/mhd2/mhd_str.c
@@ -52,13 +52,13 @@
#include "mhd_limits.h"
#ifdef MHD_FAVOR_SMALL_CODE
-# ifdef MHD_static_inline_
-# undef MHD_static_inline_
-# endif /* MHD_static_inline_ */
+# ifdef mhd_static_inline
+# undef mhd_static_inline
+# endif /* mhd_static_inline */
/* Do not force inlining and do not use macro functions, use normal static
functions instead.
This may give more flexibility for size optimizations. */
-# define MHD_static_inline_ static
+# define mhd_static_inline static
# ifndef HAVE_INLINE_FUNCS
# define HAVE_INLINE_FUNCS 1
# endif /* !HAVE_INLINE_FUNCS */
@@ -78,7 +78,7 @@
* @param c character to check
* @return non-zero if character is lower case letter, zero otherwise
*/
-MHD_static_inline_ MHD_FN_CONST_ bool
+mhd_static_inline MHD_FN_CONST_ bool
isasciilower (char c)
{
return (c >= 'a') && (c <= 'z');
@@ -94,7 +94,7 @@ isasciilower (char c)
* @param c character to check
* @return non-zero if character is upper case letter, zero otherwise
*/
-MHD_static_inline_ MHD_FN_CONST_ bool
+mhd_static_inline MHD_FN_CONST_ bool
isasciiupper (char c)
{
return (c <= 'Z') && (c >= 'A');
@@ -108,7 +108,7 @@ isasciiupper (char c)
* @param c character to check
* @return non-zero if character is letter in US-ASCII, zero otherwise
*/
-MHD_static_inline_ MHD_FN_CONST_ bool
+mhd_static_inline MHD_FN_CONST_ bool
isasciialpha (char c)
{
return isasciilower (c) || isasciiupper (c);
@@ -124,7 +124,7 @@ isasciialpha (char c)
* @param c character to check
* @return non-zero if character is decimal digit, zero otherwise
*/
-MHD_static_inline_ MHD_FN_CONST_ bool
+mhd_static_inline MHD_FN_CONST_ bool
isasciidigit (char c)
{
return (c <= '9') && (c >= '0');
@@ -138,7 +138,7 @@ isasciidigit (char c)
* @param c character to check
* @return non-zero if character is decimal digit, zero otherwise
*/
-MHD_static_inline_ MHD_FN_CONST_ bool
+mhd_static_inline MHD_FN_CONST_ bool
isasciixdigit (char c)
{
return isasciidigit (c) ||
@@ -153,7 +153,7 @@ isasciixdigit (char c)
* @param c character to check
* @return non-zero if character is decimal digit or letter, zero otherwise
*/
-MHD_static_inline_ MHD_FN_CONST_ bool
+mhd_static_inline MHD_FN_CONST_ bool
isasciialnum (char c)
{
return isasciialpha (c) || isasciidigit (c);
@@ -173,7 +173,7 @@ isasciialnum (char c)
* @param c character to convert
* @return converted to lower case character
*/
-MHD_static_inline_ MHD_FN_CONST_ char
+mhd_static_inline MHD_FN_CONST_ char
toasciilower (char c)
{
return isasciiupper (c) ? (char) (0x20u | (unsigned char) c) : c;
@@ -189,7 +189,7 @@ toasciilower (char c)
* @param c character to convert
* @return converted to upper case character
*/
-MHD_static_inline_ MHD_FN_CONST_ char
+mhd_static_inline MHD_FN_CONST_ char
toasciiupper (char c)
{
return isasciilower (c) ? (char) ((~0x20u) & (unsigned char) c) : c;
@@ -206,7 +206,7 @@ toasciiupper (char c)
* @param c character to convert
* @return value of decimal digit or -1 if @ c is not decimal digit
*/
-MHD_static_inline_ MHD_FN_CONST_ int
+mhd_static_inline MHD_FN_CONST_ int
todigitvalue (char c)
{
if (isasciidigit (c))
@@ -225,7 +225,7 @@ todigitvalue (char c)
* @param c character to convert
* @return value of hexadecimal digit or -1 if @ c is not hexadecimal digit
*/
-MHD_static_inline_ MHD_FN_CONST_ int
+mhd_static_inline MHD_FN_CONST_ int
xdigittovalue (char c)
{
const unsigned char uc = (unsigned char) c; /* Force unsigned value */
@@ -510,7 +510,7 @@ xdigittovalue (char c)
* @param v the value to convert, must be less then 16
* @return hexadecimal digit
*/
-MHD_static_inline_ MHD_FN_CONST_ char
+mhd_static_inline MHD_FN_CONST_ char
valuetoxdigit (unsigned int v)
{
#if ! defined(MHD_FAVOR_SMALL_CODE)
@@ -539,7 +539,7 @@ valuetoxdigit (unsigned int v)
* @param v the value to convert
* @return pointer to char[2] with two hexadecimal digits
*/
-MHD_static_inline_ MHD_FN_CONST_ MHD_FN_RETURNS_NONNULL_ const char*
+mhd_static_inline MHD_FN_CONST_ MHD_FN_RETURNS_NONNULL_ const char*
uint8totwoxdigits (uint8_t v)
{
static const char map_uint8_to_two_xdigits[][2] =
@@ -827,7 +827,7 @@ uint8totwoxdigits (uint8_t v)
* @param c2 the second char to compare
* @return boolean 'true' if chars are caseless equal, false otherwise
*/
-MHD_static_inline_ MHD_FN_CONST_ bool
+mhd_static_inline MHD_FN_CONST_ bool
charsequalcaseless (char c1, char c2)
{
if (c1 == c2)
diff --git a/src/mhd2/post_parser_funcs.c b/src/mhd2/post_parser_funcs.c
@@ -621,7 +621,7 @@ report_invalid_termination (struct MHD_Connection *restrict c)
* @return 'true' if the value must be provided via the "stream" reader,
* 'false' otherwise.
*/
-MHD_static_inline_ MHD_FN_PURE_ MHD_FN_PAR_NONNULL_ALL_ bool
+mhd_static_inline MHD_FN_PURE_ MHD_FN_PAR_NONNULL_ALL_ bool
is_value_streaming_needed (struct MHD_Connection *restrict c,
size_t field_cur_size)
{
@@ -694,7 +694,7 @@ add_parsed_post_field (struct MHD_Connection *restrict c,
}
-MHD_static_inline_ MHD_FN_PAR_NONNULL_ALL_
+mhd_static_inline MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_IN_ (1)
MHD_FN_PAR_OUT_ (10) MHD_FN_PAR_OUT_ (11)
MHD_FN_PAR_OUT_ (12) MHD_FN_PAR_OUT_ (13) void
diff --git a/src/mhd2/stream_process_request.c b/src/mhd2/stream_process_request.c
@@ -1563,7 +1563,7 @@ mhd_stream_switch_to_rq_headers_proc (struct MHD_Connection *restrict c)
* Can be NULL.
* @param add_header_size the size of the @a add_header
*/
-MHD_static_inline_
+mhd_static_inline
MHD_FN_PAR_NONNULL_ (1) void
handle_req_headers_no_space (struct MHD_Connection *restrict c,
const char *restrict add_header,
@@ -1591,7 +1591,7 @@ handle_req_headers_no_space (struct MHD_Connection *restrict c,
* Can be NULL.
* @param add_footer_size the size of the @a add_footer
*/
-MHD_static_inline_
+mhd_static_inline
MHD_FN_PAR_NONNULL_ (1) void
handle_req_footers_no_space (struct MHD_Connection *restrict c,
const char *restrict add_footer,
@@ -2634,7 +2634,7 @@ parse_cookie_header (struct MHD_Connection *restrict connection,
* storing the request headers
* @param c the connection to handle
*/
-MHD_static_inline_ void
+mhd_static_inline void
handle_req_cookie_no_space (struct MHD_Connection *restrict c)
{
unsigned int err_code;
diff --git a/src/mhd2/upgrade_prep.c b/src/mhd2/upgrade_prep.c
@@ -82,7 +82,7 @@
* @return 'true' if @a copy_data has been appended to the @a buf buffer,
* 'false' if @a buf buffer has not enough space
*/
-MHD_static_inline_
+mhd_static_inline
MHD_FN_PAR_OUT_SIZE_ (2,1)
MHD_FN_PAR_NONNULL_ (3) MHD_FN_PAR_INOUT_ (3)
MHD_FN_PAR_IN_SIZE_ (5,4) bool
diff --git a/w32/common/mhd_config.h b/w32/common/mhd_config.h
@@ -34,7 +34,7 @@
#define INLINE_FUNC 1
/* Define to prefix which will be used with MHD static inline functions. */
-#define MHD_static_inline_ static __forceinline
+#define mhd_static_inline static __forceinline
/* Compound literals are supported natively since VS2013, but only in C */
#if defined(__clang__) || \