gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 135/335: microhttpd2.h: workaround for uncrustify bug


From: gnunet
Subject: [libmicrohttpd] 135/335: microhttpd2.h: workaround for uncrustify bug
Date: Sat, 27 Jul 2024 22:00:31 +0200

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

grothoff pushed a commit to tag stf-m2
in repository libmicrohttpd.

commit 84818782594265f98d693e233da01168005120ed
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Apr 8 15:48:32 2024 +0200

    microhttpd2.h: workaround for uncrustify bug
    
    Also worked around Emasecns autoindent and makes the code more readable
---
 src/include/microhttpd2.h | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index 18027efc..7e324f88 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -142,14 +142,18 @@
 #ifndef MICROHTTPD2_H
 #define MICROHTTPD2_H
 
+#ifndef __cplusplus
+#  define MHD_C_DECLRATIONS_START_HERE_   /* Empty */
+#  define MHD_C_DECLRATIONS_FINISH_HERE_  /* Empty */
+#else  /* __cplusplus */
+/* *INDENT-OFF* */
+#  define MHD_C_DECLRATIONS_START_HERE_   extern "C" {
+#  define MHD_C_DECLRATIONS_FINISH_HERE_  }
+/* *INDENT-ON* */
+#endif /* __cplusplus */
 
-#ifdef __cplusplus
-extern "C"
-{
-#if 0                           /* keep Emacsens' auto-indent happy */
-}
-#endif
-#endif
+
+MHD_C_DECLRATIONS_START_HERE_
 
 /* While we generally would like users to use a configure-driven
    build process which detects which headers are present and
@@ -6542,10 +6546,9 @@ MHD_NOWARN_VARIADIC_MACROS_
                           MHD_OPTIONS_ARRAY_MAX_SIZE)                     \
   MHD_RESTORE_WARN_COMPOUND_LITERALS_
 #  elif defined(MHD_USE_CPP_INIT_LIST)
-} /* extern "C" */
+MHD_C_DECLRATIONS_FINISH_HERE_
 #    include <vector>
-extern "C"
-{
+MHD_C_DECLRATIONS_START_HERE_
 /**
  * Set the requested options for the daemon.
  *
@@ -6885,10 +6888,9 @@ MHD_NOWARN_VARIADIC_MACROS_
                               MHD_OPTIONS_ARRAY_MAX_SIZE)                      
   \
   MHD_RESTORE_WARN_COMPOUND_LITERALS_
 #  elif defined(MHD_USE_CPP_INIT_LIST)
-} /* extern "C" */
+MHD_C_DECLRATIONS_FINISH_HERE_
 #    include <vector>
-extern "C"
-{
+MHD_C_DECLRATIONS_START_HERE_
 /**
  * Set the requested options for the connection.
  *
@@ -8161,10 +8163,9 @@ MHD_NOWARN_VARIADIC_MACROS_
                             MHD_OPTIONS_ARRAY_MAX_SIZE)                        
 \
   MHD_RESTORE_WARN_COMPOUND_LITERALS_
 #  elif defined(MHD_USE_CPP_INIT_LIST)
-} /* extern "C" */
+MHD_C_DECLRATIONS_FINISH_HERE_
 #    include <vector>
-extern "C"
-{
+MHD_C_DECLRATIONS_START_HERE_
 /**
  * Set the requested options for the daemon.
  *
@@ -11674,5 +11675,6 @@ MHD_lib_set_panic_func (MHD_PanicCallback cb,
 #define MHD_lib_set_panic_func_default() \
   MHD_lib_set_panic_func (MHD_STATIC_CAST_ (MHD_PanicCallback,NULL),NULL)
 
+MHD_C_DECLRATIONS_FINISH_HERE_
 
-#endif
+#endif /* ! MICROHTTPD2_H */

-- 
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]