diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-27 04:33:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:49 -0500 |
commit | ba450de07c08c7a5a803e59b7133c06e2f0b9682 (patch) | |
tree | a444069bfdbc072c0b82413c2611d9a430322a65 /source4 | |
parent | d3da369f91359f90c2b1d4f66e24615ef07e6bed (diff) | |
download | samba-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')
-rw-r--r-- | source4/build/pidl/header.pm | 6 |
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 .= "}"; } |