The attached provides the special handling needed for C compiler defines
in ExtUtils::CBuilder. This is against blead but I'm hoping the right
number after -p supplied to patch will apply cleanly to the CPAN version
(which is separately maintained, right?).
--- lib/ExtUtils/CBuilder/Platform/VMS.pm;-0    Wed Sep 28 19:54:07 2005
+++ lib/ExtUtils/CBuilder/Platform/VMS.pm       Sat Mar 11 17:53:09 2006
@@ -9,6 +9,21 @@ $VERSION = '0.12';
 
 sub need_prelink { 0 }
 
+sub arg_defines {
+  my ($self, %args) = @_;
+
+  s/"/""/g foreach values %args;
+
+  my $config_defines = '';
+
+  # VMS can only have one define qualifier; add the one from config, if any.
+  if ($self->{config}{ccflags} =~ s{/def[^=]+(?:=)+(?:\()?([^\/\)]*)} {}i) {
+    $config_defines = "$1,";
+  }
+
+  return ('/define=(' . $config_defines . join(',', map "\"$_=$args{$_}\"", 
keys %args) . ')');
+}
+
 sub arg_include_dirs {
   my ($self, @dirs) = @_;
 

Reply via email to