gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 01/03: init refactoring: always call MHD_send_init_stati


From: gnunet
Subject: [libmicrohttpd] 01/03: init refactoring: always call MHD_send_init_static_vars_()
Date: Fri, 16 Apr 2021 13:24:05 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit a1371a29ec0918070dfd243f626f202d5a9a95e1
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Apr 15 21:45:02 2021 +0300

    init refactoring: always call MHD_send_init_static_vars_()
---
 src/microhttpd/daemon.c   | 2 --
 src/microhttpd/mhd_send.c | 8 +++++---
 src/microhttpd/mhd_send.h | 3 ---
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d3b9958d..fde1703d 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -8015,9 +8015,7 @@ MHD_init (void)
   gnutls_global_init ();
 #endif /* HTTPS_SUPPORT */
   MHD_monotonic_sec_counter_init ();
-#ifdef HAVE_FREEBSD_SENDFILE
   MHD_send_init_static_vars_ ();
-#endif /* HAVE_FREEBSD_SENDFILE */
   MHD_init_mem_pools_ ();
 }
 
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 3810e121..10c95117 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -82,6 +82,9 @@ static int freebsd_sendfile_flags_;
  */
 static int freebsd_sendfile_flags_thd_p_c_;
 #endif /* SF_FLAGS */
+#endif /* HAVE_FREEBSD_SENDFILE */
+
+
 /**
  * Initialises static variables
  */
@@ -91,6 +94,7 @@ MHD_send_init_static_vars_ (void)
 /* FreeBSD 11 and later allow to specify read-ahead size
  * and handles SF_NODISKIO differently.
  * SF_FLAGS defined only on FreeBSD 11 and later. */
+#ifdef HAVE_FREEBSD_SENDFILE
 #ifdef SF_FLAGS
   long sys_page_size = sysconf (_SC_PAGESIZE);
   if (0 >= sys_page_size)
@@ -108,10 +112,8 @@ MHD_send_init_static_vars_ (void)
                             / sys_page_size), SF_NODISKIO);
   }
 #endif /* SF_FLAGS */
-}
-
-
 #endif /* HAVE_FREEBSD_SENDFILE */
+}
 
 
 bool
diff --git a/src/microhttpd/mhd_send.h b/src/microhttpd/mhd_send.h
index d4ee8de7..57f6319b 100644
--- a/src/microhttpd/mhd_send.h
+++ b/src/microhttpd/mhd_send.h
@@ -46,15 +46,12 @@
 #define MHD_VECT_SEND 1
 #endif /* HAVE_SENDMSG || HAVE_WRITEV || MHD_WINSOCK_SOCKETS */
 
-#ifdef HAVE_FREEBSD_SENDFILE
 /**
  * Initialises static variables
  */
 void
 MHD_send_init_static_vars_ (void);
 
-#endif /* HAVE_FREEBSD_SENDFILE */
-
 
 /**
  * Send buffer to the client, push data from network buffer if requested

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]