From eb7535ee4459b4422105ef65abef5bde1c83e472 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 3 Feb 2011 10:29:03 +0100 Subject: doc: don't show up EXPORT_SYMBOL in doxygen Patrick reports that the doxygen output shows up EXPORT_SYMBOL and tells how to fix this: > I just noticed the EXPORT_SYMBOLs in libmnl showing up in > the doxygen output. Just in case you want to avoid this, > what I'm doing in libdect is (besides the appopriate linker > flags): > > #define __visible __attribute__((visibility("default"))) > > #define EXPORT_SYMBOL(x) typeof(x) (x) __visible > > > This allows to use EXPORT_SYMBOL as in the kernel, IOW > after the function definition. This patch also removes -Wredundant-decls to avoid a warning in every single use of this new approach. Now, this looks more like the Linux kernel way of exporting symbols. Reported-by: Patrick McHardy Signed-off-by: Pablo Neira Ayuso --- src/internal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/internal.h') diff --git a/src/internal.h b/src/internal.h index ed8028f..3a88d1a 100644 --- a/src/internal.h +++ b/src/internal.h @@ -3,9 +3,10 @@ #include "config.h" #ifdef HAVE_VISIBILITY_HIDDEN -# define EXPORT_SYMBOL __attribute__((visibility("default"))) +# define __visible __attribute__((visibility("default"))) +# define EXPORT_SYMBOL(x) typeof(x) (x) __visible #else # define EXPORT_SYMBOL #endif -#endif \ No newline at end of file +#endif -- cgit v1.2.3