langtools/test/tools/javah/6257087/foo.sh
changeset 3770 12d0e59df0fb
parent 10 06bc494ca11e
child 3890 b53fced26fa4
--- a/langtools/test/tools/javah/6257087/foo.sh	Thu Aug 27 17:50:21 2009 -0700
+++ b/langtools/test/tools/javah/6257087/foo.sh	Thu Aug 27 18:25:21 2009 -0700
@@ -42,12 +42,15 @@
 OS=`uname -s`
 case "$OS" in
   SunOS | Linux )
-    NULL=/dev/null
     PS=":"
     FS="/"
     ;;
+  CYGWIN* )
+    PS=":"
+    FS="/"
+    DIFFOPTS="--strip-trailing-cr"
+    ;;
   Windows* )
-    NULL=NUL
     PS=";"
     FS="\\"
     ;;
@@ -57,9 +60,9 @@
     ;;
 esac
 
-"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d "${TC}" "${TS}${FS}foo.java" > ${NULL}
+"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d "${TC}" "${TS}${FS}foo.java" 
 "${TESTJAVA}${FS}bin${FS}javah" ${TESTTOOLVMOPTS} -classpath "${TC}" -d "${TC}" foo
-diff -c "${TS}${FS}foo_bar.h" "${TC}${FS}foo_bar.h"
+diff ${DIFFOPTS} -c "${TS}${FS}foo_bar.h" "${TC}${FS}foo_bar.h"
 result=$?
 
 if [ $result -eq 0 ]