From ba450de07c08c7a5a803e59b7133c06e2f0b9682 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 27 Oct 2004 04:33:36 +0000 Subject: 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) --- source4/build/pidl/header.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4') 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 .= "}"; } -- cgit