summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm b/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
index 3bdb701526..7e597dfb34 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
@@ -5,6 +5,7 @@
package Parse::Pidl::Samba4::TDR;
use Parse::Pidl::Util qw(has_property ParseExpr is_constant);
+use Parse::Pidl::Samba4 qw(is_intree choose_header);
use vars qw($VERSION);
$VERSION = '0.01';
@@ -237,12 +238,21 @@ sub Parser($$$)
my ($idl,$hdrname,$baseheader) = @_;
$ret = ""; $ret_hdr = "";
pidl "/* autogenerated by pidl */";
- pidl "#include \"includes.h\"";
+ if (is_intree()) {
+ pidl "#include \"includes.h\"";
+ } else {
+ pidl "#include <stdio.h>";
+ pidl "#include <stdlib.h>";
+ pidl "#include <stdint.h>";
+ pidl "#include <stdarg.h>";
+ pidl "#include <string.h>";
+ pidl "#include <core/nterr.h>";
+ }
pidl "#include \"$hdrname\"";
pidl "";
pidl_hdr "/* autogenerated by pidl */";
pidl_hdr "#include \"$baseheader\"";
- pidl_hdr "#include \"tdr/tdr.h\"";
+ pidl_hdr choose_header("tdr/tdr.h", "tdr.h");
pidl_hdr "";
foreach (@$idl) { ParserInterface($_) if ($_->{TYPE} eq "INTERFACE"); }