Portability fixes for Mac OS / bleadperl
[p5sagit/p5-mst-13.2.git] / ext / B / defsubs_h.PL
index 800bb2c..da6566b 100644 (file)
@@ -21,7 +21,8 @@ foreach my $const (qw(
  }
 foreach my $file (qw(op.h cop.h))
  {
-  open(OPH,"../../$file") || die "Cannot open ../../$file:$!";
+  my $path = $^O eq 'MacOS' ? ":::$file" : "../../$file";
+  open(OPH,"$path") || die "Cannot open $path:$!";
   while (<OPH>)
    {  
     doconst($1) if (/#define\s+(\w+)\s+([\(\)\|\dx]+)\s*(?:$|\/\*)/);