From 86170adff21b359861f1e2bbb1a3123f3cb7460e Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Mon, 18 Nov 2024 16:52:01 +0300 Subject: [PATCH] mhd_status_code_int: new internal header --- src/mhd2/Makefile.am | 2 +- src/mhd2/mhd_status_code_int.h | 42 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/mhd2/mhd_status_code_int.h diff --git a/src/mhd2/Makefile.am b/src/mhd2/Makefile.am index 70fc8696..15afc210 100644 --- a/src/mhd2/Makefile.am +++ b/src/mhd2/Makefile.am @@ -34,7 +34,7 @@ libmicrohttpd2_la_SOURCES = \ sys_w32_ver.h \ mhd_assert.h \ mhd_cntnr_ptr.h mhd_arr_num_elems.h \ - mhd_tristate.h \ + mhd_tristate.h mhd_status_code_int.h \ mhd_socket_type.h mhd_sockets_macros.h \ mhd_sockets_funcs.c mhd_sockets_funcs.h \ mhd_socket_error.c mhd_socket_error.h \ diff --git a/src/mhd2/mhd_status_code_int.h b/src/mhd2/mhd_status_code_int.h new file mode 100644 index 00000000..7c59154e --- /dev/null +++ b/src/mhd2/mhd_status_code_int.h @@ -0,0 +1,42 @@ +/* + This file is part of GNU libmicrohttpd + Copyright (C) 2024 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. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +/** + * @file src/mhd2/mhd_status_code_int.h + * @brief The internal version of enum MHD_StatusCode + * @author Karlson2k (Evgeny Grin) + */ + +#ifndef MHD_STATUS_CODE_INT_H +#define MHD_STATUS_CODE_INT_H 1 + +#include "mhd_sys_options.h" + +#include "sys_base_types.h" + +/** + * "Internal" version of enum MHD_StatusCode. + * + * Always mapped 1:1 to enum MHD_StatusCode, can be set only to MHD_SC_ values. + * Can be used to declare functions without including large public headers + */ +typedef uint_fast16_t mhd_StatusCodeInt; + +#endif /* ! MHD_STATUS_CODE_INT_H */