From 97f372003869e8ad1f4e2f673c59f7f0d563346a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 Dec 2008 22:58:10 +0100 Subject: Don't write out forward declarations for enums, as some compilers don't seem to like it. --- pidl/lib/Parse/Pidl/Samba4/Header.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pidl/lib/Parse/Pidl/Samba4') diff --git a/pidl/lib/Parse/Pidl/Samba4/Header.pm b/pidl/lib/Parse/Pidl/Samba4/Header.pm index 611f0adb92..94e1efbfe4 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -226,6 +226,8 @@ sub HeaderType($$$;$) sub HeaderTypedef($;$) { my($typedef,$tail) = @_; + # Don't print empty "enum foo;", since some compilers don't like it. + return if ($typedef->{DATA}->{TYPE} eq "ENUM" and not defined($typedef->{DATA}->{ELEMENTS})); HeaderType($typedef, $typedef->{DATA}, $typedef->{NAME}, $tail) if defined ($typedef->{DATA}); } -- cgit