[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 05/12: configure: cosmetics and formatting
From: |
gnunet |
Subject: |
[libmicrohttpd] 05/12: configure: cosmetics and formatting |
Date: |
Sun, 28 Apr 2024 20:55:24 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit aa2731613362ac2687d94f806b2ccba96809255e
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Apr 21 19:07:23 2024 +0200
configure: cosmetics and formatting
---
configure.ac | 46 +++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8c901f66..7c71319c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -752,8 +752,8 @@ AS_VAR_IF([enable_linker_hardening],["yes"],
)
-AH_TEMPLATE([[HAVE_STDBOOL_H]], [Define to 1 if you have the <stdbool.h>
header file and <stdbool.h> defines 'bool' type.])
-AH_TEMPLATE([[HAVE_BUILTIN_TYPE_BOOL]], [Define to 1 if you have the real
boolean type.])
+AH_TEMPLATE([[HAVE_STDBOOL_H]], [Define to 1 i][f you have the <stdbool.h>
header file and <stdbool.h> defines 'bool' type.])
+AH_TEMPLATE([[HAVE_BUILTIN_TYPE_BOOL]], [Define to 1 i][f you have the real
boolean type.])
AH_TEMPLATE([[bool]], [Define to type name which will be used as boolean
type.])
AC_CHECK_HEADER([stdbool.h],
[
@@ -1277,8 +1277,9 @@ AS_CASE([[$with_threads]],
[AC_MSG_ERROR([[incorrect parameter "$with_threads" specified for
--with-threads]])]
)
-# Check for posix threads support, regardless of configure parameters as
-# testsuite uses only posix threads.
+# Check for posix threads support.
+# As the testsuite uses only posix threads, the checks are required even
+# if the library does not use posit threads.
AX_PTHREAD(
[
mhd_have_posix_threads='yes'
@@ -2626,7 +2627,6 @@ MHD_CHECK_FUNC_RUN([getsockname],
#include <arpa/inet.h>
#endif
-
static void zr_mem(void *ptr, socklen_t size)
{ char *mem = ptr; while(size--) {mem[0] = 0; mem++;} }
@@ -2644,35 +2644,35 @@ static void zr_mem(void *ptr, socklen_t size)
const SOCKET invld_sckt = INVALID_SOCKET;
WSADATA wsa_data;
- if (0 != WSAStartup(MAKEWORD(2, 2), &wsa_data) || MAKEWORD(2, 2) !=
wsa_data.wVersion)
+ i][f (0 != WSAStartup(MAKEWORD(2, 2), &wsa_data) || MAKEWORD(2, 2) !=
wsa_data.wVersion)
return 20;
#endif
sckt = socket (PF_INET, SOCK_STREAM, 0);
- if (invld_sckt != sckt)
+ i][f (invld_sckt != sckt)
{
zr_mem(&sa, c_addr_size);
sa.sin_family = AF_INET;
#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
sa.sin_len = c_addr_size;
#endif
- if (0 == bind (sckt, (struct sockaddr *)&sa, c_addr_size))
+ i][f (0 == bind (sckt, (struct sockaddr *)&sa, c_addr_size))
{
- if (0 == listen (sckt, 1))
+ i][f (0 == listen (sckt, 1))
{
addr_size = c_addr_size;
- if (0 == getsockname (sckt, (struct sockaddr *)&sa, &addr_size))
+ i][f (0 == getsockname (sckt, (struct sockaddr *)&sa, &addr_size))
{
- if (c_addr_size >= addr_size)
+ i][f (c_addr_size >= addr_size)
{
- if (0 != ntohs(sa.sin_port))
+ i][f (0 != ntohs(sa.sin_port))
{ ret = 0;
- } else ret = 7;
- } else ret = 6;
- } else ret = 5;
- } else ret = 4;
- } else ret = 3;
- } else ret = 2;
+ } el][se ret = 7;
+ } el][se ret = 6;
+ } el][se ret = 5;
+ } el][se ret = 4;
+ } el][se ret = 3;
+ } el][se ret = 2;
#if !defined(_WIN32) || defined(__CYGWIN__)
close (sckt);
#else
@@ -2852,15 +2852,15 @@ AS_IF([[test "x$enable_itc" = "xeventfd" || test
"x$enable_itc" = "xauto"]],
static unsigned char buf[8];
int ret;
int efd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
- if (0 > efd)
+ i][f (0 > efd)
return 2;
ret = 0;
buf[3] = 1;
- if (8 != write(efd, buf, 8))
+ i][f (8 != write(efd, buf, 8))
ret = 3;
- else
+ el][se
{
- if (8 != read(efd, buf, 8))
+ i][f (8 != read(efd, buf, 8))
ret = 4;
}
close(efd);
@@ -2947,7 +2947,7 @@ AC_INCLUDES_DEFAULT
AS_CASE([${host_os}], [kfreebsd*-gnu], [cacheVar='assuming no'],
[cacheVar='assuming yes'])
],
- [AC_DEFINE([[HAVE_PIPE2_FUNC]], [[1]], [Define if you have usable
pipe2(2) function])]
+ [AC_DEFINE([[HAVE_PIPE2_FUNC]], [[1]], [Define i][f you have usable
pipe2(2) function])],
)
], [
AS_VAR_IF([[enable_itc]], [["pipe"]], [AC_MSG_ERROR([[pipe(3) is not
usable, consider using other type of inter-thread communication]])])
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (44db29ca -> 3a93f07d), gnunet, 2024/04/28
- [libmicrohttpd] 02/12: mhd_check_func.m4: corrected, gnunet, 2024/04/28
- [libmicrohttpd] 03/12: mhd_check_func_run.m4: new autoconf macro, gnunet, 2024/04/28
- [libmicrohttpd] 08/12: configure: enable largefile earlier as it may influence other checks, gnunet, 2024/04/28
- [libmicrohttpd] 10/12: bootstrap: better support Gentoo and MinGW, gnunet, 2024/04/28
- [libmicrohttpd] 01/12: mhd_check_link_run.m4: documentation fixes, gnunet, 2024/04/28
- [libmicrohttpd] 05/12: configure: cosmetics and formatting,
gnunet <=
- [libmicrohttpd] 09/12: configure: enable 64 bit time_t by default if possible, gnunet, 2024/04/28
- [libmicrohttpd] 12/12: mhd_bool.m4: new autoconf macro that supports C23, gnunet, 2024/04/28
- [libmicrohttpd] 04/12: configure: improved portability when cross-compiling, gnunet, 2024/04/28
- [libmicrohttpd] 11/12: configure: print DAuth defaults in the help message, gnunet, 2024/04/28
- [libmicrohttpd] 06/12: configure: fixed compiler warnings for new compilers, gnunet, 2024/04/28
- [libmicrohttpd] 07/12: configure: improved messages, gnunet, 2024/04/28