diff options
Diffstat (limited to 'source4/build/pidl/pidl.pl')
-rwxr-xr-x | source4/build/pidl/pidl.pl | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index c430c75236..6d0ff69081 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -205,15 +205,23 @@ $dcom } if ($opt_eparser) { - my($parser) = dirname($output) . "/packet-dcerpc-$basename.c"; - IdlEParser::Parse($pidl, $parser); - $parser = dirname($output) . "/packet-dcerpc-proto-$basename.h"; - IdlEParser::ParseHeader($pidl, $parser); - my($header) = dirname($output) . "/packet-dcerpc-proto.h"; - open(OUT, ">>$header") || die "can't open $header"; - print OUT "#include \"ndr_$basename.h\"\n"; - print OUT "#include \"packet-dcerpc-proto-$basename.h\"\n"; - close(OUT); + + # Generate regular .c and .h files for marshaling and + # unmarshaling. + + my($parser) = util::ChangeExtension($output, ".c"); + IdlParser::Parse($pidl, $parser); + + my($header) = util::ChangeExtension($output, ".h"); + util::FileSave($header, IdlHeader::Parse($pidl)); + + # Postprocess to produce ethereal parsers. + + my($eparser) = dirname($output) . "/packet-dcerpc-$basename.c"; + IdlEParser::RewriteC($pidl, $parser, $eparser); + + my($eparserhdr) = dirname($output) . "/packet-dcerpc-$basename.h"; + IdlEParser::RewriteHeader($pidl, $header, $eparserhdr); } if ($opt_swig) { |