libmicrohttpd2

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

commit 6b2903aa200ade622e2cd626c1098cb8dfea7a12
parent 5d52796e849868d8b0927b9a5de805f955aeaad5
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Sat, 11 Jul 2026 18:00:14 +0200

Moved concatenate helper macro to special header

Diffstat:
Asrc/mhd2/mhd_macro_concat.h | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mhd2/mhd_tls_choice.h | 13++-----------
2 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/src/mhd2/mhd_macro_concat.h b/src/mhd2/mhd_macro_concat.h @@ -0,0 +1,60 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later OR (GPL-2.0-or-later WITH eCos-exception-2.0) */ +/* + This file is part of GNU libmicrohttpd. + Copyright (C) 2026 Evgeny Grin (Karlson2k) + + GNU libmicrohttpd is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + GNU libmicrohttpd is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + Alternatively, you can redistribute GNU libmicrohttpd and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version, together + with the eCos exception, as follows: + + As a special exception, if other files instantiate templates or + use macros or inline functions from this file, or you compile this + file and link it with other works to produce a work based on this + file, this file does not by itself cause the resulting work to be + covered by the GNU General Public License. However the source code + for this file must still be made available in accordance with + section (3) of the GNU General Public License v2. + + This exception does not invalidate any other reasons why a work + based on this file might be covered by the GNU General Public + License. + + You should have received copies of the GNU Lesser General Public + License and the GNU General Public License along with this library; + if not, see <https://www.gnu.org/licenses/>. +*/ + +/** + * @file src/mhd2/mhd_macro_concat.h + * @brief The definition of concatenate helper macros. + * @author Karlson2k (Evgeny Grin) + */ + +#ifndef MHD_MACRO_CONCAT_H +#define MHD_MACRO_CONCAT_H 1 + +#include "mhd_sys_options.h" + + +/** + * Concatenate three arguments literally + */ +#define mhd_MACRO_CONCAT3_(a, b, c) a ## b ## c +/** + * Concatenate three arguments after expansion + */ +#define mhd_MACRO_CONCAT3(a, b, c) mhd_MACRO_CONCAT3_ (a,b,c) + +#endif /* ! MHD_MACRO_CONCAT_H */ diff --git a/src/mhd2/mhd_tls_choice.h b/src/mhd2/mhd_tls_choice.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later OR (GPL-2.0-or-later WITH eCos-exception-2.0) */ /* This file is part of GNU libmicrohttpd. - Copyright (C) 2024 Evgeny Grin (Karlson2k) + Copyright (C) 2024-2026 Evgeny Grin (Karlson2k) GNU libmicrohttpd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -51,16 +51,7 @@ # error This header should be used only if HTTPS is enabled #endif -/* ** Helper macros ** */ - -/** - * Concatenate three arguments literally - */ -#define mhd_MACRO_CONCAT3_(a, b, c) a ## b ## c -/** - * Concatenate three arguments after expansion - */ -#define mhd_MACRO_CONCAT3(a, b, c) mhd_MACRO_CONCAT3_ (a,b,c) +#include "mhd_macro_concat.h" /* ** Enumerate TLS backends ** */