commit 814bdffaca18849aca00a2d2707e5fc3316faed2
parent a13ba1946f37034879ba7e398ca39e4697e6d200
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Fri, 25 Jul 2025 13:34:43 +0200
sys_sizet_type.h: added new internal header
Diffstat:
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/src/mhd2/Makefile.am b/src/mhd2/Makefile.am
@@ -25,7 +25,8 @@ nodist_libmicrohttpd2_la_SOURCES = $(CONFIG_HEADER)
libmicrohttpd2_la_SOURCES = \
autoinit_funcs.h \
sys_offsetof.h \
- sys_null_macro.h sys_base_types.h sys_bool_type.h \
+ sys_sizet_type.h sys_null_macro.h sys_bool_type.h \
+ sys_base_types.h \
sys_sockets_types.h sys_sockets_headers.h sys_ip_headers.h \
sys_errno.h sys_file_fd.h sys_malloc.h \
sys_select.h sys_poll.h \
diff --git a/src/mhd2/sys_sizet_type.h b/src/mhd2/sys_sizet_type.h
@@ -0,0 +1,41 @@
+/*
+ This file is part of GNU libmicrohttpd
+ Copyright (C) 2025 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/sys_sizet_type.h
+ * @brief The header for the system 'size_t' type
+ * @author Karlson2k (Evgeny Grin)
+ *
+ * This header tries to include the minimal header that defines 'size_t' type.
+ * The headers included by this header always provide 'NULL' macro.
+ */
+
+#ifndef MHD_SYS_SIZET_TYPE_H
+#define MHD_SYS_SIZET_TYPE_H 1
+
+#include "mhd_sys_options.h"
+
+#if defined(HAVE_STDDEF_H)
+# include <stddef.h> /* NULL, size_t */
+#else
+# include <string.h> /* should provide NULL, size_t */
+#endif
+
+#endif /* ! MHD_SYS_SIZET_TYPE_H */