-./test-xstrtoul${EXEEXT} 1 >> t-xstrtol.tmp 2>&1 || result=1
-./test-xstrtoul${EXEEXT} -1 >> t-xstrtol.tmp 2>&1 && result=1
-./test-xstrtoul${EXEEXT} 1k >> t-xstrtol.tmp 2>&1 || result=1
-./test-xstrtoul${EXEEXT} ${too_big}h >> t-xstrtol.tmp 2>&1 && result=1
-./test-xstrtoul${EXEEXT} $too_big >> t-xstrtol.tmp 2>&1 && result=1
-./test-xstrtoul${EXEEXT} x >> t-xstrtol.tmp 2>&1 && result=1
-./test-xstrtoul${EXEEXT} 9x >> t-xstrtol.tmp 2>&1 && result=1
-./test-xstrtoul${EXEEXT} 010 >> t-xstrtol.tmp 2>&1 || result=1
-./test-xstrtoul${EXEEXT} MiB >> t-xstrtol.tmp 2>&1 || result=1
+test-xstrtoul 1 >> out 2>&1 || result=1
+test-xstrtoul -1 >> out 2>&1 && result=1
+test-xstrtoul 1k >> out 2>&1 || result=1
+test-xstrtoul ${too_big}h >> out 2>&1 && result=1
+test-xstrtoul $too_big >> out 2>&1 && result=1
+test-xstrtoul x >> out 2>&1 && result=1
+test-xstrtoul 9x >> out 2>&1 && result=1
+test-xstrtoul 010 >> out 2>&1 || result=1
+test-xstrtoul MiB >> out 2>&1 || result=1
+
+# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
+# does not understand '\r'.
+if echo solaris | tr -d '\r' | grep solais > /dev/null; then
+ cr='\015'
+else
+ cr='\r'
+fi