diff options
-rw-r--r-- | libjava/classpath/ChangeLog | 5 | ||||
-rwxr-xr-x | libjava/classpath/scripts/check_jni_methods.sh | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index 15342ac..c24ad7b 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,8 @@ +2007-10-01 Alexandre Oliva <aoliva@redhat.com> + + * scripts/check_jni_methods.sh: Don't depend on diff -b ignoring + a single trailing whitespace. + 2007-08-22 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/util/EnumSet.java: diff --git a/libjava/classpath/scripts/check_jni_methods.sh b/libjava/classpath/scripts/check_jni_methods.sh index b46e378..90a7735 100755 --- a/libjava/classpath/scripts/check_jni_methods.sh +++ b/libjava/classpath/scripts/check_jni_methods.sh @@ -16,16 +16,16 @@ grep -h '^JNIEXPORT .* Java_' include/*.h | \ # Find all methods in the JNI C source files. find native/jni -name \*.c | \ xargs grep -h '^Java_' | \ - LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\) *(.*$,\1,' > $TMPFILE2 + LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\).*$,\1,' > $TMPFILE2 # Or in the the C++ files. (Note that cpp doesn't follow gnu conventions atm) # So we try to match both GNU style and some other style. find native/jni -name \*.cpp | \ xargs grep -h '^Java_' | \ - LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\) *(.*$,\1,' >> $TMPFILE2 + LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE2 find native/jni -name \*.cpp | \ xargs egrep -h '^(JNIEXPORT .* JNICALL )?Java_' | \ cut -f4 -d\ | \ - LC_ALL=C sed -e 's,^\JNIEXPORT .* JNICALL \(Java_[a-z_A-Z0-9]*\) *(.*$,\1,' >> $TMPFILE2 + LC_ALL=C sed -e 's,^\JNIEXPORT .* JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE2 mv $TMPFILE2 $TMPFILE3 sort $TMPFILE3 | uniq > $TMPFILE2 rm $TMPFILE3 @@ -40,7 +40,7 @@ EOF # Compare again silently. # Use fgrep and direct the output to /dev/null for compatibility with older # grep instead of using the non portable -q. -if diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | \ +if diff -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | \ fgrep -v -f $TMPFILE3 > /dev/null; then PROBLEM=1 @@ -48,7 +48,7 @@ then echo "(-) missing in implementation, (+) missing in header files" # Compare the found method lists. - diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | fgrep -v -f $TMPFILE3 + diff -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | fgrep -v -f $TMPFILE3 fi # Cleanup. |