[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: Improved compatibility with old c
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: Improved compatibility with old compilers |
Date: |
Wed, 27 Sep 2023 19:02:15 +0200 |
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 93bc2751 Improved compatibility with old compilers
93bc2751 is described below
commit 93bc2751bf5a04380de4435877344418bbeec770
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Sep 27 20:02:00 2023 +0300
Improved compatibility with old compilers
---
src/examples/connection_close.c | 2 +-
src/examples/pthread_windows.h | 2 +-
src/include/microhttpd.h | 4 ++--
src/microhttpd/test_str.c | 17 ++++++++---------
src/testcurl/test_get_response_cleanup.c | 10 +++++-----
5 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/src/examples/connection_close.c b/src/examples/connection_close.c
index de79d9f1..d6ca7761 100644
--- a/src/examples/connection_close.c
+++ b/src/examples/connection_close.c
@@ -111,7 +111,7 @@ main (int argc, char *const *argv)
/* MHD_USE_AUTO | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, */
/* MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | MHD_USE_POLL, */
MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD
- | MHD_USE_ERROR_LOG | MHD_USE_POLL, // | MHD_USE_ITC,
+ | MHD_USE_ERROR_LOG | MHD_USE_POLL, /* | MHD_USE_ITC, */
/* MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD |
MHD_USE_ERROR_LOG, */
atoi (argv[1]),
NULL, NULL, &ahc_echo, PAGE,
diff --git a/src/examples/pthread_windows.h b/src/examples/pthread_windows.h
index 412d40be..5f9f3e7a 100644
--- a/src/examples/pthread_windows.h
+++ b/src/examples/pthread_windows.h
@@ -43,4 +43,4 @@ int pthread_cond_signal (pthread_cond_t *cond);
int pthread_cond_broadcast (pthread_cond_t *cond);
-#endif // !pthread_windows_H
+#endif /* !pthread_windows_H */
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index b6f6fddc..925f2a88 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -4617,7 +4617,7 @@ enum MHD_DigestAuthAlgo3
* Not supported by MHD for authentication.
*/
MHD_DIGEST_AUTH_ALGO3_SHA512_256_SESSION =
- MHD_DIGEST_BASE_ALGO_SHA512_256 | MHD_DIGEST_AUTH_ALGO3_SESSION,
+ MHD_DIGEST_BASE_ALGO_SHA512_256 | MHD_DIGEST_AUTH_ALGO3_SESSION
};
@@ -5302,7 +5302,7 @@ enum MHD_DigestAuthResult
/**
* The 'response' is wrong. May indicate an attack attempt.
*/
- MHD_DAUTH_RESPONSE_WRONG = -34,
+ MHD_DAUTH_RESPONSE_WRONG = -34
};
diff --git a/src/microhttpd/test_str.c b/src/microhttpd/test_str.c
index 650510a1..aa78998a 100644
--- a/src/microhttpd/test_str.c
+++ b/src/microhttpd/test_str.c
@@ -1805,9 +1805,9 @@ check_strx_to_uint32_overflow (void)
size_t t_failed = 0;
size_t i, j;
static const size_t n_checks1 = sizeof(strx_ovflw) / sizeof(strx_ovflw[0]);
- int c_failed[sizeof(strx_ovflw) / sizeof(strx_ovflw[0])
- + sizeof(xdstrs_w_values)
- / sizeof(xdstrs_w_values[0])];
+ int c_failed[(sizeof(strx_ovflw) / sizeof(strx_ovflw[0]))
+ + (sizeof(xdstrs_w_values)
+ / sizeof(xdstrs_w_values[0]))];
static const size_t n_checks = sizeof(c_failed) / sizeof(c_failed[0]);
memset (c_failed, 0, sizeof(c_failed));
@@ -2099,9 +2099,9 @@ check_strx_to_uint32_n_overflow (void)
size_t t_failed = 0;
size_t i, j;
static const size_t n_checks1 = sizeof(strx_ovflw) / sizeof(strx_ovflw[0]);
- int c_failed[sizeof(strx_ovflw) / sizeof(strx_ovflw[0])
- + sizeof(xdstrs_w_values)
- / sizeof(xdstrs_w_values[0])];
+ int c_failed[(sizeof(strx_ovflw) / sizeof(strx_ovflw[0]))
+ + (sizeof(xdstrs_w_values)
+ / sizeof(xdstrs_w_values[0]))];
static const size_t n_checks = sizeof(c_failed) / sizeof(c_failed[0]);
memset (c_failed, 0, sizeof(c_failed));
@@ -2522,9 +2522,8 @@ check_strx_to_uint64_n_valid (void)
{
size_t t_failed = 0;
size_t i, j;
- static const size_t n_checks = sizeof(xdstrs_w_values)
- / sizeof(xdstrs_w_values[0]);
- int c_failed[n_checks];
+ int c_failed[sizeof(xdstrs_w_values) / sizeof(xdstrs_w_values[0])];
+ static const size_t n_checks = sizeof(c_failed) / sizeof(c_failed[0]);
memset (c_failed, 0, sizeof(c_failed));
diff --git a/src/testcurl/test_get_response_cleanup.c
b/src/testcurl/test_get_response_cleanup.c
index 4d6a043b..bb332edd 100644
--- a/src/testcurl/test_get_response_cleanup.c
+++ b/src/testcurl/test_get_response_cleanup.c
@@ -88,7 +88,7 @@ kill_curl (pid_t pid)
{
int status;
- // fprintf (stderr, "Killing curl\n");
+ /* fprintf (stderr, "Killing curl\n"); /
kill (pid, SIGTERM);
waitpid (pid, &status, 0);
}
@@ -111,7 +111,7 @@ push_free_callback (void *cls)
{
int *ok_p = cls;
- // fprintf (stderr, "Cleanup callback called!\n");
+ /* fprintf (stderr, "Cleanup callback called!\n"); */
*ok_p = 0;
}
@@ -240,7 +240,7 @@ testMultithreadedGet (void)
sizeof (url),
"http://127.0.0.1:%u/",
(unsigned int) port);
- // fprintf (stderr, "Forking cURL!\n");
+ /* fprintf (stderr, "Forking cURL!\n"); */
curl = fork_curl (url);
(void) sleep (1);
kill_curl (curl);
@@ -255,7 +255,7 @@ testMultithreadedGet (void)
}
kill_curl (curl);
(void) sleep (1);
- // fprintf (stderr, "Stopping daemon!\n");
+ /* fprintf (stderr, "Stopping daemon!\n"); */
MHD_stop_daemon (d);
if (ok != 0)
return 32;
@@ -306,7 +306,7 @@ testMultithreadedPoolGet (void)
(void) sleep (1);
kill_curl (curl);
(void) sleep (1);
- // fprintf (stderr, "Stopping daemon!\n");
+ /* fprintf (stderr, "Stopping daemon!\n"); */
MHD_stop_daemon (d);
if (ok != 0)
return 128;
--
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: Improved compatibility with old compilers,
gnunet <=