summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-09-07 20:24:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:53 -0500
commit25819cfabcb72bfa397cd7bb49700ec80433670e (patch)
tree2f01edd42c00775d0f34020430082cbb54c9f14a /source4/pidl/lib/Parse/Pidl/Samba4
parent433ec0ba664c9eb53b26550e25973e2fc538646b (diff)
downloadsamba-25819cfabcb72bfa397cd7bb49700ec80433670e.tar.gz
samba-25819cfabcb72bfa397cd7bb49700ec80433670e.tar.bz2
samba-25819cfabcb72bfa397cd7bb49700ec80433670e.zip
r18231: Don't use _PUBLIC_ but use __attribute__ directly instead.
(This used to be commit 77043ebe25dcca2a6b1a37d3b6095e9c434652d9)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 9e4388e28d..d409450a80 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -208,7 +208,8 @@ sub fn_declare($$$)
if (has_property($fn, "public")) {
pidl_hdr "$decl;";
- pidl "_PUBLIC_ $decl";
+ pidl "__attribute__((visibility(\"default\")))";
+ pidl "$decl";
} else {
pidl "static $decl";
}
@@ -1879,7 +1880,8 @@ sub ParseTypedefPrint($)
return if (has_property($e, "noprint"));
- pidl "_PUBLIC_ void ndr_print_$e->{NAME}(struct ndr_print *ndr, const char *name, $args)";
+ pidl "__attribute__((visibility(\"default\")))";
+ pidl "void ndr_print_$e->{NAME}(struct ndr_print *ndr, const char *name, $args)";
pidl "{";
indent;
$typefamily{$e->{DATA}->{TYPE}}->{PRINT_FN_BODY}->($e->{DATA}, $e->{NAME});
@@ -1917,7 +1919,8 @@ sub ParseFunctionPrint($)
return if has_property($fn, "noprint");
- pidl "_PUBLIC_ void ndr_print_$fn->{NAME}(struct ndr_print *ndr, const char *name, int flags, const struct $fn->{NAME} *r)";
+ pidl "__attribute__((visibility(\"default\")))";
+ pidl "void ndr_print_$fn->{NAME}(struct ndr_print *ndr, const char *name, int flags, const struct $fn->{NAME} *r)";
pidl "{";
indent;
@@ -2380,6 +2383,11 @@ sub GenerateIncludes()
pidl choose_header("librpc/gen_ndr/ndr_dcerpc.h", "gen_ndr/ndr_dcerpc.h");
pidl choose_header("librpc/rpc/dcerpc.h", "dcerpc.h"); #FIXME: This shouldn't be here!
}
+
+ pidl "/* define dummy __attribute__ for systems that don't have it */";
+ pidl "#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__))";
+ pidl "#define __attribute__(p) /* nothing */";
+ pidl "#endif";
}
#####################################################################