[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: Added use of configure-detected s
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: Added use of configure-detected system default FD_SETSIZE value |
Date: |
Thu, 02 Nov 2023 19:42:40 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new cdf9b66c Added use of configure-detected system default FD_SETSIZE
value
cdf9b66c is described below
commit cdf9b66c61a444c09ba7c9f4cee385cbd2b3bcdc
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Nov 2 21:42:20 2023 +0300
Added use of configure-detected system default FD_SETSIZE value
---
configure.ac | 1 +
src/microhttpd/Makefile.am | 6 +++++-
src/microhttpd/sysfdsetsize.c | 10 ++++++++--
src/microhttpd/sysfdsetsize.h | 17 +++++++++++++++++
4 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index d0fa4315..f2abfa43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1669,6 +1669,7 @@ AS_VAR_IF([mhd_cv_sys_fd_setsize_value],["unknown"],[:],
)
]
)
+AM_CONDITIONAL([NEED_SYS_FD_SET_SIZE_VALUE],[test
"x${mhd_cv_sys_fd_setsize_value}" = "xunknown"])
AC_CACHE_CHECK([fo][r current FD_SETSIZE value],[mhd_cv_fd_setsize_value],
[
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index 042f46c4..043755ce 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -83,7 +83,7 @@ libmicrohttpd_la_SOURCES = \
memorypool.c memorypool.h \
mhd_mono_clock.c mhd_mono_clock.h \
mhd_limits.h \
- sysfdsetsize.c sysfdsetsize.h \
+ sysfdsetsize.h \
mhd_str.c mhd_str.h mhd_str_types.h\
mhd_send.h mhd_send.c \
mhd_assert.h \
@@ -104,6 +104,10 @@ libmicrohttpd_la_SOURCES += \
mhd_locks.h
endif
+if NEED_SYS_FD_SET_SIZE_VALUE
+libmicrohttpd_la_SOURCES += \
+ sysfdsetsize.c
+endif
libmicrohttpd_la_CPPFLAGS = \
$(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) $(MHD_TLS_LIB_CPPFLAGS) \
diff --git a/src/microhttpd/sysfdsetsize.c b/src/microhttpd/sysfdsetsize.c
index f6452157..be58dfa1 100644
--- a/src/microhttpd/sysfdsetsize.c
+++ b/src/microhttpd/sysfdsetsize.c
@@ -26,6 +26,10 @@
#include "MHD_config.h"
+#ifndef MHD_SYS_FD_SETSIZE_
+
+#include "sysfdsetsize.h"
+
#ifdef FD_SETSIZE
/* FD_SETSIZE was defined before system headers. */
/* To get system value of FD_SETSIZE, undefine FD_SETSIZE
@@ -69,7 +73,6 @@
#error FD_SETSIZE must be defined in system headers
#endif /* !FD_SETSIZE */
-#include "sysfdsetsize.h"
/**
* Get system default value of FD_SETSIZE
@@ -78,5 +81,8 @@
unsigned int
get_system_fdsetsize_value (void)
{
- return FD_SETSIZE;
+ return (unsigned int) FD_SETSIZE;
}
+
+
+#endif /* ! MHD_SYS_FD_SETSIZE_ */
diff --git a/src/microhttpd/sysfdsetsize.h b/src/microhttpd/sysfdsetsize.h
index 6b0e37d4..de0ce81e 100644
--- a/src/microhttpd/sysfdsetsize.h
+++ b/src/microhttpd/sysfdsetsize.h
@@ -26,6 +26,9 @@
#ifndef SYSFDSETSIZE_H
#define SYSFDSETSIZE_H 1
+#include "MHD_config.h"
+
+#ifndef MHD_SYS_FD_SETSIZE_
/**
* Get system default value of FD_SETSIZE
* @return system default value of FD_SETSIZE
@@ -33,4 +36,18 @@
unsigned int
get_system_fdsetsize_value (void);
+#else /* MHD_SYS_FD_SETSIZE_ */
+/**
+ * Get system default value of FD_SETSIZE
+ * @return system default value of FD_SETSIZE
+ */
+_MHD_static_inline unsigned int
+get_system_fdsetsize_value (void)
+{
+ return (unsigned int) MHD_SYS_FD_SETSIZE_;
+}
+
+
+#endif /* MHD_SYS_FD_SETSIZE_ */
+
#endif /* !SYSFDSETSIZE_H */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: Added use of configure-detected system default FD_SETSIZE value,
gnunet <=