summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-20 05:39:54 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-20 05:39:54 +0000
commit9fb8ee5765a60ddd1d559df251254b32a6d81847 (patch)
tree2ec50370d63e30e0cd81f7e267d53ca309383ad8 /source4
parenta6e5654b3dbfcefde863dead8031630ae476b5b9 (diff)
downloadsamba-9fb8ee5765a60ddd1d559df251254b32a6d81847.tar.gz
samba-9fb8ee5765a60ddd1d559df251254b32a6d81847.tar.bz2
samba-9fb8ee5765a60ddd1d559df251254b32a6d81847.zip
* cope with pidl not being in $HOME/pidl
* cope with empty structures in unions (This used to be commit a706ff78937bea64acd28381466770749566399f)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/pidl/parser.pm8
-rwxr-xr-xsource4/build/pidl/pidl.pl4
2 files changed, 9 insertions, 3 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index e06f3d4288..9d05f7f922 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -115,7 +115,9 @@ sub struct_alignment
if ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "STRUCT") {
$a = struct_alignment($structs{$e->{TYPE}}->{DATA});
} elsif ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "UNION") {
- $a = union_alignment($structs{$e->{TYPE}}->{DATA});
+ if (defined $structs{$e->{TYPE}}->{DATA}) {
+ $a = union_alignment($structs{$e->{TYPE}}->{DATA});
+ }
}
} else {
$a = util::type_align($e);
@@ -140,6 +142,10 @@ sub union_alignment
foreach my $e (@{$u->{DATA}}) {
my $a = 1;
+ if ($e->{TYPE} eq "EMPTY") {
+ next;
+ }
+
if (!util::need_wire_pointer($e)
&& defined $structs{$e->{DATA}->{TYPE}}) {
my $s = $structs{$e->{DATA}->{TYPE}};
diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl
index 484223d4aa..f68a722382 100755
--- a/source4/build/pidl/pidl.pl
+++ b/source4/build/pidl/pidl.pl
@@ -8,8 +8,8 @@
use strict;
-use lib "$ENV{HOME}/pidl";
-
+use FindBin qw($RealBin);
+use lib "$RealBin";
use Getopt::Long;
use idl;
use dump;