1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

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)
This commit is contained in:
Andrew Tridgell 2004-10-27 04:33:36 +00:00 committed by Gerald (Jerry) Carter
parent d3da369f91
commit ba450de07c

View File

@ -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 .= "}";
}