summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-27 04:33:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:49 -0500
commitba450de07c08c7a5a803e59b7133c06e2f0b9682 (patch)
treea444069bfdbc072c0b82413c2611d9a430322a65 /source4/build
parentd3da369f91359f90c2b1d4f66e24615ef07e6bed (diff)
downloadsamba-ba450de07c08c7a5a803e59b7133c06e2f0b9682.tar.gz
samba-ba450de07c08c7a5a803e59b7133c06e2f0b9682.tar.bz2
samba-ba450de07c08c7a5a803e59b7133c06e2f0b9682.zip
r3281: some compilers can't handle empty structures, so for empty IDL
structures generate a single _empty_ element in the header (This used to be commit 00ff1ca1d284bb698e98c773b18a29695e927605)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/header.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index 848ceab9b0..56f3503e5d 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -75,11 +75,17 @@ sub HeaderStruct($$)
my($name) = shift;
$res .= "\nstruct $name {\n";
$tab_depth++;
+ my $el_count=0;
if (defined $struct->{ELEMENTS}) {
foreach my $e (@{$struct->{ELEMENTS}}) {
HeaderElement($e);
+ $el_count++;
}
}
+ if ($el_count == 0) {
+ # some compilers can't handle empty structures
+ $res .= "\tchar _empty_;\n";
+ }
$tab_depth--;
$res .= "}";
}