]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pidl: Add headerhelper idl property
authorVolker Lendecke <vl@samba.org>
Fri, 23 Aug 2024 14:39:58 +0000 (16:39 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 27 Aug 2024 07:19:32 +0000 (07:19 +0000)
Add includes to for example misc.h if needed, so that misc.h can be
directly included without prerequisites

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jennifer Sutton <jsutton@samba.org>
pidl/lib/Parse/Pidl/NDR.pm
pidl/lib/Parse/Pidl/Samba4/Header.pm

index 18db6cfe258a476ef426ce4f9b8fd39ad4997276..3cb72aa3e9a06563dcd2aba8c49b505d2e24362b 100644 (file)
@@ -1118,6 +1118,7 @@ my %property_list = (
        "endpoint"              => ["INTERFACE"],
        "pointer_default"       => ["INTERFACE"],
        "helper"                => ["INTERFACE"],
+       "headerhelper"          => ["INTERFACE"],
        "pyhelper"              => ["INTERFACE"],
        "authservice"           => ["INTERFACE"],
        "restricted"            => ["INTERFACE"],
index aef3338e90bdf57acce0bc0d61cfb346265442bd..137dc27514ecbbb7fe8bd08737f74ffd24e53fcd 100644 (file)
@@ -401,6 +401,13 @@ sub HeaderInterface($)
        pidl "#ifndef _HEADER_$interface->{NAME}\n";
        pidl "#define _HEADER_$interface->{NAME}\n\n";
 
+       if (has_property($interface, "headerhelper")) {
+           foreach my $h (split /,/, $interface->{PROPERTIES}->{headerhelper}) {
+               pidl("#include $h\n");
+           }
+           pidl("\n");
+       }
+
        foreach my $c (@{$interface->{CONSTS}}) {
                HeaderConst($c);
        }