--- /usr/lib/perl5/5.8.0/ExtUtils/xsubpp.orig	2002-09-02 00:14:22.000000000 -0400
+++ /usr/lib/perl5/5.8.0/ExtUtils/xsubpp	2003-06-12 10:22:47.000000000 -0400
@@ -178,9 +178,12 @@
 	or ($dir, $filename) = $ARGV[0] =~ m#(.*)\\(.*)#
 	or ($dir, $filename) = $ARGV[0] =~ m#(.*[>\]])(.*)#
 	or ($dir, $filename) = ('.', $ARGV[0]);
-chdir($dir);
+#chdir($dir);
 $pwd = cwd();
 
+# fix bad line number directives...
+$filename = $dir.'/'.$filename;
+
 ++ $IncludedFiles{$ARGV[0]} ;
 
 my(@XSStack) = ({type => 'none'});	# Stack of conditionals and INCLUDEs
@@ -1647,7 +1650,10 @@
     # work out the line number
     my $line_no = $line_no[@line_no - @line -1] ;
 
-    print STDERR "@_ in $filename, line $line_no\n" ;
+#    print STDERR "@_ in $filename, line $line_no\n" ;
+    # standard compiler output format, to work with things that parse
+    # compiler errors and take you to them, e.g. vim and emacs
+    print STDERR "$filename:$line_no: @_\n" ;
 }
 
 sub blurt
