I have a clean build with the #define uint32 uint32_t removed
Richard Sharpe
realrichardsharpe at gmail.com
Wed May 13 22:36:58 MDT 2015
Hi folks,
I now have a clean build with that removed, but to achieve that, apart
from a bunch of changes in places, I had to make this change to
pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm:
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index e8d2bf9..898b4ca 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -89,6 +89,21 @@ sub AllocOutVar($$$$$)
pidl "";
}
+my %retTypes = (
+ "uint32" => "uint32_t",
+ "uint16" => "uint16_t",
+ "uint8" => "uint8_t"
+);
+
+sub convertRetType($)
+{
+ my $name = shift;
+
+ return $retTypes{$name} if defined($retTypes{$name});
+
+ return $name;
+}
+
sub CallWithStruct($$$$)
{
my ($pipes_struct, $mem_ctx, $fn, $fail) = @_;
@@ -124,7 +139,7 @@ sub CallWithStruct($$$$)
if ($fn->{RETURN_TYPE}) {
$ret = "r->out.result = $ret";
- $proto = "$fn->{RETURN_TYPE} $proto";
+ $proto = convertRetType($fn->{RETURN_TYPE}) . " $proto";
} else {
$proto = "void $proto";
}
Can anyone opine on whether it looks OK?
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
More information about the samba-technical
mailing list