gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 168/335: mhd_sys_options.h: use function attribute "used


From: gnunet
Subject: [libmicrohttpd] 168/335: mhd_sys_options.h: use function attribute "used"
Date: Sat, 27 Jul 2024 22:01:04 +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 d454a71f15c26c6fae3d322733eb690e31d9a068
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu May 16 14:12:16 2024 +0200

    mhd_sys_options.h: use function attribute "used"
---
 src/include/mhd_sys_options.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/include/mhd_sys_options.h b/src/include/mhd_sys_options.h
index eb351e67..3e5ad05c 100644
--- a/src/include/mhd_sys_options.h
+++ b/src/include/mhd_sys_options.h
@@ -55,6 +55,14 @@
 #  define MHD_EXPORTED __declspec(dllexport)
 #endif
 
+#if defined(HAVE_ATTR_USED) \
+  && (defined(PIC) || defined(DLL_EXPORT) || defined(MHD_W32DLL))
+/* Used externally, only for functions in shared library */
+#  define MHD_EXTERN_USED __attribute__((used))
+#else
+#  define MHD_EXTERN_USED /* empty */
+#endif
+
 #if defined(_MHD_EXTERN) && defined(BUILDING_MHD_LIB)
 #  undef _MHD_EXTERN
 #endif /* _MHD_EXTERN && BUILDING_MHD_LIB */
@@ -64,6 +72,7 @@
 /* Building MHD itself */
 #    define _MHD_EXTERN \
   extern MHD_VISIBILITY_EXTERN MHD_EXPORTED
+        extern MHD_VISIBILITY_EXTERN MHD_EXPORTED MHD_EXTERN_USED
 #  else  /* ! BUILDING_MHD_LIB */
 /* Test or example code, using MHD as a library */
 #    define _MHD_EXTERN extern

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