summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/header.pm3
-rw-r--r--source4/build/pidl/swig.pm3
-rw-r--r--source4/build/pidl/util.pm10
3 files changed, 14 insertions, 2 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index 56f3503e5d..f9acc5e222 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -280,7 +280,8 @@ sub HeaderInterface($)
if (defined $interface->{PROPERTIES}->{uuid}) {
my $name = uc $interface->{NAME};
- $res .= "#define DCERPC_$name\_UUID \"$interface->{PROPERTIES}->{uuid}\"\n";
+ $res .= "#define DCERPC_$name\_UUID " .
+ util::make_str($interface->{PROPERTIES}->{uuid}) . "\n";
if(!defined $interface->{PROPERTIES}->{version}) { $interface->{PROPERTIES}->{version} = "0.0"; }
$res .= "#define DCERPC_$name\_VERSION $interface->{PROPERTIES}->{version}\n";
diff --git a/source4/build/pidl/swig.pm b/source4/build/pidl/swig.pm
index 0ba654538d..f0bb413a3b 100644
--- a/source4/build/pidl/swig.pm
+++ b/source4/build/pidl/swig.pm
@@ -662,7 +662,8 @@ sub ParseHeader($)
if ($hdr->{PROPERTIES}{uuid}) {
my($name) = $hdr->{NAME};
- $result .= "#define DCERPC_" . uc($name) . "_UUID \"$hdr->{PROPERTIES}->{uuid}\"\n";
+ $result .= "#define DCERPC_" . uc($name) . "_UUID " .
+ util::make_str($hdr->{PROPERTIES}->{uuid}) . "\n";
$result .= "const int DCERPC_" . uc($name) . "_VERSION = " . $hdr->{PROPERTIES}->{version} . ";\n";
$result .= "#define DCERPC_" . uc($name) . "_NAME \"" . $name . "\"\n";
$result .= "\n";
diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm
index 5934f8a7e1..5fbca25220 100644
--- a/source4/build/pidl/util.pm
+++ b/source4/build/pidl/util.pm
@@ -390,5 +390,15 @@ sub is_inline_array($)
return 0;
}
+# return a "" quoted string, unless already quoted
+sub make_str($)
+{
+ my $str = shift;
+ if (substr($str, 0, 1) eq "\"") {
+ return $str;
+ }
+ return "\"" . $str . "\"";
+}
+
1;