svn commit: samba r14491 - in
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4: . NDR
jelmer at samba.org
jelmer at samba.org
Thu Mar 16 21:35:35 GMT 2006
Author: jelmer
Date: 2006-03-16 21:35:31 +0000 (Thu, 16 Mar 2006)
New Revision: 14491
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14491
Log:
Allow building more output outside of the Samba source tree
Modified:
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2006-03-16 21:05:21 UTC (rev 14490)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2006-03-16 21:35:31 UTC (rev 14491)
@@ -351,7 +351,7 @@
%headerstructs = ();
pidl "/* header auto-generated by pidl */\n\n";
if (!is_intree()) {
- pidl "#include <core.h>";
+ pidl "#include <core.h>\n\n";
}
foreach (@{$idl}) {
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm 2006-03-16 21:05:21 UTC (rev 14490)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm 2006-03-16 21:35:31 UTC (rev 14491)
@@ -5,6 +5,8 @@
package Parse::Pidl::Samba4::NDR::Client;
+use Parse::Pidl::Samba4 qw(choose_header is_intree);
+
use vars qw($VERSION);
$VERSION = '0.01';
@@ -97,12 +99,21 @@
$res .= "/* client functions auto-generated by pidl */\n";
$res .= "\n";
- $res .= "#include \"includes.h\"\n";
+ if (is_intree()) {
+ $res .= "#include \"includes.h\"\n";
+ } else {
+ $res .= "#define _GNU_SOURCE\n";
+ $res .= "#include <stdio.h>\n";
+ $res .= "#include <stdlib.h>\n";
+ $res .= "#include <stdint.h>\n";
+ $res .= "#include <stdarg.h>\n";
+ $res .= "#include <core/nterr.h>\n";
+ }
$res .= "#include \"$ndr_header\"\n";
$res .= "#include \"$client_header\"\n";
$res .= "\n";
- $res_hdr .= "#include \"librpc/rpc/dcerpc.h\"\n";
+ $res_hdr .= choose_header("librpc/rpc/dcerpc.h", "dcerpc.h")."\n";
$res_hdr .= "#include \"$header\"\n";
foreach my $x (@{$ndr}) {
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm 2006-03-16 21:05:21 UTC (rev 14490)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm 2006-03-16 21:35:31 UTC (rev 14491)
@@ -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 @@
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"); }
More information about the samba-cvs
mailing list