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/callback.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/callback.c') diff --git a/src/callback.c b/src/callback.c index 47fd0e7..6337acc 100644 --- a/src/callback.c +++ b/src/callback.c @@ -119,7 +119,7 @@ out: * is set to ESRCH. If the sequence number is not the expected, errno is set * to EPROTO. */ -EXPORT_SYMBOL int +int mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq, unsigned int portid, mnl_cb_t cb_data, void *data, mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len) @@ -127,6 +127,7 @@ mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq, return __mnl_cb_run(buf, numbytes, seq, portid, cb_data, data, cb_ctl_array, cb_ctl_array_len); } +EXPORT_SYMBOL(mnl_cb_run2); /** * mnl_cb_run - callback runqueue for netlink messages (simplified version) @@ -147,12 +148,13 @@ mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq, * * This function propagates the callback return value. */ -EXPORT_SYMBOL int +int mnl_cb_run(const void *buf, size_t numbytes, unsigned int seq, unsigned int portid, mnl_cb_t cb_data, void *data) { return __mnl_cb_run(buf, numbytes, seq, portid, cb_data, data, NULL, 0); } +EXPORT_SYMBOL(mnl_cb_run); /** * @} -- cgit v1.2.3