diff options
-rw-r--r-- | source4/build/pidl/com_header.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/dcom_proxy.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/eth_header.pm | 1 | ||||
-rw-r--r-- | source4/build/pidl/eth_parser.pm | 4 | ||||
-rw-r--r-- | source4/build/pidl/idl.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/idl.yp | 2 | ||||
-rw-r--r-- | source4/build/pidl/ndr.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/ndr_header.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/ndr_parser.pm | 4 | ||||
-rwxr-xr-x | source4/build/pidl/pidl.pl | 92 | ||||
-rw-r--r-- | source4/build/pidl/test.pm | 2 | ||||
-rwxr-xr-x | source4/build/pidl/tests/ndr_align.pl | 2 | ||||
-rwxr-xr-x | source4/build/pidl/tests/ndr_alloc.pl | 2 | ||||
-rwxr-xr-x | source4/build/pidl/tests/ndr_array.pl | 47 | ||||
-rwxr-xr-x | source4/build/pidl/tests/ndr_refptr.pl | 2 | ||||
-rwxr-xr-x | source4/build/pidl/tests/ndr_simple.pl | 2 | ||||
-rwxr-xr-x | source4/build/pidl/tests/ndr_string.pl | 2 | ||||
-rw-r--r-- | source4/build/smb_build/config_mk.pm | 2 | ||||
-rw-r--r-- | source4/build/smb_build/core.m4 | 4 | ||||
-rw-r--r-- | source4/build/smb_build/main.pm | 12 | ||||
-rwxr-xr-x | source4/script/tests/test_pidl.sh | 1 |
21 files changed, 118 insertions, 73 deletions
diff --git a/source4/build/pidl/com_header.pm b/source4/build/pidl/com_header.pm index 1e5f338828..1e178eed85 100644 --- a/source4/build/pidl/com_header.pm +++ b/source4/build/pidl/com_header.pm @@ -3,7 +3,7 @@ package COMHeader; -use typelist; +use pidl::typelist; use strict; diff --git a/source4/build/pidl/dcom_proxy.pm b/source4/build/pidl/dcom_proxy.pm index 3d46064548..bb45f774ef 100644 --- a/source4/build/pidl/dcom_proxy.pm +++ b/source4/build/pidl/dcom_proxy.pm @@ -6,7 +6,7 @@ package DCOMProxy; -use com_header; +use pidl::com_header; use strict; diff --git a/source4/build/pidl/eth_header.pm b/source4/build/pidl/eth_header.pm index 2e0397df37..229b4f8051 100644 --- a/source4/build/pidl/eth_header.pm +++ b/source4/build/pidl/eth_header.pm @@ -7,7 +7,6 @@ package EthHeader; use strict; -use typelist; my($res); my($tab_depth); diff --git a/source4/build/pidl/eth_parser.pm b/source4/build/pidl/eth_parser.pm index d0a4ae7c66..43ed8b841a 100644 --- a/source4/build/pidl/eth_parser.pm +++ b/source4/build/pidl/eth_parser.pm @@ -8,8 +8,8 @@ package EthParser; use strict; -use typelist; -use ndr; +use pidl::typelist; +use pidl::ndr; # the list of needed functions diff --git a/source4/build/pidl/idl.pm b/source4/build/pidl/idl.pm index 21c06ab200..156a3435e6 100644 --- a/source4/build/pidl/idl.pm +++ b/source4/build/pidl/idl.pm @@ -2390,7 +2390,7 @@ sub #line 305 "build/pidl/idl.yp" -use util; +use pidl::util; sub _Error { if (exists $_[0]->YYData->{ERRMSG}) { diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp index 2b839b0e21..e283237627 100644 --- a/source4/build/pidl/idl.yp +++ b/source4/build/pidl/idl.yp @@ -304,7 +304,7 @@ optional_semicolon: # start code %% -use util; +use pidl::util; sub _Error { if (exists $_[0]->YYData->{ERRMSG}) { diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm index a7c10d4906..98e3d2b4bc 100644 --- a/source4/build/pidl/ndr.pm +++ b/source4/build/pidl/ndr.pm @@ -8,7 +8,7 @@ package Ndr; use strict; -use typelist; +use pidl::typelist; ##################################################################### # return a table describing the order in which the parts of an element diff --git a/source4/build/pidl/ndr_header.pm b/source4/build/pidl/ndr_header.pm index 05265bbf5b..576361260f 100644 --- a/source4/build/pidl/ndr_header.pm +++ b/source4/build/pidl/ndr_header.pm @@ -7,7 +7,7 @@ package NdrHeader; use strict; -use typelist; +use pidl::typelist; my($res); my($tab_depth); diff --git a/source4/build/pidl/ndr_parser.pm b/source4/build/pidl/ndr_parser.pm index f94de5e2be..be663269f8 100644 --- a/source4/build/pidl/ndr_parser.pm +++ b/source4/build/pidl/ndr_parser.pm @@ -8,8 +8,8 @@ package NdrParser; use strict; -use typelist; -use ndr; +use pidl::typelist; +use pidl::ndr; # list of known types my %typefamily; diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index c7b98a0d34..478c7a273a 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -10,28 +10,27 @@ use strict; use FindBin qw($RealBin); -use lib "$RealBin"; -use lib "$RealBin/lib"; +use lib "$RealBin/.."; use Getopt::Long; use File::Basename; -use idl; -use dump; -use ndr_client; -use ndr_header; -use ndr_parser; -use server; -use dcom_proxy; -use dcom_stub; -use com_header; -use odl; -use eth_parser; -use eth_header; -use validator; -use typelist; -use util; -use template; -use swig; -use compat; +use pidl::idl; +use pidl::dump; +use pidl::ndr_client; +use pidl::ndr_header; +use pidl::ndr_parser; +use pidl::server; +use pidl::dcom_proxy; +use pidl::dcom_stub; +use pidl::com_header; +use pidl::odl; +use pidl::eth_parser; +use pidl::eth_header; +use pidl::validator; +use pidl::typelist; +use pidl::util; +use pidl::template; +use pidl::swig; +use pidl::compat; my($opt_help) = 0; my($opt_parse) = 0; @@ -59,33 +58,32 @@ my $idl_parser = new idl; # display help text sub ShowHelp() { - print " - perl IDL parser and code generator - Copyright (C) tridge\@samba.org - - Usage: pidl.pl [options] <idlfile> - - Options: - --help this help page - --output=OUTNAME put output in OUTNAME.* - --parse parse a idl file to a .pidl file - --dump dump a pidl file back to idl - --header[=OUTFILE] create a C NDR header file - --parser[=OUTFILE] create a C NDR parser - --client create a C NDR client - --server create server boilerplate - --template print a template for a pipe - --eth-parser create an ethereal parser - --eth-header create an ethereal header file - --swig create swig wrapper file - --diff run diff on the idl and dumped output - --keep keep the .pidl file - --odl accept ODL input - --dcom-proxy create DCOM proxy (implies --odl) - --com-header create header for COM interfaces (implies --odl) - --warn-compat warn about incompatibility with other compilers - --quiet be quiet - \n"; +print "perl IDL parser and code generator +Copyright (C) tridge\@samba.org + +Usage: pidl.pl [options] <idlfile> + +Options: + --help this help page + --output=OUTNAME put output in OUTNAME.* + --parse parse a idl file to a .pidl file + --dump dump a pidl file back to idl + --header[=OUTFILE] create a C NDR header file + --parser[=OUTFILE] create a C NDR parser + --client create a C NDR client + --server create server boilerplate + --template print a template for a pipe + --eth-parser create an ethereal parser + --eth-header create an ethereal header file + --swig create swig wrapper file + --diff run diff on the idl and dumped output + --keep keep the .pidl file + --odl accept ODL input + --dcom-proxy create DCOM proxy (implies --odl) + --com-header create header for COM interfaces (implies --odl) + --warn-compat warn about incompatibility with other compilers + --quiet be quiet +\n"; exit(0); } diff --git a/source4/build/pidl/test.pm b/source4/build/pidl/test.pm index 5f25d4195c..ba102aab12 100644 --- a/source4/build/pidl/test.pm +++ b/source4/build/pidl/test.pm @@ -5,7 +5,7 @@ package Test; use strict; -use util; +use pidl::util; use Getopt::Long; my $cc = $ENV{CC}; diff --git a/source4/build/pidl/tests/ndr_align.pl b/source4/build/pidl/tests/ndr_align.pl index 03b09e8758..1796c045f5 100755 --- a/source4/build/pidl/tests/ndr_align.pl +++ b/source4/build/pidl/tests/ndr_align.pl @@ -4,7 +4,7 @@ use strict; use FindBin qw($RealBin); -use lib "$RealBin/.."; +use lib "$RealBin/../.."; use test; my %settings = Test::GetSettings(@ARGV); diff --git a/source4/build/pidl/tests/ndr_alloc.pl b/source4/build/pidl/tests/ndr_alloc.pl index 7918f312d4..d382759930 100755 --- a/source4/build/pidl/tests/ndr_alloc.pl +++ b/source4/build/pidl/tests/ndr_alloc.pl @@ -4,7 +4,7 @@ use strict; use FindBin qw($RealBin); -use lib "$RealBin/.."; +use lib "$RealBin/../.."; use test; my %settings = Test::GetSettings(@ARGV); diff --git a/source4/build/pidl/tests/ndr_array.pl b/source4/build/pidl/tests/ndr_array.pl new file mode 100755 index 0000000000..bd78f3432a --- /dev/null +++ b/source4/build/pidl/tests/ndr_array.pl @@ -0,0 +1,47 @@ +#!/usr/bin/perl +# Array testing +# (C) 2005 Jelmer Vernooij <jelmer@samba.org> +# Published under the GNU General Public License +use strict; + +use FindBin qw($RealBin); +use lib "$RealBin/../.."; +use test; + +my %settings = Test::GetSettings(@ARGV); +$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h']; +$settings{'IncludeFiles'} = ['ndr_test.h']; +$settings{'ExtraFiles'} = ['ndr_test.c']; + +Test::test_idl( + # Name + 'Fixed-Array', + + # Settings + \%settings, + + # IDL + '[public] void Test([in] uint8 x[10]);', + + # C Test + ' + uint8_t data[] = {1,2,3,4,5,6,7,8,9,10}; + int i; + DATA_BLOB b; + struct ndr_pull *ndr; + struct Test r; + + b.data = data; + b.length = 10; + ndr = ndr_pull_init_blob(&b, mem_ctx); + + if (NT_STATUS_IS_ERR(ndr_pull_Test(ndr, NDR_IN, &r))) + return 1; + + if (ndr->offset != 10) + return 2; + + for (i = 0; i < 10; i++) { + if (r.in.x[i] != i+1) return 3; + } +'); diff --git a/source4/build/pidl/tests/ndr_refptr.pl b/source4/build/pidl/tests/ndr_refptr.pl index 59ebd295f6..d42a34d1b0 100755 --- a/source4/build/pidl/tests/ndr_refptr.pl +++ b/source4/build/pidl/tests/ndr_refptr.pl @@ -6,7 +6,7 @@ use strict; use FindBin qw($RealBin); -use lib "$RealBin/.."; +use lib "$RealBin/../.."; use test; my %settings = Test::GetSettings(@ARGV); diff --git a/source4/build/pidl/tests/ndr_simple.pl b/source4/build/pidl/tests/ndr_simple.pl index 7049dfa68d..de2f34383e 100755 --- a/source4/build/pidl/tests/ndr_simple.pl +++ b/source4/build/pidl/tests/ndr_simple.pl @@ -5,7 +5,7 @@ use strict; use FindBin qw($RealBin); -use lib "$RealBin/.."; +use lib "$RealBin/../.."; use test; my %settings = Test::GetSettings(@ARGV); diff --git a/source4/build/pidl/tests/ndr_string.pl b/source4/build/pidl/tests/ndr_string.pl index 9ea4ca42b6..1c75eb90cc 100755 --- a/source4/build/pidl/tests/ndr_string.pl +++ b/source4/build/pidl/tests/ndr_string.pl @@ -5,7 +5,7 @@ use strict; use FindBin qw($RealBin); -use lib "$RealBin/.."; +use lib "$RealBin/../.."; use test; my %settings = Test::GetSettings(@ARGV); diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index 36ce80a8eb..f6e2e4bdcd 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -7,7 +7,7 @@ ########################################################### package config_mk; -use input; +use smb_build::input; use strict; diff --git a/source4/build/smb_build/core.m4 b/source4/build/smb_build/core.m4 index 1ef6eea3ad..215ca5195e 100644 --- a/source4/build/smb_build/core.m4 +++ b/source4/build/smb_build/core.m4 @@ -19,12 +19,12 @@ dnl ) AC_DEFUN([_SMB_BUILD_CORE], [ -$PERL -I$srcdir/build/smb_build <<\_SMB_ACEOF +$PERL -I$srcdir/build <<\_SMB_ACEOF use strict; my %INPUT; -use main; +use smb_build::main; ########################################################### ### First we list all info from configure ### diff --git a/source4/build/smb_build/main.pm b/source4/build/smb_build/main.pm index 620812a457..dd0487110a 100644 --- a/source4/build/smb_build/main.pm +++ b/source4/build/smb_build/main.pm @@ -6,12 +6,12 @@ ### Released under the GNU GPL ### ########################################################### -use makefile; -use smb_build_h; -use input; -use config_mk; -use output; -use dot; +use smb_build::makefile; +use smb_build::smb_build_h; +use smb_build::input; +use smb_build::config_mk; +use smb_build::output; +use smb_build::dot; use strict; sub smb_build_main($) diff --git a/source4/script/tests/test_pidl.sh b/source4/script/tests/test_pidl.sh index 07c144a65f..0fd2eb8998 100755 --- a/source4/script/tests/test_pidl.sh +++ b/source4/script/tests/test_pidl.sh @@ -4,3 +4,4 @@ ./build/pidl/tests/ndr_alloc.pl ./build/pidl/tests/ndr_refptr.pl ./build/pidl/tests/ndr_string.pl +./build/pidl/tests/ndr_array.pl |