libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit e3f1cc20b108c58455dd1d61d1f82f91291ecacf
parent bd1111692a6c993c4222e252283eeaefc804a68a
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 20 Dec 2025 11:05:23 +0100

try again to avoid double-definition problem

Diffstat:
Msrc/incl_priv/mhd_sys_options.h | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/incl_priv/mhd_sys_options.h b/src/incl_priv/mhd_sys_options.h @@ -52,10 +52,6 @@ #ifndef MHD_SYS_OPTIONS_H #define MHD_SYS_OPTIONS_H 1 -// FIXME-Evgeny: both of these headers define some of the -// very same MHD-macros. We should avoid this. -#ifndef MICROHTTPD2_PORTABILITY_H - #ifndef HAVE_CONFIG_H # ifndef _MSC_VER @@ -94,6 +90,11 @@ # define MHD_EXPORTED __declspec(dllexport) #endif +// FIXME-Evgeny: both of these headers define some of the +// very same MHD-macros. We should avoid this. +#ifndef MICROHTTPD2_PORTABILITY_H + + #if defined(HAVE_ATTR_USED) \ && (defined(PIC) || defined(DLL_EXPORT) || defined(MHD_W32DLL)) /* Used externally, only for functions in shared library */ @@ -250,12 +251,16 @@ # define MHD_FN_PAR_DYN_ARR_SIZE_(size) 1 #endif +#endif /* MICROHTTPD2_PORTABILITY_H */ + + #ifdef HAVE_ATTR_FUNC_ASSUME_ALIGNED # define mhd_FN_RET_ALIGNED(align) __attribute__((assume_aligned (align))) #else # define mhd_FN_RET_ALIGNED(align) /* empty */ #endif + #ifdef HAVE_ATTR_FUNC_ALLOC_SIZE /** * Indicates that returned pointer points to object with the size specified @@ -687,6 +692,4 @@ # undef HAVE_CONFIG_H #endif -#endif /* MICROHTTPD2_PORTABILITY_H */ - #endif /* MHD_SYS_OPTIONS_H */