Commits

Anonymous committed 0169223

#i10000# #101342# min-gw fix

Comments (0)

Files changed (1)

soltools/testhxx/create.pl

         "\n";
     print STDOUT 'QUIT %my_ret%', "\n";
 } elsif ($ENV{OS} eq 'WNT' and $ENV{USE_SHELL} ne '4nt') {
+  if ($ENV{COM} eq 'GCC') {
+    1 while $in =~ s!\s+-I\s*\.\S*\s*! !g; # discard relative includes
+    $in =~ s!(\s+-I\s*)(?i:$solarversion)(\S*)!$1\${SOLARVERSION}$2!og;
+        # macrofy includes to solver
+    $in =~ s!\s+-o\s*\S+! -o /dev/null! || die 'bad input: no -o';
+    $in =~ s!\S+/testhxx.cxx!\${my_tmp}!
+        || die 'bad input: no source file';
+    print STDOUT '#!/bin/sh', "\n";
+    print STDOUT
+        'my_tmp=${TMPDIR:-/tmp}/`id -u`_$$_include.cc', "\n";
+    print STDOUT 'my_pat=`dirname $1`', "\n";
+    print STDOUT 'my_fil=`basename $1`', "\n";
+    print STDOUT 'my_org=${PWD}', "\n";
+    print STDOUT 'cd $my_pat || exit 1', "\n";
+    print STDOUT 'my_pat=`cygpath -m \`pwd\``', "\n";
+    print STDOUT 'cd $my_org || exit 1', "\n";
+    print STDOUT
+        'echo "#include \\"${my_pat}/${my_fil}\\"" > ${my_tmp} || exit 1', "\n";
+    print STDOUT $in, ' > ${my_tmp}.out 2>&1', "\n";
+    print STDOUT 'my_ret=$?', "\n";
+    print STDOUT
+        'if [ ${my_ret} -ne 0 ] ; then echo $1 >&2 ; cat ${my_tmp}.out >&2 ;',
+        ' fi', "\n";
+    print STDOUT 'unlink ${my_tmp} || exit 1', "\n";
+    print STDOUT 'unlink ${my_tmp}.out || exit 1', "\n";
+    print STDOUT 'exit ${my_ret}', "\n";
+  } else {
     1 while $in =~ s!\s+-I\s*\.\S*\s*! !g; # discard relative includes
     $in =~ s!(\s+-I\s*)(?i:$solarversion)(\S*)!$1\${SOLARVERSION}$2!og;
         # macrofy includes to solver
     print STDOUT 'unlink ${my_tmp} || exit 1', "\n";
     print STDOUT 'unlink ${my_tmp}.out || exit 1', "\n";
     print STDOUT 'exit ${my_ret}', "\n";
+  }
 } else {
     print STDOUT 'echo \'no testhxx on this platform\'', "\n";
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.