diff options
author | vapier <vapier@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 18:32:41 +0000 |
---|---|---|
committer | vapier <vapier@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 18:32:41 +0000 |
commit | 3a52cf750bd9da06cffa7d642f1e74e77bfd8a8c (patch) | |
tree | 02da245dbfe8364957f88cb6c681100bc38828c7 /libjava | |
parent | b317b080a0777bb1b5861f2e27ee03b947227df9 (diff) | |
download | gcc-3a52cf750bd9da06cffa7d642f1e74e77bfd8a8c.tar.gz |
libjava: fix locale handling when sorting JNI methods
When building under LANG=cs_CZ.UTF-8, the JNI method check fails:
/bin/bash ../../scripts/check_jni_methods.sh
Found a problem with the JNI methods declared and implemented.
(<) missing in implementation, (>) missing in header files
> Java_gnu_java_awt_peer_gtk_GtkClipboard_advertiseContent
> Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState
... lots more ...
While the sed commands are run under LC_ALL=C, the two sort commands are
not, and they end up producing unexpected output (for the test). Once we
run both under LC_ALL=C, the check passes. While we're here, we can also
combine latter the `sort|uniq` into `sort -u` to match the earlier code.
URL: https://bugs.gentoo.org/563710
Reported-by: Miroslav Ć ulc <fordfrog@gentoo.org>
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229388 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/classpath/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/classpath/scripts/check_jni_methods.sh.in | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index 34dac3851a4..fa49ad59bed 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,8 @@ +2015-10-26 Mike Frysinger <vapier@gentoo.org> + + * scripts/check_jni_methods.sh.in: Run sort with LC_ALL=C, and + combine `sort|uniq` into `sort -u`. + 2015-08-11 Uros Bizjak <ubizjak@gmail.com> * configure.ac (tools/gjdoc): Depend on CREATE_WRAPPERS. diff --git a/libjava/classpath/scripts/check_jni_methods.sh.in b/libjava/classpath/scripts/check_jni_methods.sh.in index facf34b345b..fb9d104e3d0 100644 --- a/libjava/classpath/scripts/check_jni_methods.sh.in +++ b/libjava/classpath/scripts/check_jni_methods.sh.in @@ -14,7 +14,7 @@ grep -h '^JNIEXPORT .* Java_' @abs_top_srcdir@/include/*.h | \ LC_ALL=C sed -e 's,.*JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' > $TMPFILE grep -h '^JNIEXPORT .* Java_' @abs_top_builddir@/include/*.h | \ LC_ALL=C sed -e 's,.*JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE -sort -u $TMPFILE > $TMPFILE4 +LC_ALL=C sort -u $TMPFILE > $TMPFILE4 mv $TMPFILE4 $TMPFILE # Find all methods in the JNI C source files. @@ -31,7 +31,7 @@ find @abs_top_srcdir@/native/jni -name \*.cpp | \ cut -f4 -d\ | \ LC_ALL=C sed -e 's,^\JNIEXPORT .* JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE2 mv $TMPFILE2 $TMPFILE3 -sort $TMPFILE3 | uniq > $TMPFILE2 +LC_ALL=C sort -u $TMPFILE3 > $TMPFILE2 rm $TMPFILE3 # Write temporary ignore file. |