aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2002-07-24 14:05:15 +0000
committerDiego Novillo <dnovillo@redhat.com>2002-07-24 14:05:15 +0000
commitb2a8579ce3df8666386adf640e5502d3534a0629 (patch)
tree5d07b80178b4041baed0258be71c03f7efbccc0b /libjava
parent55a5a02d8b08fdab1911eee3003302f187d2af25 (diff)
Mainline merge as of 2002-07-21.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@55706 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog85
-rw-r--r--libjava/Makefile.am14
-rw-r--r--libjava/Makefile.in28
-rwxr-xr-xlibjava/configure662
-rw-r--r--libjava/configure.host13
-rw-r--r--libjava/configure.in6
-rw-r--r--libjava/gcj/javaprims.h1
-rw-r--r--libjava/gnu/java/security/provider/DefaultPolicy.java13
-rw-r--r--libjava/gnu/java/security/provider/MD5.java8
-rw-r--r--libjava/gnu/java/security/provider/SHA.java14
-rw-r--r--libjava/include/dwarf2-signal.h3
-rw-r--r--libjava/include/name-finder.h36
-rw-r--r--libjava/java/beans/PropertyChangeEvent.java237
-rw-r--r--libjava/java/beans/PropertyChangeListener.java39
-rw-r--r--libjava/java/beans/PropertyChangeSupport.java656
-rw-r--r--libjava/java/beans/VetoableChangeListener.java66
-rw-r--r--libjava/java/beans/VetoableChangeSupport.java713
-rw-r--r--libjava/java/io/StreamTokenizer.java18
-rw-r--r--libjava/java/lang/Character.java2
-rw-r--r--libjava/java/lang/StackTraceElement.java2
-rw-r--r--libjava/java/lang/Throwable.java180
-rw-r--r--libjava/java/lang/ieeefp.h4
-rw-r--r--libjava/java/lang/natThrowable.cc39
-rw-r--r--libjava/mauve-libgcj6
-rw-r--r--libjava/name-finder.cc224
-rw-r--r--libjava/testsuite/ChangeLog6
-rw-r--r--libjava/testsuite/libjava.compile/compile.exp2
-rw-r--r--libjava/testsuite/libjava.jni/jni.exp2
-rw-r--r--libjava/testsuite/libjava.lang/lang.exp2
29 files changed, 1962 insertions, 1119 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 2d66931117f..de7bdc9933e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,88 @@
+2002-07-19 Bo Thorsen <bo@berlioz.suse.de>
+
+ * java/lang/ieeefp.h: Add x86-64 support.
+ * configure.in: Likewise.
+ * configure.host: Likewise.
+ * configure: Regenerated.
+ * sysdep/x86-64/locks.h: New file with x86-64 locks.
+
+2002-07-16 Mark Wielaard <mark@klomp.org>
+
+ * java/io/StreamTokenizer.java (pushBack): Update documentation.
+ (whitespaceChars): call resetChar().
+
+2002-07-15 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in: Rebuilt.
+ * Makefile.am (awt_java_source_files): Added new files.
+ * java/beans/ExceptionListener.java: Merged with Classpath.
+ * java/beans/PropertyChangeEvent.java: Merged with Classpath.
+ * java/beans/PropertyChangeListener.java: Merged with Classpath.
+ * java/beans/PropertyChangeListenerProxy.java: Merged with Classpath.
+ * java/beans/PropertyChangeSupport.java: Merged with Classpath.
+ * java/beans/VetoableChangeListener.java: Merged with Classpath.
+ * java/beans/VetoableChangeListenerProxy.java: Merged with Classpath.
+ * java/beans/VetoableChangeSupport.java: Merged with Classpath.
+
+2002-07-14 Mark Wielaard <mark@klomp.org>
+
+ * gnu/java/security/der/DEREncodingException.java,
+ gnu/java/security/provider/DERReader.java,
+ gnu/java/security/provider/DERWriter.java,
+ gnu/java/security/provider/DSAKeyPairGenerator.java,
+ gnu/java/security/provider/DSAParameterGenerator.java,
+ gnu/java/security/provider/DSAParameters.java,
+ gnu/java/security/provider/DSASignature.java,
+ gnu/java/security/provider/GnuDSAPrivateKey.java,
+ gnu/java/security/provider/GnuDSAPublicKey.java,
+ gnu/java/security/provider/MD5.java,
+ gnu/java/security/util/Prime.java: New files from Classpath.
+ * Makefile.am (ordinary_java_source_files): Add new files.
+ * Makefile.in: Regenerate.
+
+2002-07-14 C. Brian Jones <cbj@gnu.org>
+
+ * gnu/java/security/provider/DefaultPolicy.java
+ (getPermissions): do not maintain static class variable of
+ Permissions
+ * gnu/java/security/provider/SHA.java
+ (engineUpdate): algorithm change
+ (engineDigest): algorithm change
+
+2002-07-12 Jesse Rosenstock <jmr@fulcrummicro.com>
+
+ For PR libgcj/7292:
+ * java/lang/Character.java (toString(char)): Now static.
+
+2002-07-12 Mark Wielaard <mark@klomp.org>
+
+ * java/lang/natThrowable.cc (printRawStackTrace): removed.
+ (getStackTrace0): new method.
+ * java/lang/Throwable.java (CPlusPlusDemangler): removed.
+ (printStackTrace(PrintWriter)): replace with pure java implementation.
+ (printRawStackTrace): removed.
+ (getStackTrace0): new method.
+ * java/lang/StackTraceElement.java (toString): add extra whitespace.
+ * gcj/javaprims.h: regenerate class list.
+ * include/name-finder.h (lookup): new returns StackTraceElement*.
+ (method_name, file_name): fields removed.
+ (pid2, f2_pipe, b2_pipe, b2_pipe_fd): new fields.
+ (~_Jv_name_finder): close new descriptors.
+ * name-finder.cc(_Jv_name_finder): setup c++filt helper process.
+ (createStackTraceElement): new method.
+ (lookup): returns StackTraceElement*, uses createStackTraceElement().
+
+2002-07-10 Tom Tromey <tromey@redhat.com>
+
+ * configure: Rebuilt.
+ * configure.in: Use `test' after `&&'. From Chris Faylor.
+
+2002-07-08 Mark Wielaard <mark@klomp.org>
+
+ * mauve-libgcj: Don't compile java.sql.Blob.BlobTest,
+ java.sql.Clob.ClobTest, java.sql.Connection.TestJdbc20,
+ java.sql.DatabaseMetaData.TestJdbc20
+
2002-07-05 Tony Kimball <alk@pobox.com>
* java/lang/natRuntime.cc (nativeGetLibname): Added missing `#'.
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index d3caaf5c1e2..6e5adb991d0 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -799,6 +799,7 @@ java/beans/Beans.java \
java/beans/Customizer.java \
java/beans/DesignMode.java \
java/beans/EventSetDescriptor.java \
+java/beans/ExceptionListener.java \
java/beans/FeatureDescriptor.java \
java/beans/IndexedPropertyDescriptor.java \
java/beans/IntrospectionException.java \
@@ -807,6 +808,7 @@ java/beans/MethodDescriptor.java \
java/beans/ParameterDescriptor.java \
java/beans/PropertyChangeEvent.java \
java/beans/PropertyChangeListener.java \
+java/beans/PropertyChangeListenerProxy.java \
java/beans/PropertyChangeSupport.java \
java/beans/PropertyDescriptor.java \
java/beans/PropertyEditor.java \
@@ -815,6 +817,7 @@ java/beans/PropertyEditorSupport.java \
java/beans/PropertyVetoException.java \
java/beans/SimpleBeanInfo.java \
java/beans/VetoableChangeListener.java \
+java/beans/VetoableChangeListenerProxy.java \
java/beans/VetoableChangeSupport.java \
java/beans/Visibility.java
@@ -1428,10 +1431,21 @@ gnu/java/locale/LocaleInformation_zh_HK.java \
gnu/java/locale/LocaleInformation_zh_SG.java \
gnu/java/locale/LocaleInformation_zh_TW.java \
gnu/java/math/MPN.java \
+gnu/java/security/der/DEREncodingException.java \
+gnu/java/security/provider/DERReader.java \
+gnu/java/security/provider/DERWriter.java \
+gnu/java/security/provider/DSAKeyPairGenerator.java \
+gnu/java/security/provider/DSAParameterGenerator.java \
+gnu/java/security/provider/DSAParameters.java \
+gnu/java/security/provider/DSASignature.java \
gnu/java/security/provider/DefaultPolicy.java \
gnu/java/security/provider/Gnu.java \
+gnu/java/security/provider/GnuDSAPrivateKey.java \
+gnu/java/security/provider/GnuDSAPublicKey.java \
+gnu/java/security/provider/MD5.java \
gnu/java/security/provider/SHA.java \
gnu/java/security/provider/SHA1PRNG.java \
+gnu/java/security/util/Prime.java \
gnu/java/text/BaseBreakIterator.java \
gnu/java/text/CharacterBreakIterator.java \
gnu/java/text/LineBreakIterator.java \
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index 7f81bb7428e..81ff3fcbe7c 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -568,6 +568,7 @@ java/beans/Beans.java \
java/beans/Customizer.java \
java/beans/DesignMode.java \
java/beans/EventSetDescriptor.java \
+java/beans/ExceptionListener.java \
java/beans/FeatureDescriptor.java \
java/beans/IndexedPropertyDescriptor.java \
java/beans/IntrospectionException.java \
@@ -576,6 +577,7 @@ java/beans/MethodDescriptor.java \
java/beans/ParameterDescriptor.java \
java/beans/PropertyChangeEvent.java \
java/beans/PropertyChangeListener.java \
+java/beans/PropertyChangeListenerProxy.java \
java/beans/PropertyChangeSupport.java \
java/beans/PropertyDescriptor.java \
java/beans/PropertyEditor.java \
@@ -584,6 +586,7 @@ java/beans/PropertyEditorSupport.java \
java/beans/PropertyVetoException.java \
java/beans/SimpleBeanInfo.java \
java/beans/VetoableChangeListener.java \
+java/beans/VetoableChangeListenerProxy.java \
java/beans/VetoableChangeSupport.java \
java/beans/Visibility.java
@@ -1190,10 +1193,21 @@ gnu/java/locale/LocaleInformation_zh_HK.java \
gnu/java/locale/LocaleInformation_zh_SG.java \
gnu/java/locale/LocaleInformation_zh_TW.java \
gnu/java/math/MPN.java \
+gnu/java/security/der/DEREncodingException.java \
+gnu/java/security/provider/DERReader.java \
+gnu/java/security/provider/DERWriter.java \
+gnu/java/security/provider/DSAKeyPairGenerator.java \
+gnu/java/security/provider/DSAParameterGenerator.java \
+gnu/java/security/provider/DSAParameters.java \
+gnu/java/security/provider/DSASignature.java \
gnu/java/security/provider/DefaultPolicy.java \
gnu/java/security/provider/Gnu.java \
+gnu/java/security/provider/GnuDSAPrivateKey.java \
+gnu/java/security/provider/GnuDSAPublicKey.java \
+gnu/java/security/provider/MD5.java \
gnu/java/security/provider/SHA.java \
gnu/java/security/provider/SHA1PRNG.java \
+gnu/java/security/util/Prime.java \
gnu/java/text/BaseBreakIterator.java \
gnu/java/text/CharacterBreakIterator.java \
gnu/java/text/LineBreakIterator.java \
@@ -2033,10 +2047,21 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/gnu/java/rmi/server/UnicastRemoteStub.P \
.deps/gnu/java/rmi/server/UnicastServer.P \
.deps/gnu/java/rmi/server/UnicastServerRef.P \
+.deps/gnu/java/security/der/DEREncodingException.P \
+.deps/gnu/java/security/provider/DERReader.P \
+.deps/gnu/java/security/provider/DERWriter.P \
+.deps/gnu/java/security/provider/DSAKeyPairGenerator.P \
+.deps/gnu/java/security/provider/DSAParameterGenerator.P \
+.deps/gnu/java/security/provider/DSAParameters.P \
+.deps/gnu/java/security/provider/DSASignature.P \
.deps/gnu/java/security/provider/DefaultPolicy.P \
.deps/gnu/java/security/provider/Gnu.P \
+.deps/gnu/java/security/provider/GnuDSAPrivateKey.P \
+.deps/gnu/java/security/provider/GnuDSAPublicKey.P \
+.deps/gnu/java/security/provider/MD5.P \
.deps/gnu/java/security/provider/SHA.P \
.deps/gnu/java/security/provider/SHA1PRNG.P \
+.deps/gnu/java/security/util/Prime.P \
.deps/gnu/java/text/BaseBreakIterator.P \
.deps/gnu/java/text/CharacterBreakIterator.P \
.deps/gnu/java/text/LineBreakIterator.P \
@@ -2175,6 +2200,7 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/beans/BeanInfo.P .deps/java/beans/Beans.P \
.deps/java/beans/Customizer.P .deps/java/beans/DesignMode.P \
.deps/java/beans/EventSetDescriptor.P \
+.deps/java/beans/ExceptionListener.P \
.deps/java/beans/FeatureDescriptor.P \
.deps/java/beans/IndexedPropertyDescriptor.P \
.deps/java/beans/IntrospectionException.P \
@@ -2182,6 +2208,7 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/beans/ParameterDescriptor.P \
.deps/java/beans/PropertyChangeEvent.P \
.deps/java/beans/PropertyChangeListener.P \
+.deps/java/beans/PropertyChangeListenerProxy.P \
.deps/java/beans/PropertyChangeSupport.P \
.deps/java/beans/PropertyDescriptor.P .deps/java/beans/PropertyEditor.P \
.deps/java/beans/PropertyEditorManager.P \
@@ -2189,6 +2216,7 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/beans/PropertyVetoException.P \
.deps/java/beans/SimpleBeanInfo.P \
.deps/java/beans/VetoableChangeListener.P \
+.deps/java/beans/VetoableChangeListenerProxy.P \
.deps/java/beans/VetoableChangeSupport.P .deps/java/beans/Visibility.P \
.deps/java/beans/beancontext/BeanContext.P \
.deps/java/beans/beancontext/BeanContextChild.P \
diff --git a/libjava/configure b/libjava/configure
index b55f6667d11..8fff9e2adaf 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -82,7 +82,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -197,7 +196,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -368,11 +366,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -538,16 +531,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -594,7 +583,7 @@ fi
ORIGINAL_LD_FOR_MULTILIBS=$LD
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:598: checking whether ln -s works" >&5
+echo "configure:587: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -647,7 +636,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:651: checking for a BSD compatible install" >&5
+echo "configure:640: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -700,7 +689,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:704: checking whether build environment is sane" >&5
+echo "configure:693: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -757,7 +746,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:761: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:750: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -790,12 +779,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:794: checking for Cygwin environment" >&5
+echo "configure:783: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 799 "configure"
+#line 788 "configure"
#include "confdefs.h"
int main() {
@@ -806,7 +795,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -823,19 +812,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:827: checking for mingw32 environment" >&5
+echo "configure:816: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 832 "configure"
+#line 821 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -962,7 +951,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:966: checking host system type" >&5
+echo "configure:955: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -983,7 +972,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:987: checking target system type" >&5
+echo "configure:976: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1001,7 +990,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1005: checking build system type" >&5
+echo "configure:994: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1030,7 +1019,7 @@ test "$host_alias" != "$target_alias" &&
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1034: checking for $ac_word" >&5
+echo "configure:1023: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1060,7 +1049,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1064: checking for $ac_word" >&5
+echo "configure:1053: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1111,7 +1100,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1115: checking for $ac_word" >&5
+echo "configure:1104: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1144,7 +1133,7 @@ fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1148: checking whether we are using GNU C" >&5
+echo "configure:1137: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1153,7 +1142,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1172,7 +1161,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1176: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1165: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1221,7 +1210,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1225: checking for $ac_word" >&5
+echo "configure:1214: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1256,7 +1245,7 @@ CXX=$glibjava_CXX
test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1260: checking whether we are using GNU C++" >&5
+echo "configure:1249: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1265,7 +1254,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1280,7 +1269,7 @@ if test $ac_cv_prog_gxx = yes; then
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1284: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1273: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1329,7 +1318,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1333: checking for working aclocal" >&5
+echo "configure:1322: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1342,7 +1331,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1346: checking for working autoconf" >&5
+echo "configure:1335: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1355,7 +1344,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1359: checking for working automake" >&5
+echo "configure:1348: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1368,7 +1357,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1372: checking for working autoheader" >&5
+echo "configure:1361: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1381,7 +1370,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1385: checking for working makeinfo" >&5
+echo "configure:1374: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1400,7 +1389,7 @@ fi
# LIBGCJ_CONFIGURE, which doesn't work because that means that it will
# be run before AC_CANONICAL_HOST.
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1404: checking build system type" >&5
+echo "configure:1393: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1421,7 +1410,7 @@ echo "$ac_t""$build" 1>&6
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1425: checking for $ac_word" >&5
+echo "configure:1414: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1453,7 +1442,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1457: checking for $ac_word" >&5
+echo "configure:1446: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1485,7 +1474,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1489: checking for $ac_word" >&5
+echo "configure:1478: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1517,7 +1506,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1521: checking for $ac_word" >&5
+echo "configure:1510: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1562,7 +1551,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1566: checking for a BSD compatible install" >&5
+echo "configure:1555: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1616,7 +1605,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1620: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:1609: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -1642,7 +1631,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1646: checking for executable suffix" >&5
+echo "configure:1635: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1652,10 +1641,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1802,7 +1791,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1806: checking for ld used by GCC" >&5
+echo "configure:1795: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1832,10 +1821,10 @@ echo "configure:1806: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1836: checking for GNU ld" >&5
+echo "configure:1825: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1839: checking for non-GNU ld" >&5
+echo "configure:1828: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1870,7 +1859,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1874: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1863: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1887,7 +1876,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1891: checking for $LD option to reload object files" >&5
+echo "configure:1880: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1899,7 +1888,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1903: checking for BSD-compatible nm" >&5
+echo "configure:1892: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1937,7 +1926,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1941: checking how to recognise dependant libraries" >&5
+echo "configure:1930: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2101,13 +2090,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2105: checking for object suffix" >&5
+echo "configure:2094: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -2131,7 +2120,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2135: checking for ${ac_tool_prefix}file" >&5
+echo "configure:2124: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2193,7 +2182,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2197: checking for file" >&5
+echo "configure:2186: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2264,7 +2253,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2268: checking for $ac_word" >&5
+echo "configure:2257: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2296,7 +2285,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2300: checking for $ac_word" >&5
+echo "configure:2289: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2331,7 +2320,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2335: checking for $ac_word" >&5
+echo "configure:2324: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2363,7 +2352,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2367: checking for $ac_word" >&5
+echo "configure:2356: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2430,8 +2419,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2434 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2423 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
@@ -2452,7 +2441,7 @@ case $host in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2456: checking whether the C compiler needs -belf" >&5
+echo "configure:2445: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2465,14 +2454,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2469 "configure"
+#line 2458 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2502,12 +2491,12 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
esac
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:2506: checking how to run the C++ preprocessor" >&5
+echo "configure:2495: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_ext=C
+ ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
@@ -2515,12 +2504,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 2519 "configure"
+#line 2508 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2533,15 +2522,18 @@ else
fi
rm -f conftest*
ac_cv_prog_CXXCPP="$CXXCPP"
-ac_ext=c
+ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
+
fi
+ CXXCPP="$ac_cv_prog_CXXCPP"
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
fi
-CXXCPP="$ac_cv_prog_CXXCPP"
echo "$ac_t""$CXXCPP" 1>&6
@@ -2756,7 +2748,7 @@ INTERPRETER="$libgcj_interpreter"
echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
-echo "configure:2760: checking for exception model to use" >&5
+echo "configure:2752: checking for exception model to use" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2771,7 +2763,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then
:
else
cat > conftest.$ac_ext << EOF
-#line 2775 "configure"
+#line 2767 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -2782,7 +2774,7 @@ void foo()
EOF
old_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=-S
-if { (eval echo configure:2786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
enable_sjlj_exceptions=yes
elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
@@ -2912,7 +2904,7 @@ esac
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2916: checking how to run the C preprocessor" >&5
+echo "configure:2908: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2927,13 +2919,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2931 "configure"
+#line 2923 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2944,13 +2936,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2948 "configure"
+#line 2940 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2961,13 +2953,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2965 "configure"
+#line 2957 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2992,7 +2984,7 @@ fi
echo "$ac_t""$CPP" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 2996 "configure"
+#line 2988 "configure"
#include "confdefs.h"
#include <stdint.h>
EOF
@@ -3007,7 +2999,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3011 "configure"
+#line 3003 "configure"
#include "confdefs.h"
#include <inttypes.h>
EOF
@@ -3022,7 +3014,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3026 "configure"
+#line 3018 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -3037,7 +3029,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3041 "configure"
+#line 3033 "configure"
#include "confdefs.h"
#include <sys/config.h>
EOF
@@ -3054,7 +3046,7 @@ rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3058 "configure"
+#line 3050 "configure"
#include "confdefs.h"
#include <time.h>
EOF
@@ -3069,7 +3061,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3073 "configure"
+#line 3065 "configure"
#include "confdefs.h"
#include <time.h>
EOF
@@ -3121,7 +3113,7 @@ ZLIBTESTSPEC=
libsubdir=.libs
echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
-echo "configure:3125: checking for garbage collector to use" >&5
+echo "configure:3117: checking for garbage collector to use" >&5
# Check whether --enable-java-gc or --disable-java-gc was given.
if test "${enable_java_gc+set}" = set; then
enableval="$enable_java_gc"
@@ -3174,7 +3166,7 @@ esac
echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
-echo "configure:3178: checking for thread model used by GCC" >&5
+echo "configure:3170: checking for thread model used by GCC" >&5
THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
echo "$ac_t""$THREADS" 1>&6
@@ -3371,7 +3363,8 @@ EOF
# If Canadian cross, then don't pick up tools from the build
# directory.
- if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
+ if test x"$build" != x"$with_cross_host" \
+ && test x"$build" != x"$target"; then
CANADIAN=yes
GCC_UNWIND_INCLUDE=
GCJ="${target_alias}-gcj"
@@ -3381,12 +3374,12 @@ else
for ac_func in strerror ioctl select fstat open fsync sleep opendir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3385: checking for $ac_func" >&5
+echo "configure:3378: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3390 "configure"
+#line 3383 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3409,7 +3402,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3436,12 +3429,12 @@ done
for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3440: checking for $ac_func" >&5
+echo "configure:3433: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3445 "configure"
+#line 3438 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3464,7 +3457,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3491,12 +3484,12 @@ done
for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3495: checking for $ac_func" >&5
+echo "configure:3488: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3500 "configure"
+#line 3493 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3519,7 +3512,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3546,12 +3539,12 @@ done
for ac_func in nl_langinfo setlocale
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3550: checking for $ac_func" >&5
+echo "configure:3543: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3555 "configure"
+#line 3548 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3574,7 +3567,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3601,12 +3594,12 @@ done
for ac_func in inet_aton inet_addr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3605: checking for $ac_func" >&5
+echo "configure:3598: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3610 "configure"
+#line 3603 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3629,7 +3622,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3656,12 +3649,12 @@ done
for ac_func in inet_pton uname inet_ntoa
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3660: checking for $ac_func" >&5
+echo "configure:3653: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3665 "configure"
+#line 3658 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3684,7 +3677,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3711,12 +3704,12 @@ done
for ac_func in fork execvp pipe sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3715: checking for $ac_func" >&5
+echo "configure:3708: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3720 "configure"
+#line 3713 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3739,7 +3732,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3767,17 +3760,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3771: checking for $ac_hdr" >&5
+echo "configure:3764: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3776 "configure"
+#line 3769 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3804,12 +3797,12 @@ fi
done
echo $ac_n "checking for backtrace""... $ac_c" 1>&6
-echo "configure:3808: checking for backtrace" >&5
+echo "configure:3801: checking for backtrace" >&5
if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3813 "configure"
+#line 3806 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char backtrace(); below. */
@@ -3832,7 +3825,7 @@ backtrace();
; return 0; }
EOF
-if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_backtrace=yes"
else
@@ -3868,7 +3861,7 @@ fi
echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
-echo "configure:3872: checking for dladdr in -ldl" >&5
+echo "configure:3865: checking for dladdr in -ldl" >&5
ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3876,7 +3869,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3880 "configure"
+#line 3873 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3887,7 +3880,7 @@ int main() {
dladdr()
; return 0; }
EOF
-if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3917,7 +3910,7 @@ do
ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
-echo "configure:3921: checking for $ac_file" >&5
+echo "configure:3914: checking for $ac_file" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3975,7 +3968,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:3979: checking for iconv" >&5
+echo "configure:3972: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3983,7 +3976,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 3987 "configure"
+#line 3980 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -3993,7 +3986,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -4005,7 +3998,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
cat > conftest.$ac_ext <<EOF
-#line 4009 "configure"
+#line 4002 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -4015,7 +4008,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -4036,13 +4029,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:4040: checking for iconv declaration" >&5
+echo "configure:4033: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4046 "configure"
+#line 4039 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -4061,7 +4054,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
@@ -4090,19 +4083,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:4094: checking for LC_MESSAGES" >&5
+echo "configure:4087: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4099 "configure"
+#line 4092 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -4123,12 +4116,12 @@ EOF
fi
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:4127: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:4120: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4132 "configure"
+#line 4125 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -4136,7 +4129,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:4140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -4157,12 +4150,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:4161: checking for tm_zone in struct tm" >&5
+echo "configure:4154: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4166 "configure"
+#line 4159 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -4170,7 +4163,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -4190,12 +4183,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:4194: checking for tzname" >&5
+echo "configure:4187: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4199 "configure"
+#line 4192 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -4205,7 +4198,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -4230,12 +4223,12 @@ fi
for ac_func in gethostbyname_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4234: checking for $ac_func" >&5
+echo "configure:4227: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4239 "configure"
+#line 4232 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4258,7 +4251,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4285,7 +4278,7 @@ EOF
# We look for the one that returns `int'.
# Hopefully this check is robust enough.
cat > conftest.$ac_ext <<EOF
-#line 4289 "configure"
+#line 4282 "configure"
#include "confdefs.h"
#include <netdb.h>
EOF
@@ -4305,7 +4298,7 @@ rm -f conftest*
*" -D_REENTRANT "*) ;;
*)
echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
-echo "configure:4309: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
+echo "configure:4302: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4318,14 +4311,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 4322 "configure"
+#line 4315 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
gethostbyname_r("", 0, 0);
; return 0; }
EOF
-if { (eval echo configure:4329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libjava_cv_gethostbyname_r_needs_reentrant=no
else
@@ -4335,14 +4328,14 @@ else
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
cat > conftest.$ac_ext <<EOF
-#line 4339 "configure"
+#line 4332 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
gethostbyname_r("", 0, 0);
; return 0; }
EOF
-if { (eval echo configure:4346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libjava_cv_gethostbyname_r_needs_reentrant=yes
else
@@ -4377,12 +4370,12 @@ EOF
esac
echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
-echo "configure:4381: checking for struct hostent_data" >&5
+echo "configure:4374: checking for struct hostent_data" >&5
if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4386 "configure"
+#line 4379 "configure"
#include "confdefs.h"
#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
@@ -4393,7 +4386,7 @@ int main() {
struct hostent_data data;
; return 0; }
EOF
-if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libjava_cv_struct_hostent_data=yes
else
@@ -4425,7 +4418,7 @@ done
# to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
# linkage check is enough, yet C++ code requires proper prototypes.)
cat > conftest.$ac_ext <<EOF
-#line 4429 "configure"
+#line 4422 "configure"
#include "confdefs.h"
#include <netdb.h>
EOF
@@ -4436,12 +4429,12 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
for ac_func in gethostbyaddr_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4440: checking for $ac_func" >&5
+echo "configure:4433: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4445 "configure"
+#line 4438 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4464,7 +4457,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4491,7 +4484,7 @@ EOF
# We look for the one that returns `int'.
# Hopefully this check is robust enough.
cat > conftest.$ac_ext <<EOF
-#line 4495 "configure"
+#line 4488 "configure"
#include "confdefs.h"
#include <netdb.h>
EOF
@@ -4518,12 +4511,12 @@ rm -f conftest*
for ac_func in gethostname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4522: checking for $ac_func" >&5
+echo "configure:4515: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4527 "configure"
+#line 4520 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4546,7 +4539,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4570,7 +4563,7 @@ EOF
EOF
cat > conftest.$ac_ext <<EOF
-#line 4574 "configure"
+#line 4567 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -4601,12 +4594,12 @@ done
for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4605: checking for $ac_func" >&5
+echo "configure:4598: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4610 "configure"
+#line 4603 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4629,7 +4622,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4659,12 +4652,12 @@ done
for ac_func in sched_yield
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4663: checking for $ac_func" >&5
+echo "configure:4656: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4668 "configure"
+#line 4661 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4687,7 +4680,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4709,7 +4702,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
-echo "configure:4713: checking for sched_yield in -lrt" >&5
+echo "configure:4706: checking for sched_yield in -lrt" >&5
ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4717,7 +4710,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4721 "configure"
+#line 4714 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4728,7 +4721,7 @@ int main() {
sched_yield()
; return 0; }
EOF
-if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4754,7 +4747,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
-echo "configure:4758: checking for sched_yield in -lposix4" >&5
+echo "configure:4751: checking for sched_yield in -lposix4" >&5
ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4762,7 +4755,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4766 "configure"
+#line 4759 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4773,7 +4766,7 @@ int main() {
sched_yield()
; return 0; }
EOF
-if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4809,7 +4802,7 @@ done
# We can save a little space at runtime if the mutex has m_count
# or __m_count. This is a nice hack for Linux.
cat > conftest.$ac_ext <<EOF
-#line 4813 "configure"
+#line 4806 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@@ -4818,7 +4811,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define PTHREAD_MUTEX_HAVE_M_COUNT 1
@@ -4830,7 +4823,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 4834 "configure"
+#line 4827 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@@ -4839,7 +4832,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define PTHREAD_MUTEX_HAVE___M_COUNT 1
@@ -4859,12 +4852,12 @@ rm -f conftest*
for ac_func in gettimeofday time ftime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4863: checking for $ac_func" >&5
+echo "configure:4856: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4868 "configure"
+#line 4861 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4887,7 +4880,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4918,12 +4911,12 @@ done
for ac_func in memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4922: checking for $ac_func" >&5
+echo "configure:4915: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4927 "configure"
+#line 4920 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4946,7 +4939,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4976,12 +4969,12 @@ done
for ac_func in memcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4980: checking for $ac_func" >&5
+echo "configure:4973: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4985 "configure"
+#line 4978 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5004,7 +4997,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5033,7 +5026,7 @@ done
fi
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5037: checking for dlopen in -ldl" >&5
+echo "configure:5030: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5041,7 +5034,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5045 "configure"
+#line 5038 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5052,7 +5045,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5097,7 +5090,7 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
-echo "configure:5101: checking for socket libraries" >&5
+echo "configure:5094: checking for socket libraries" >&5
if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5105,12 +5098,12 @@ else
gcj_checkBoth=0
unset ac_cv_func_connect
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:5109: checking for connect" >&5
+echo "configure:5102: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5114 "configure"
+#line 5107 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -5133,7 +5126,7 @@ connect();
; return 0; }
EOF
-if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -5156,7 +5149,7 @@ fi
if test "$gcj_checkSocket" = 1; then
unset ac_cv_func_connect
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:5160: checking for main in -lsocket" >&5
+echo "configure:5153: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5164,14 +5157,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5168 "configure"
+#line 5161 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5198,12 +5191,12 @@ fi
LIBS="$LIBS -lsocket -lnsl"
unset ac_cv_func_accept
echo $ac_n "checking for accept""... $ac_c" 1>&6
-echo "configure:5202: checking for accept" >&5
+echo "configure:5195: checking for accept" >&5
if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5207 "configure"
+#line 5200 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char accept(); below. */
@@ -5226,7 +5219,7 @@ accept();
; return 0; }
EOF
-if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_accept=yes"
else
@@ -5253,12 +5246,12 @@ fi
gcj_oldLibs=$LIBS
LIBS="$LIBS $gcj_cv_lib_sockets"
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:5257: checking for gethostbyname" >&5
+echo "configure:5250: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5262 "configure"
+#line 5255 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -5281,7 +5274,7 @@ gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -5299,7 +5292,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:5303: checking for main in -lnsl" >&5
+echo "configure:5296: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5307,14 +5300,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5311 "configure"
+#line 5304 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5346,7 +5339,7 @@ echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
if test "$with_system_zlib" = yes; then
echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
-echo "configure:5350: checking for deflate in -lz" >&5
+echo "configure:5343: checking for deflate in -lz" >&5
ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5354,7 +5347,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5358 "configure"
+#line 5351 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5365,7 +5358,7 @@ int main() {
deflate()
; return 0; }
EOF
-if { (eval echo configure:5369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5392,7 +5385,7 @@ fi
# requires -ldl.
if test "$GC" = boehm; then
echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
-echo "configure:5396: checking for main in -ldl" >&5
+echo "configure:5389: checking for main in -ldl" >&5
ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5400,14 +5393,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5404 "configure"
+#line 5397 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5473,7 +5466,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcj; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5477: checking for $ac_word" >&5
+echo "configure:5470: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5505,7 +5498,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gcj", so it can be a program name with args.
set dummy gcj; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5509: checking for $ac_word" >&5
+echo "configure:5502: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5567,13 +5560,13 @@ exec 5>>./config.log
CPPFLAGS=$GCJ_SAVE_CPPFLAGS
echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:5571: checking size of void *" >&5
+echo "configure:5564: checking size of void *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 5577 "configure"
+#line 5570 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -5583,7 +5576,7 @@ int main() {
switch (0) case 0: case (sizeof (void *) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:5587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_void_p=$ac_size
else
@@ -5684,18 +5677,18 @@ EOF
echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
-echo "configure:5688: checking for g++ -ffloat-store bug" >&5
+echo "configure:5681: checking for g++ -ffloat-store bug" >&5
save_CFLAGS="$CFLAGS"
CFLAGS="-x c++ -O2 -ffloat-store"
cat > conftest.$ac_ext <<EOF
-#line 5692 "configure"
+#line 5685 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:5699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
else
@@ -5715,17 +5708,17 @@ for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5719: checking for $ac_hdr" >&5
+echo "configure:5712: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5724 "configure"
+#line 5717 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5755,17 +5748,17 @@ for ac_hdr in dirent.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5759: checking for $ac_hdr" >&5
+echo "configure:5752: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5764 "configure"
+#line 5757 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5795,17 +5788,17 @@ for ac_hdr in inttypes.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5799: checking for $ac_hdr" >&5
+echo "configure:5792: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5804 "configure"
+#line 5797 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5841,12 +5834,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:5845: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:5838: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5850 "configure"
+#line 5843 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -5862,7 +5855,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:5866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -5884,12 +5877,12 @@ fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:5888: checking for ANSI C header files" >&5
+echo "configure:5881: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5893 "configure"
+#line 5886 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -5897,7 +5890,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5914,7 +5907,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5918 "configure"
+#line 5911 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -5932,7 +5925,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5936 "configure"
+#line 5929 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -5953,7 +5946,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 5957 "configure"
+#line 5950 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -5964,7 +5957,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -5988,12 +5981,12 @@ EOF
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:5992: checking for ssize_t" >&5
+echo "configure:5985: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5997 "configure"
+#line 5990 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -6022,9 +6015,9 @@ fi
echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
-echo "configure:6026: checking for in_addr_t" >&5
+echo "configure:6019: checking for in_addr_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 6028 "configure"
+#line 6021 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -6038,7 +6031,7 @@ int main() {
in_addr_t foo;
; return 0; }
EOF
-if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_IN_ADDR_T 1
@@ -6054,16 +6047,16 @@ fi
rm -f conftest*
echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
-echo "configure:6058: checking whether struct ip_mreq is in netinet/in.h" >&5
+echo "configure:6051: checking whether struct ip_mreq is in netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6060 "configure"
+#line 6053 "configure"
#include "confdefs.h"
#include <netinet/in.h>
int main() {
struct ip_mreq mreq;
; return 0; }
EOF
-if { (eval echo configure:6067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_IP_MREQ 1
@@ -6079,16 +6072,16 @@ fi
rm -f conftest*
echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
-echo "configure:6083: checking whether struct ipv6_mreq is in netinet/in.h" >&5
+echo "configure:6076: checking whether struct ipv6_mreq is in netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6085 "configure"
+#line 6078 "configure"
#include "confdefs.h"
#include <netinet/in.h>
int main() {
struct ipv6_mreq mreq6;
; return 0; }
EOF
-if { (eval echo configure:6092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_IPV6_MREQ 1
@@ -6104,16 +6097,16 @@ fi
rm -f conftest*
echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
-echo "configure:6108: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
+echo "configure:6101: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6110 "configure"
+#line 6103 "configure"
#include "confdefs.h"
#include <netinet/in.h>
int main() {
struct sockaddr_in6 addr6;
; return 0; }
EOF
-if { (eval echo configure:6117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_INET6 1
@@ -6129,9 +6122,9 @@ fi
rm -f conftest*
echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
-echo "configure:6133: checking for socklen_t in sys/socket.h" >&5
+echo "configure:6126: checking for socklen_t in sys/socket.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6135 "configure"
+#line 6128 "configure"
#include "confdefs.h"
#define _POSIX_PII_SOCKET
#include <sys/types.h>
@@ -6140,7 +6133,7 @@ int main() {
socklen_t x = 5;
; return 0; }
EOF
-if { (eval echo configure:6144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_SOCKLEN_T 1
@@ -6156,16 +6149,16 @@ fi
rm -f conftest*
echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
-echo "configure:6160: checking for tm_gmtoff in struct tm" >&5
+echo "configure:6153: checking for tm_gmtoff in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 6162 "configure"
+#line 6155 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
struct tm tim; tim.tm_gmtoff = 0;
; return 0; }
EOF
-if { (eval echo configure:6169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define STRUCT_TM_HAS_GMTOFF 1
@@ -6178,16 +6171,16 @@ else
rm -rf conftest*
echo "$ac_t""no" 1>&6
echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
-echo "configure:6182: checking for global timezone variable" >&5
+echo "configure:6175: checking for global timezone variable" >&5
cat > conftest.$ac_ext <<EOF
-#line 6184 "configure"
+#line 6177 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
void i(){long z2 = 2*timezone;}
; return 0; }
EOF
-if { (eval echo configure:6191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TIMEZONE 1
@@ -6200,16 +6193,16 @@ else
rm -rf conftest*
echo "$ac_t""no" 1>&6
echo $ac_n "checking for global _timezone variable""... $ac_c" 1>&6
-echo "configure:6204: checking for global _timezone variable" >&5
+echo "configure:6197: checking for global _timezone variable" >&5
cat > conftest.$ac_ext <<EOF
-#line 6206 "configure"
+#line 6199 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
long z2 = _timezone;
; return 0; }
EOF
-if { (eval echo configure:6213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_UNDERSCORE_TIMEZONE 1
@@ -6231,19 +6224,19 @@ rm -f conftest*
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:6235: checking for working alloca.h" >&5
+echo "configure:6228: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6240 "configure"
+#line 6233 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -6264,12 +6257,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:6268: checking for alloca" >&5
+echo "configure:6261: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6273 "configure"
+#line 6266 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -6297,7 +6290,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -6329,12 +6322,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:6333: checking whether alloca needs Cray hooks" >&5
+echo "configure:6326: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6338 "configure"
+#line 6331 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -6359,12 +6352,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6363: checking for $ac_func" >&5
+echo "configure:6356: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6368 "configure"
+#line 6361 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6387,7 +6380,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6414,7 +6407,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:6418: checking stack direction for C alloca" >&5
+echo "configure:6411: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6422,7 +6415,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 6426 "configure"
+#line 6419 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -6441,7 +6434,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:6445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -6468,7 +6461,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6472: checking for $ac_word" >&5
+echo "configure:6465: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6524,6 +6517,9 @@ case "${host}" in
s390*-*-linux*)
SIGNAL_HANDLER=include/s390-signal.h
;;
+ x86_64*-*-linux*)
+ SIGNAL_HANDLER=include/dwarf2-signal.h
+ ;;
sparc*-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
@@ -6555,7 +6551,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:6559: checking for X" >&5
+echo "configure:6555: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -6617,12 +6613,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 6621 "configure"
+#line 6617 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6691,14 +6687,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6695 "configure"
+#line 6691 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -6804,17 +6800,17 @@ else
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:6808: checking whether -R must be followed by a space" >&5
+echo "configure:6804: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 6811 "configure"
+#line 6807 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
@@ -6830,14 +6826,14 @@ rm -f conftest*
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 6834 "configure"
+#line 6830 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
@@ -6869,7 +6865,7 @@ rm -f conftest*
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:6873: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:6869: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6877,7 +6873,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6881 "configure"
+#line 6877 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6888,7 +6884,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6910,7 +6906,7 @@ fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:6914: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:6910: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6918,7 +6914,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6922 "configure"
+#line 6918 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6929,7 +6925,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:6933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6958,12 +6954,12 @@ fi
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:6962: checking for gethostbyname" >&5
+echo "configure:6958: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6967 "configure"
+#line 6963 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -6986,7 +6982,7 @@ gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:6990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -7007,7 +7003,7 @@ fi
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:7011: checking for gethostbyname in -lnsl" >&5
+echo "configure:7007: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7015,7 +7011,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7019 "configure"
+#line 7015 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7026,7 +7022,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7056,12 +7052,12 @@ fi
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:7060: checking for connect" >&5
+echo "configure:7056: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7065 "configure"
+#line 7061 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -7084,7 +7080,7 @@ connect();
; return 0; }
EOF
-if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -7105,7 +7101,7 @@ fi
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:7109: checking for connect in -lsocket" >&5
+echo "configure:7105: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7113,7 +7109,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7117 "configure"
+#line 7113 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7124,7 +7120,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:7128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7148,12 +7144,12 @@ fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:7152: checking for remove" >&5
+echo "configure:7148: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7157 "configure"
+#line 7153 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
@@ -7176,7 +7172,7 @@ remove();
; return 0; }
EOF
-if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
@@ -7197,7 +7193,7 @@ fi
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:7201: checking for remove in -lposix" >&5
+echo "configure:7197: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7205,7 +7201,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7209 "configure"
+#line 7205 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7216,7 +7212,7 @@ int main() {
remove()
; return 0; }
EOF
-if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7240,12 +7236,12 @@ fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:7244: checking for shmat" >&5
+echo "configure:7240: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7249 "configure"
+#line 7245 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
@@ -7268,7 +7264,7 @@ shmat();
; return 0; }
EOF
-if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
@@ -7289,7 +7285,7 @@ fi
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:7293: checking for shmat in -lipc" >&5
+echo "configure:7289: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7297,7 +7293,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7301 "configure"
+#line 7297 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7308,7 +7304,7 @@ int main() {
shmat()
; return 0; }
EOF
-if { (eval echo configure:7312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7341,7 +7337,7 @@ fi
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:7345: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:7341: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7349,7 +7345,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7353 "configure"
+#line 7349 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7360,7 +7356,7 @@ int main() {
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:7364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7701,7 +7697,7 @@ cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
diff --git a/libjava/configure.host b/libjava/configure.host
index 5089b1dc9c6..94d591f7487 100644
--- a/libjava/configure.host
+++ b/libjava/configure.host
@@ -85,6 +85,16 @@ case "${host}" in
enable_hash_synchronization_default=yes
slow_pthread_self=yes
;;
+ x86_64-*)
+ sysdeps_dir=x86-64
+ libgcj_flags="${libgcj_flags} -ffloat-store"
+ libgcj_interpreter=no
+ libgcj_cxxflags="-D__NO_MATH_INLINES"
+ libgcj_cflags="-D__NO_MATH_INLINES"
+ DIVIDESPEC=-fno-use-divide-subroutine
+ enable_hash_synchronization_default=yes
+ slow_pthread_self=yes
+ ;;
alpha*-*)
sysdeps_dir=alpha
libgcj_flags="${libgcj_flags} -mieee"
@@ -127,7 +137,8 @@ case "${host}" in
alpha*-linux* | \
s390*-linux* | \
sparc*-linux* | \
- ia64-*)
+ ia64-* | \
+ x86_64*-linux*)
can_unwind_signal=yes
;;
*-*-darwin*)
diff --git a/libjava/configure.in b/libjava/configure.in
index d8ffa32dd05..41a03a6edab 100644
--- a/libjava/configure.in
+++ b/libjava/configure.in
@@ -493,7 +493,8 @@ if test "x${with_newlib}" = "xyes"; then
# If Canadian cross, then don't pick up tools from the build
# directory.
- if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
+ if test x"$build" != x"$with_cross_host" \
+ && test x"$build" != x"$target"; then
CANADIAN=yes
GCC_UNWIND_INCLUDE=
GCJ="${target_alias}-gcj"
@@ -913,6 +914,9 @@ case "${host}" in
s390*-*-linux*)
SIGNAL_HANDLER=include/s390-signal.h
;;
+ x86_64*-*-linux*)
+ SIGNAL_HANDLER=include/dwarf2-signal.h
+ ;;
sparc*-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
diff --git a/libjava/gcj/javaprims.h b/libjava/gcj/javaprims.h
index 42104f8566b..99442c5ca2a 100644
--- a/libjava/gcj/javaprims.h
+++ b/libjava/gcj/javaprims.h
@@ -134,7 +134,6 @@ extern "Java"
class AssertionError;
class Boolean;
class Byte;
- class CPlusPlusDemangler;
class CharSequence;
class Character;
class Character$Subset;
diff --git a/libjava/gnu/java/security/provider/DefaultPolicy.java b/libjava/gnu/java/security/provider/DefaultPolicy.java
index 5895a101689..f3385fa04fb 100644
--- a/libjava/gnu/java/security/provider/DefaultPolicy.java
+++ b/libjava/gnu/java/security/provider/DefaultPolicy.java
@@ -1,5 +1,5 @@
/* DefaultPolicy.java
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,16 +47,13 @@ import java.security.*;
*/
public class DefaultPolicy extends Policy
{
- static Permissions allPermissions = new Permissions();
-
- static
- {
- allPermissions.add(new AllPermission());
- }
+ static Permission allPermission = new AllPermission();
public PermissionCollection getPermissions(CodeSource codesource)
{
- return allPermissions;
+ Permissions perms = new Permissions();
+ perms.add(allPermission);
+ return perms;
}
public void refresh()
diff --git a/libjava/gnu/java/security/provider/MD5.java b/libjava/gnu/java/security/provider/MD5.java
index 9a789dfa2e2..9f7f601611e 100644
--- a/libjava/gnu/java/security/provider/MD5.java
+++ b/libjava/gnu/java/security/provider/MD5.java
@@ -1,5 +1,5 @@
/* MD5.java -- Class implementing the MD5 algorithm as specified in RFC1321.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,14 +37,14 @@ exception statement from your version. */
package gnu.java.security.provider;
-import java.security.MessageDigest;
+import java.security.MessageDigestSpi;
/**
This class implements the MD5 algorithm as described in RFC1321.
@see java.security.MessageDigest
*/
-public class MD5 extends MessageDigest implements Cloneable
+public class MD5 extends MessageDigestSpi implements Cloneable
{
private final int W[] = new int[16];
private long bytecount;
@@ -55,7 +55,7 @@ public class MD5 extends MessageDigest implements Cloneable
public MD5()
{
- super("MD5");
+ super();
engineReset ();
}
diff --git a/libjava/gnu/java/security/provider/SHA.java b/libjava/gnu/java/security/provider/SHA.java
index ce1ba6c1d0d..90459466a89 100644
--- a/libjava/gnu/java/security/provider/SHA.java
+++ b/libjava/gnu/java/security/provider/SHA.java
@@ -63,15 +63,15 @@ public class SHA extends MessageDigest implements Cloneable
public void engineUpdate (byte b)
{
- int i = (int)bytecount % 64;
- int shift = (3 - i % 4) * 8;
+ int i = ((int)bytecount) & 0x3f; //wgs
+ int shift = (3 - i % 4) << 3;
int idx = i / 4;
- // if you could index ints, this would be: W[idx][shift/8] = b
- W[idx] = (W[idx] & ~(0xff << shift)) | ((b & 0xff) << shift);
+ i = (int)b;
+ W[idx] = (W[idx] & ~(0xff << shift)) | ((i & 0xff) << shift);
// if we've filled up a block, then process it
- if ((++ bytecount) % 64 == 0)
+ if (((++bytecount) & 0x3f) == 0)
munch ();
}
@@ -99,12 +99,12 @@ public class SHA extends MessageDigest implements Cloneable
public byte[] engineDigest ()
{
- long bitcount = bytecount * 8;
+ long bitcount = bytecount << 3;
engineUpdate ((byte)0x80); // 10000000 in binary; the start of the padding
// add the rest of the padding to fill this block out, but leave 8
// bytes to put in the original bytecount
- while ((int)bytecount % 64 != 56)
+ while ((bytecount & 0x3f) != 56)
engineUpdate ((byte)0);
// add the length of the original, unpadded block to the end of
diff --git a/libjava/include/dwarf2-signal.h b/libjava/include/dwarf2-signal.h
index 7dbcd9dfd2d..b996732b743 100644
--- a/libjava/include/dwarf2-signal.h
+++ b/libjava/include/dwarf2-signal.h
@@ -209,6 +209,9 @@ do \
while (0)
#endif
#elif !defined(__ia64__)
+#if defined(__x86_64__)
+#define SYS_sigaction SYS_rt_sigaction
+#endif
#define INIT_SEGV \
do \
{ \
diff --git a/libjava/include/name-finder.h b/libjava/include/name-finder.h
index 805725b4b69..67ae0587fb0 100644
--- a/libjava/include/name-finder.h
+++ b/libjava/include/name-finder.h
@@ -29,6 +29,8 @@ details. */
#include <unistd.h>
#endif
+#include <java/lang/StackTraceElement.h>
+
/* _Jv_name_finder is a class wrapper around a mechanism that can
convert addresses of methods to their names and the names of files
in which they appear. */
@@ -47,12 +49,26 @@ public:
if (b_pipe_fd != NULL)
fclose (b_pipe_fd);
+ myclose (f2_pipe[0]);
+ myclose (f2_pipe[1]);
+ myclose (b2_pipe[0]);
+ myclose (b2_pipe[1]);
+ if (b2_pipe_fd != NULL)
+ fclose (b2_pipe_fd);
+
if (pid >= 0)
{
int wstat;
// We don't care about errors here.
waitpid (pid, &wstat, 0);
}
+
+ if (pid2 >= 0)
+ {
+ int wstat;
+ // We don't care about errors here.
+ waitpid (pid2, &wstat, 0);
+ }
#endif
}
@@ -60,25 +76,21 @@ public:
name and the appropriate line and source file. The caller passes
the code pointer in p.
- Returns false if the lookup fails. Even if this happens, the field
- hex will have been correctly filled in with the pointer.
+ Returns NULL if the lookup fails. Even if this happens, the field
+ hex will have been correctly filled in with the pointer. */
- The other fields are method_name and file_name, which lookup will
- attempt to fill appropriately. If the lookup has failed, these
- fields contain garbage.*/
- bool lookup (void *p);
+ java::lang::StackTraceElement* lookup (void *p);
- char method_name[1024];
- char file_name[1024];
char hex[sizeof (void *) * 2 + 5];
private:
void toHex (void *p);
+ java::lang::StackTraceElement* createStackTraceElement(char *s, char *f);
#if defined (HAVE_PIPE) && defined (HAVE_FORK)
- pid_t pid;
- int f_pipe[2], b_pipe[2];
- FILE *b_pipe_fd;
- int error;
+ pid_t pid, pid2;
+ int f_pipe[2], b_pipe[2], f2_pipe[2], b2_pipe[2];
+ FILE *b_pipe_fd, *b2_pipe_fd;
+ int demangling_error, lookup_error;
// Close a descriptor only if it has not been closed.
void myclose (int fd)
diff --git a/libjava/java/beans/PropertyChangeEvent.java b/libjava/java/beans/PropertyChangeEvent.java
index d65ca6857c0..83ca681ce13 100644
--- a/libjava/java/beans/PropertyChangeEvent.java
+++ b/libjava/java/beans/PropertyChangeEvent.java
@@ -1,5 +1,5 @@
-/* java.beans.PropertyChangeEvent
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* PropertyChangeEvent.java -- describes a change in a property
+ Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -38,87 +38,152 @@ exception statement from your version. */
package java.beans;
+import java.util.EventObject;
+
/**
- ** PropertyChangeEvents are fired in the PropertyChange
- ** and VetoableChange event classes. They represent the
- ** old and new values as well as the source Bean.<P>
- **
- ** If the old or new value is a primitive type, it must
- ** be wrapped in the appropriate wrapper type
- ** (java.lang.Integer for int, etc., etc.).<P>
- **
- ** If the old or new values are unknown (although why
- ** that would be I do not know), they may be null.<P>
- **
- ** Right now Sun put in a propagationId, reserved for
- ** future use. Read the comments on the constructor
- ** and on setPropagationId for more information.
- **
- ** @author John Keiser
- ** @since JDK1.1
- ** @version 1.1.0, 29 Jul 1998
- **/
-
-public class PropertyChangeEvent extends java.util.EventObject {
- String propertyName;
- Object oldValue;
- Object newValue;
- Object propagationId;
-
- private static final long serialVersionUID = 7042693688939648123L;
-
- /** Create a new PropertyChangeEvent. Remember that if
- ** you received a PropertyChangeEvent and are sending
- ** a new one, you should also set the propagation ID
- ** from the old PropertyChangeEvent.
- ** @param source the Bean containing the property.
- ** @param propertyName the property's name.
- ** @param oldValue the old value of the property.
- ** @param newValue the new value of the property.
- **/
- public PropertyChangeEvent(Object source, String propertyName, Object oldVal, Object newVal) {
- super(source);
- this.propertyName = propertyName;
- oldValue = oldVal;
- newValue = newVal;
- }
-
- /** Get the property name.
- ** @return the property name.
- **/
- public String getPropertyName() {
- return propertyName;
- }
-
- /** Get the property's old value.
- ** @return the property's old value.
- **/
- public Object getOldValue() {
- return oldValue;
- }
-
- /** Get the property's new value.
- ** @return the property's new value.
- **/
- public Object getNewValue() {
- return newValue;
- }
-
- /** Set the propagation ID. This is a way for the event
- ** to be passed from hand to hand and retain a little
- ** extra state. Right now it is unused, but it should
- ** be propagated anyway so that future versions of
- ** JavaBeans can use it, for God knows what.
- ** @param propagationId the propagation ID.
- **/
- public void setPropagationId(Object propagationId) {
- this.propagationId = propagationId;
- }
-
- /** Get the propagation ID.
- ** @return the propagation ID.
- **/
- public Object getPropagationId() {
- return propagationId;
- }
-}
+ * PropertyChangeEvents are fired in the PropertyChange and VetoableChange
+ * event classes. They represent the old and new values as well as the
+ * source Bean. If the old or new value is a primitive type, it must be
+ * wrapped in the appropriate wrapper type (java.lang.Integer for int, etc.,
+ * etc.).
+ *
+ * <p>If the old or new values are unknown (although why that would be I do
+ * not know), they may be null. Also, if the set of properties itself has
+ * changed, the name should be null, and the old and new values may also be
+ * null. Right now Sun put in a propagationId, reserved for future use. Read
+ * the comments on the constructor and on setPropagationId for more
+ * information.
+ *
+ * @author John Keiser
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @since 1.1
+ * @status udpated to 1.4
+ */
+public class PropertyChangeEvent extends EventObject
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 7042693688939648123L;
+
+ /**
+ * The name of the property that changed, may be null. Package visible for
+ * use by PropertyChangeSupport.
+ *
+ * @serial the changed property name
+ */
+ final String propertyName;
+
+ /**
+ * The new value of the property, may be null. Package visible for use by
+ * PropertyChangeSupport.
+ *
+ * @serial the new property value
+ */
+ final Object newValue;
+
+ /**
+ * The old value of the property, may be null. Package visible for use by
+ * PropertyChangeSupport.
+ *
+ * @serial the old property value
+ */
+ final Object oldValue;
+
+ /**
+ * The propagation ID, reserved for future use. May be null.
+ *
+ * @see #getPropagationId()
+ * @serial the Propagation ID
+ */
+ private Object propagationId;
+
+ /**
+ * Create a new PropertyChangeEvent. Remember that if you received a
+ * PropertyChangeEvent and are sending a new one, you should also set the
+ * propagation ID from the old PropertyChangeEvent.
+ *
+ * @param source the Bean containing the property
+ * @param propertyName the property's name
+ * @param oldValue the old value of the property
+ * @param newValue the new value of the property
+ * @throws IllegalArgumentException if source is null
+ */
+ public PropertyChangeEvent(Object source, String propertyName,
+ Object oldVal, Object newVal)
+ {
+ super(source);
+ this.propertyName = propertyName;
+ oldValue = oldVal;
+ newValue = newVal;
+ }
+
+ /**
+ * Get the property name. May be null if multiple properties changed.
+ *
+ * @return the property name
+ */
+ public String getPropertyName()
+ {
+ return propertyName;
+ }
+
+ /**
+ * Get the property's new value. May be null if multiple properties changed.
+ *
+ * @return the property's new value
+ */
+ public Object getNewValue()
+ {
+ return newValue;
+ }
+
+ /**
+ * Get the property's old value. May be null if multiple properties changed.
+ *
+ * @return the property's old value
+ */
+ public Object getOldValue()
+ {
+ return oldValue;
+ }
+
+ /**
+ * Set the propagation ID. This is a way for the event to be passed from
+ * hand to hand and retain a little extra state. Right now it is unused,
+ * but it should be propagated anyway so that future versions of JavaBeans
+ * can use it, for God knows what.
+ *
+ * @param propagationId the propagation ID
+ * @see #getPropagationId()
+ */
+ public void setPropagationId(Object propagationId)
+ {
+ this.propagationId = propagationId;
+ }
+
+ /**
+ * Get the propagation ID. Right now, it is not used for anything.
+ *
+ * @return the propagation ID
+ * @see #setPropagationId(Object)
+ */
+ public Object getPropagationId()
+ {
+ return propagationId;
+ }
+
+ /**
+ * Utility method to rollback a change.
+ *
+ * @param event the event to rollback
+ * @return a new event with old and new swapped
+ */
+ PropertyChangeEvent rollback()
+ {
+ PropertyChangeEvent result
+ = new PropertyChangeEvent(source, propertyName, newValue, oldValue);
+ result.propagationId = propagationId;
+ return result;
+ }
+} // class PropertyChangeEvent
diff --git a/libjava/java/beans/PropertyChangeListener.java b/libjava/java/beans/PropertyChangeListener.java
index c3ff93a4a24..df5bd867d5b 100644
--- a/libjava/java/beans/PropertyChangeListener.java
+++ b/libjava/java/beans/PropertyChangeListener.java
@@ -1,5 +1,5 @@
-/* java.beans.PropertyChangeListener
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* PropertyChangeListener.java -- listen for changes in a bound property
+ Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -41,22 +41,21 @@ package java.beans;
import java.util.EventListener;
/**
- ** PropertyChangeListener allows a class to monitor
- ** properties of a Bean for changes.<P>
- **
- ** A propertyChange() event will only be fired
- ** <EM>after</EM> the property has changed.
- **
- ** @author John Keiser
- ** @since JDK1.1
- ** @version 1.1.0, 29 Jul 1998
- ** @see java.beans.PropertyChangeSupport
- **/
-
+ * PropertyChangeListener allows a class to monitor properties of a Bean for
+ * changes. A propertyChange() event will only be fired <em>after</em> the
+ * property has changed.
+ *
+ * @author John Keiser
+ * @see PropertyChangeSupport
+ * @since 1.1
+ * @status updated to 1.4
+ */
public interface PropertyChangeListener extends EventListener
{
- /** Fired after a Bean's property has changed.
- ** @param e the change (containing the old and new values)
- **/
- public abstract void propertyChange(PropertyChangeEvent e);
-}
+ /**
+ * Fired after a Bean's property has changed.
+ *
+ * @param e the change (containing the old and new values)
+ */
+ void propertyChange(PropertyChangeEvent e);
+} // interface PropertyChangeListener
diff --git a/libjava/java/beans/PropertyChangeSupport.java b/libjava/java/beans/PropertyChangeSupport.java
index 6fbc85f0a65..86230273591 100644
--- a/libjava/java/beans/PropertyChangeSupport.java
+++ b/libjava/java/beans/PropertyChangeSupport.java
@@ -1,5 +1,5 @@
-/* java.beans.PropertyChangeSupport
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* PropertyChangeSupport.java -- support to manage property change listeners
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -37,214 +37,452 @@ exception statement from your version. */
package java.beans;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
+
+import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.IOException;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map.Entry;
+import java.util.Vector;
/**
- ** PropertyChangeSupport makes it easy to fire property
- ** change events and handle listeners.
- **
- ** @author John Keiser
- ** @since JDK1.1
- ** @version 1.2.0, 15 Mar 1999
- **/
-
-public class PropertyChangeSupport implements java.io.Serializable {
- transient Hashtable propertyListeners = new Hashtable();
- transient Vector listeners = new Vector();
- Hashtable children;
- Object source;
- int propertyChangeSupportSerializedDataVersion = 2;
- private static final long serialVersionUID = 6401253773779951803L;
-
- /**
- * Saves the state of the object to the stream. */
- private void writeObject(ObjectOutputStream stream) throws IOException {
- children = propertyListeners.isEmpty() ? null : propertyListeners;
- stream.defaultWriteObject();
- for (Enumeration e = listeners.elements(); e.hasMoreElements(); ) {
- PropertyChangeListener l = (PropertyChangeListener)e.nextElement();
- if (l instanceof Serializable)
- stream.writeObject(l);
- }
- stream.writeObject(null);
- }
-
- /**
- * Reads the object back from stream (deserialization).
- */
- private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
- stream.defaultReadObject();
- propertyListeners = (children == null) ? new Hashtable() : children;
- PropertyChangeListener l;
- while ((l = (PropertyChangeListener)stream.readObject()) != null) {
- addPropertyChangeListener(l);
- }
- // FIXME: XXX: There is no spec for JDK 1.1 serialization
- // so it is unclear what to do if the value of
- // propertyChangeSupportSerializedDataVersion is 1.
- }
-
- /** Create PropertyChangeSupport to work with a specific
- ** source bean.
- ** @param source the source bean to use.
- **/
- public PropertyChangeSupport(Object source) {
- this.source = source;
- }
-
- /** Adds a PropertyChangeListener to the list of listeners.
- ** All property change events will be sent to this listener.
- ** <P>
- **
- ** The listener add is not unique: that is, <em>n</em> adds with
- ** the same listener will result in <em>n</em> events being sent
- ** to that listener for every property change.
- ** <P>
- **
- ** Adding a null listener will cause undefined behavior.
- **
- ** @param l the listener to add.
- **/
- public void addPropertyChangeListener(PropertyChangeListener l) {
- listeners.addElement(l);
- }
-
- /** Adds a PropertyChangeListener listening on the specified property.
- ** Events will be sent to the listener for that particular property.
- ** <P>
- **
- ** The listener add is not unique; that is, <em>n</em> adds on a
- ** particular property for a particular listener will result in
- ** <em>n</em> events being sent to that listener when that
- ** property is changed.
- ** <P>
- **
- ** The effect is cumulative, too; if you are registered to listen
- ** to receive events on all property changes, and then you
- ** register on a particular property, you will receive change
- ** events for that property twice.
- ** <P>
- **
- ** Adding a null listener will cause undefined behavior.
- **
- ** @param propertyName the name of the property to listen on.
- ** @param l the listener to add.
- **/
- public void addPropertyChangeListener(String propertyName, PropertyChangeListener l) {
- synchronized(propertyListeners) {
- Vector v = (Vector)propertyListeners.get(propertyName);
- try {
- v.addElement(l);
- } catch(NullPointerException e) {
- /* If v is not found, create a new vector. */
- v = new Vector();
- v.addElement(l);
- propertyListeners.put(propertyName, v);
- }
- }
- }
-
- /** Removes a PropertyChangeListener from the list of listeners.
- ** If any specific properties are being listened on, they must
- ** be deregistered by themselves; this will only remove the
- ** general listener to all properties.
- ** <P>
- **
- ** If <code>add()</code> has been called multiple times for a
- ** particular listener, <code>remove()</code> will have to be
- ** called the same number of times to deregister it.
- **
- ** @param l the listener to remove.
- **/
- public void removePropertyChangeListener(PropertyChangeListener l) {
- listeners.removeElement(l);
- }
-
- /** Removes a PropertyChangeListener from listening to a specific property.
- ** <P>
- **
- ** If <code>add()</code> has been called multiple times for a
- ** particular listener on a property, <code>remove()</code> will
- ** have to be called the same number of times to deregister it.
- **
- ** @param propertyName the property to stop listening on.
- ** @param l the listener to remove.
- **/
- public void removePropertyChangeListener(String propertyName, PropertyChangeListener l) {
- synchronized(propertyListeners) {
- Vector v = (Vector)propertyListeners.get(propertyName);
- try {
- v.removeElement(l);
- if(v.size() == 0) {
- propertyListeners.remove(propertyName);
- }
- } catch(NullPointerException e) {
- /* if v is not found, do nothing. */
- }
- }
- }
-
- /** Fire a PropertyChangeEvent to all the listeners.
- **
- ** @param event the event to fire.
- **/
- public void firePropertyChange(PropertyChangeEvent event) {
- for(int i=0;i<listeners.size();i++) {
- ((PropertyChangeListener)listeners.elementAt(i)).propertyChange(event);
- }
- Vector moreListeners = (Vector)propertyListeners.get(event.getPropertyName());
- if(moreListeners != null) {
- for(int i=0;i<moreListeners.size();i++) {
- ((PropertyChangeListener)moreListeners.elementAt(i)).propertyChange(event);
- }
- }
- }
-
- /** Fire a PropertyChangeEvent containing the old and new values of the property to all the listeners.
- **
- ** @param propertyName the name of the property that changed.
- ** @param oldVal the old value.
- ** @param newVal the new value.
- **/
- public void firePropertyChange(String propertyName, Object oldVal, Object newVal) {
- firePropertyChange(new PropertyChangeEvent(source,propertyName,oldVal,newVal));
- }
-
- /** Fire a PropertyChangeEvent containing the old and new values of the property to all the listeners.
- **
- ** @param propertyName the name of the property that changed.
- ** @param oldVal the old value.
- ** @param newVal the new value.
- **/
- public void firePropertyChange(String propertyName, boolean oldVal, boolean newVal) {
- firePropertyChange(new PropertyChangeEvent(source, propertyName, new Boolean(oldVal), new Boolean(newVal)));
- }
-
- /** Fire a PropertyChangeEvent containing the old and new values of the property to all the listeners.
- **
- ** @param propertyName the name of the property that changed.
- ** @param oldVal the old value.
- ** @param newVal the new value.
- **/
- public void firePropertyChange(String propertyName, int oldVal, int newVal) {
- firePropertyChange(new PropertyChangeEvent(source, propertyName, new Integer(oldVal), new Integer(newVal)));
- }
-
- /** Tell whether the specified property is being listened on or not.
- ** This will only return <code>true</code> if there are listeners
- ** on all properties or if there is a listener specifically on this
- ** property.
- **
- ** @param propertyName the property that may be listened on
- ** @return whether the property is being listened on
- **/
- public boolean hasListeners(String propertyName) {
- return listeners.size() > 0 || propertyListeners.get(propertyName) != null;
- }
-}
+ * PropertyChangeSupport makes it easy to fire property change events and
+ * handle listeners. It allows chaining of listeners, as well as filtering
+ * by property name. In addition, it will serialize only those listeners
+ * which are serializable, ignoring the others without problem. This class
+ * is thread-safe.
+ *
+ * @author John Keiser
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class PropertyChangeSupport implements Serializable
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 6401253773779951803L;
+
+ /**
+ * Maps property names (String) to named listeners (PropertyChangeSupport).
+ * If this is a child instance, this field will be null.
+ *
+ * @serial the map of property names to named listener managers
+ * @since 1.2
+ */
+ private Hashtable children;
+
+ /**
+ * The non-null source object for any generated events.
+ *
+ * @serial the event source
+ */
+ private final Object source;
+
+ /**
+ * A field to compare serialization versions - this class uses version 2.
+ *
+ * @serial the serialization format
+ */
+ private final int propertyChangeSupportSerializedDataVersion = 2;
+
+ /**
+ * The list of all registered property listeners. If this instance was
+ * created by user code, this only holds the global listeners (ie. not tied
+ * to a name), and may be null. If it was created by this class, as a
+ * helper for named properties, then this vector will be non-null, and this
+ * instance appears as a value in the <code>children</code> hashtable of
+ * another instance, so that the listeners are tied to the key of that
+ * hashtable entry.
+ */
+ private transient Vector listeners;
+
+ /**
+ * Create a PropertyChangeSupport to work with a specific source bean.
+ *
+ * @param source the source bean to use
+ * @throws NullPointerException if source is null
+ */
+ public PropertyChangeSupport(Object source)
+ {
+ this.source = source;
+ if (source == null)
+ throw new NullPointerException();
+ }
+
+ /**
+ * Adds a PropertyChangeListener to the list of global listeners. All
+ * property change events will be sent to this listener. The listener add
+ * is not unique: that is, <em>n</em> adds with the same listener will
+ * result in <em>n</em> events being sent to that listener for every
+ * property change. Adding a null listener may cause a NullPointerException
+ * down the road. This method will unwrap a PropertyChangeListenerProxy,
+ * registering the underlying delegate to the named property list.
+ *
+ * @param l the listener to add
+ */
+ public synchronized void addPropertyChangeListener(PropertyChangeListener l)
+ {
+ if (l instanceof PropertyChangeListenerProxy)
+ {
+ PropertyChangeListenerProxy p = (PropertyChangeListenerProxy) l;
+ addPropertyChangeListener(p.propertyName,
+ (PropertyChangeListener) p.getListener());
+ }
+ else
+ {
+ if (listeners == null)
+ listeners = new Vector();
+ listeners.add(l);
+ }
+ }
+
+ /**
+ * Removes a PropertyChangeListener from the list of global listeners. If
+ * any specific properties are being listened on, they must be deregistered
+ * by themselves; this will only remove the general listener to all
+ * properties. If <code>add()</code> has been called multiple times for a
+ * particular listener, <code>remove()</code> will have to be called the
+ * same number of times to deregister it. This method will unwrap a
+ * PropertyChangeListenerProxy, removing the underlying delegate from the
+ * named property list.
+ *
+ * @param l the listener to remove
+ */
+ public synchronized void
+ removePropertyChangeListener(PropertyChangeListener l)
+ {
+ if (l instanceof PropertyChangeListenerProxy)
+ {
+ PropertyChangeListenerProxy p = (PropertyChangeListenerProxy) l;
+ removePropertyChangeListener(p.propertyName,
+ (PropertyChangeListener) p.getListener());
+ }
+ else if (listeners != null)
+ {
+ listeners.remove(l);
+ if (listeners.isEmpty())
+ listeners = null;
+ }
+ }
+
+ /**
+ * Returns an array of all registered property change listeners. Those that
+ * were registered under a name will be wrapped in a
+ * <code>PropertyChangeListenerProxy</code>, so you must check whether the
+ * listener is an instance of the proxy class in order to see what name the
+ * real listener is registered under. If there are no registered listeners,
+ * this returns an empty array.
+ *
+ * @return the array of registered listeners
+ * @see PropertyChangeListenerProxy
+ * @since 1.4
+ */
+ public synchronized PropertyChangeListener[] getPropertyChangeListeners()
+ {
+ ArrayList list = new ArrayList();
+ if (listeners != null)
+ list.addAll(listeners);
+ if (children != null)
+ {
+ int i = children.size();
+ Iterator iter = children.entrySet().iterator();
+ while (--i >= 0)
+ {
+ Entry e = (Entry) iter.next();
+ String name = (String) e.getKey();
+ Vector v = ((PropertyChangeSupport) e.getValue()).listeners;
+ int j = v.size();
+ while (--j >= 0)
+ list.add(new PropertyChangeListenerProxy
+ (name, (PropertyChangeListener) v.get(j)));
+ }
+ }
+ return (PropertyChangeListener[])
+ list.toArray(new PropertyChangeListener[list.size()]);
+ }
+
+ /**
+ * Adds a PropertyChangeListener listening on the specified property. Events
+ * will be sent to the listener only if the property name matches. The
+ * listener add is not unique; that is, <em>n</em> adds on a particular
+ * property for a particular listener will result in <em>n</em> events
+ * being sent to that listener when that property is changed. The effect is
+ * cumulative, too; if you are registered to listen to receive events on
+ * all property changes, and then you register on a particular property,
+ * you will receive change events for that property twice. Adding a null
+ * listener may cause a NullPointerException down the road. This method
+ * will unwrap a PropertyChangeListenerProxy, registering the underlying
+ * delegate to the named property list if the names match, and discarding
+ * it otherwise.
+ *
+ * @param propertyName the name of the property to listen on
+ * @param l the listener to add
+ * @throws NullPointerException if propertyName is null
+ */
+ public synchronized void addPropertyChangeListener(String propertyName,
+ PropertyChangeListener l)
+ {
+ while (l instanceof PropertyChangeListenerProxy)
+ {
+ PropertyChangeListenerProxy p = (PropertyChangeListenerProxy) l;
+ if (propertyName == null ? p.propertyName != null
+ : ! propertyName.equals(p.propertyName))
+ return;
+ l = (PropertyChangeListener) p.getListener();
+ }
+ PropertyChangeSupport s = null;
+ if (children == null)
+ children = new Hashtable();
+ else
+ s = (PropertyChangeSupport) children.get(propertyName);
+ if (s == null)
+ {
+ s = new PropertyChangeSupport(source);
+ s.listeners = new Vector();
+ children.put(propertyName, s);
+ }
+ s.listeners.add(l);
+ }
+
+ /**
+ * Removes a PropertyChangeListener from listening to a specific property.
+ * If <code>add()</code> has been called multiple times for a particular
+ * listener on a property, <code>remove()</code> will have to be called the
+ * same number of times to deregister it. This method will unwrap a
+ * PropertyChangeListenerProxy, removing the underlying delegate from the
+ * named property list if the names match.
+ *
+ * @param propertyName the property to stop listening on
+ * @param l the listener to remove
+ * @throws NullPointerException if propertyName is null
+ */
+ public synchronized void
+ removePropertyChangeListener(String propertyName, PropertyChangeListener l)
+ {
+ if (children == null)
+ return;
+ PropertyChangeSupport s
+ = (PropertyChangeSupport) children.get(propertyName);
+ if (s == null)
+ return;
+ while (l instanceof PropertyChangeListenerProxy)
+ {
+ PropertyChangeListenerProxy p = (PropertyChangeListenerProxy) l;
+ if (propertyName == null ? p.propertyName != null
+ : ! propertyName.equals(p.propertyName))
+ return;
+ l = (PropertyChangeListener) p.getListener();
+ }
+ s.listeners.remove(l);
+ if (s.listeners.isEmpty())
+ {
+ children.remove(propertyName);
+ if (children.isEmpty())
+ children = null;
+ }
+ }
+
+ /**
+ * Returns an array of all property change listeners registered under the
+ * given property name. If there are no registered listeners, this returns
+ * an empty array.
+ *
+ * @return the array of registered listeners
+ * @throws NullPointerException if propertyName is null
+ * @since 1.4
+ */
+ public synchronized PropertyChangeListener[]
+ getPropertyChangeListeners(String propertyName)
+ {
+ if (children == null)
+ return new PropertyChangeListener[0];
+ PropertyChangeSupport s
+ = (PropertyChangeSupport) children.get(propertyName);
+ if (s == null)
+ return new PropertyChangeListener[0];
+ return (PropertyChangeListener[])
+ s.listeners.toArray(new PropertyChangeListener[s.listeners.size()]);
+ }
+
+ /**
+ * Fire a PropertyChangeEvent containing the old and new values of the
+ * property to all the global listeners, and to all the listeners for the
+ * specified property name. This does nothing if old and new are non-null
+ * and equal.
+ *
+ * @param propertyName the name of the property that changed
+ * @param oldVal the old value
+ * @param newVal the new value
+ */
+ public void firePropertyChange(String propertyName,
+ Object oldVal, Object newVal)
+ {
+ firePropertyChange(new PropertyChangeEvent(source, propertyName,
+ oldVal, newVal));
+ }
+
+ /**
+ * Fire a PropertyChangeEvent containing the old and new values of the
+ * property to all the global listeners, and to all the listeners for the
+ * specified property name. This does nothing if old and new are equal.
+ *
+ * @param propertyName the name of the property that changed
+ * @param oldVal the old value
+ * @param newVal the new value
+ */
+ public void firePropertyChange(String propertyName, int oldVal, int newVal)
+ {
+ if (oldVal != newVal)
+ firePropertyChange(new PropertyChangeEvent(source, propertyName,
+ new Integer(oldVal),
+ new Integer(newVal)));
+ }
+
+ /**
+ * Fire a PropertyChangeEvent containing the old and new values of the
+ * property to all the global listeners, and to all the listeners for the
+ * specified property name. This does nothing if old and new are equal.
+ *
+ * @param propertyName the name of the property that changed
+ * @param oldVal the old value
+ * @param newVal the new value
+ */
+ public void firePropertyChange(String propertyName,
+ boolean oldVal, boolean newVal)
+ {
+ if (oldVal != newVal)
+ firePropertyChange(new PropertyChangeEvent(source, propertyName,
+ Boolean.valueOf(oldVal),
+ Boolean.valueOf(newVal)));
+ }
+
+ /**
+ * Fire a PropertyChangeEvent to all the global listeners, and to all the
+ * listeners for the specified property name. This does nothing if old and
+ * new values of the event are equal.
+ *
+ * @param event the event to fire
+ * @throws NullPointerException if event is null
+ */
+ public void firePropertyChange(PropertyChangeEvent event)
+ {
+ if (event.oldValue != null && event.oldValue.equals(event.newValue))
+ return;
+ Vector v = listeners; // Be thread-safe.
+ if (v != null)
+ {
+ int i = v.size();
+ while (--i >= 0)
+ ((PropertyChangeListener) v.get(i)).propertyChange(event);
+ }
+ Hashtable h = children; // Be thread-safe.
+ if (h != null && event.propertyName != null)
+ {
+ PropertyChangeSupport s
+ = (PropertyChangeSupport) h.get(event.propertyName);
+ if (s != null)
+ {
+ v = s.listeners; // Be thread-safe.
+ int i = v == null ? 0 : v.size();
+ while (--i >= 0)
+ ((PropertyChangeListener) v.get(i)).propertyChange(event);
+ }
+ }
+ }
+
+ /**
+ * Tell whether the specified property is being listened on or not. This
+ * will only return <code>true</code> if there are listeners on all
+ * properties or if there is a listener specifically on this property.
+ *
+ * @param propertyName the property that may be listened on
+ * @return whether the property is being listened on
+ * @throws NullPointerException if propertyName is null
+ */
+ public synchronized boolean hasListeners(String propertyName)
+ {
+ return listeners != null || (children != null
+ && children.get(propertyName) != null);
+ }
+
+ /**
+ * Saves the state of the object to the stream.
+ *
+ * @param s the stream to write to
+ * @throws IOException if anything goes wrong
+ * @serialData this writes out a null-terminated list of serializable
+ * global property change listeners (the listeners for a named
+ * property are written out as the global listeners of the
+ * children, when the children hashtable is saved)
+ */
+ private synchronized void writeObject(ObjectOutputStream s)
+ throws IOException
+ {
+ s.defaultWriteObject();
+ if (listeners != null)
+ {
+ int i = listeners.size();
+ while (--i >= 0)
+ if (listeners.get(i) instanceof Serializable)
+ s.writeObject(listeners.get(i));
+ }
+ s.writeObject(null);
+ }
+
+ /**
+ * Reads the object back from stream (deserialization).
+ *
+ * XXX Since serialization for 1.1 streams was not documented, this may
+ * not work if propertyChangeSupportSerializedDataVersion is 1.
+ *
+ * @param s the stream to read from
+ * @throws IOException if reading the stream fails
+ * @throws ClassNotFoundException if deserialization fails
+ * @serialData this reads in a null-terminated list of serializable
+ * global property change listeners (the listeners for a named
+ * property are written out as the global listeners of the
+ * children, when the children hashtable is saved)
+ */
+ private void readObject(ObjectInputStream s)
+ throws IOException, ClassNotFoundException
+ {
+ s.defaultReadObject();
+ PropertyChangeListener l = (PropertyChangeListener) s.readObject();
+ while (l != null)
+ {
+ addPropertyChangeListener(l);
+ l = (PropertyChangeListener) s.readObject();
+ }
+ // Sun is not as careful with children as we are, and lets some proxys
+ // in that can never receive events. So, we clean up anything that got
+ // serialized, to make sure our invariants hold.
+ if (children != null)
+ {
+ int i = children.size();
+ Iterator iter = children.entrySet().iterator();
+ while (--i >= 0)
+ {
+ Entry e = (Entry) iter.next();
+ String name = (String) e.getKey();
+ PropertyChangeSupport pcs = (PropertyChangeSupport) e.getValue();
+ if (pcs.listeners == null)
+ pcs.listeners = new Vector();
+ if (pcs.children != null)
+ pcs.listeners.addAll
+ (Arrays.asList(pcs.getPropertyChangeListeners(name)));
+ if (pcs.listeners.size() == 0)
+ iter.remove();
+ else
+ pcs.children = null;
+ }
+ if (children.size() == 0)
+ children = null;
+ }
+ }
+} // class PropertyChangeSupport
diff --git a/libjava/java/beans/VetoableChangeListener.java b/libjava/java/beans/VetoableChangeListener.java
index bb91e7491e7..1620a6620aa 100644
--- a/libjava/java/beans/VetoableChangeListener.java
+++ b/libjava/java/beans/VetoableChangeListener.java
@@ -1,5 +1,5 @@
-/* java.beans.VetoableChangeListener
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* VetoableChangeListener.java -- listen for a change which can be vetoed
+ Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -41,37 +41,33 @@ package java.beans;
import java.util.EventListener;
/**
- ** VetoableChangeListener allows a class to monitor
- ** proposed changes to properties of a Bean and, if
- ** desired, prevent them from occurring.<P>
- **
- ** A vetoableChange() event will be fired <EM>before</EM>
- ** the property has changed. If any listener rejects the
- ** change by throwing the PropertyChangeException, a new
- ** vetoableChange() event will be fired to all listeners
- ** who received a vetoableChange() event in the first
- ** place informing them of a reversion to the old value.
- ** The value, of course, never actually changed.<P>
- **
- ** <STRONG>Note:</STRONG> This class may not be reliably
- ** used to determine whether a property has actually
- ** changed. Use the PropertyChangeListener interface
- ** for that instead.
- **
- ** @author John Keiser
- ** @version 1.1.0, 29 Jul 1998
- ** @since JDK1.1
- ** @see java.beans.PropertyChangeListener
- ** @see java.beans.VetoableChangeSupport
- **/
-
+ * VetoableChangeListener allows a class to monitor proposed changes to
+ * properties of a Bean and, if desired, prevent them from occurring. A
+ * vetoableChange() event will be fired <em>after</em> the property change has
+ * been requested, but before it is permanent. If any listener rejects the
+ * change by throwing the PropertyChangeException, a new vetoableChange()
+ * event will be fired to all listeners who received a vetoableChange() event
+ * in the first place, informing them to revert back to the old value. Thus,
+ * the listener that threw the exception the first time should be prepared
+ * to rethrow it the second time. The value, of course, never actually changed.
+ *
+ * <p><strong>Note:</strong> This class may not be reliably used to determine
+ * whether a property has actually changed. Use the PropertyChangeListener
+ * interface for that instead.
+ *
+ * @author John Keiser
+ * @see java.beans.PropertyChangeListener
+ * @see java.beans.VetoableChangeSupport
+ * @since 1.1
+ * @status updated to 1.4
+ */
public interface VetoableChangeListener extends EventListener
{
- /** Fired before a Bean's property changes.
- ** @param e the change (containing the old and new values)
- ** @exception PropertyChangeException if the listener
- ** does not desire the change to be made.
- **/
- public abstract void vetoableChange(PropertyChangeEvent e)
- throws PropertyVetoException;
-}
+ /**
+ * Fired before a Bean's property changes.
+ *
+ * @param e the change (containing the old and new values)
+ * @throws PropertyVetoException if the change is vetoed by the listener
+ */
+ void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException;
+} // interface VetoableChangeListener
diff --git a/libjava/java/beans/VetoableChangeSupport.java b/libjava/java/beans/VetoableChangeSupport.java
index 831384830b6..d7d0d2cb59a 100644
--- a/libjava/java/beans/VetoableChangeSupport.java
+++ b/libjava/java/beans/VetoableChangeSupport.java
@@ -1,5 +1,5 @@
-/* java.beans.VetoableChangeSupport
- Copyright (C) 1998 Free Software Foundation, Inc.
+/* VetoableChangeSupport.java -- support to manage vetoable change listeners
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -35,265 +35,496 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package java.beans;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
+
+import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.IOException;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map.Entry;
+import java.util.Vector;
/**
- ** VetoableChangeSupport makes it easy to fire vetoable
- ** change events and handle listeners as well as reversion
- ** of old values when things go wrong.
- **
- ** @author John Keiser
- ** @since JDK1.1
- ** @version 1.2.0, 15 Mar 1998
- **/
+ * VetoableChangeSupport makes it easy to fire vetoable change events and
+ * handle listeners. It allows chaining of listeners, as well as filtering
+ * by property name. In addition, it will serialize only those listeners
+ * which are serializable, ignoring the others without problem. This class
+ * is thread-safe.
+ *
+ * @author John Keiser
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class VetoableChangeSupport implements Serializable
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = -5090210921595982017L;
-public class VetoableChangeSupport implements java.io.Serializable {
- transient Hashtable propertyListeners = new Hashtable();
- transient Vector listeners = new Vector();
- Hashtable children;
- Object source;
- int vetoableChangeSupportSerializedDataVersion = 2;
- private static final long serialVersionUID = -5090210921595982017L;
+ /**
+ * Maps property names (String) to named listeners (VetoableChangeSupport).
+ * If this is a child instance, this field will be null.
+ *
+ * @serial the map of property names to named listener managers
+ * @since 1.2
+ */
+ private Hashtable children;
- /**
- * Saves the state of the object to the stream. */
- private void writeObject(ObjectOutputStream stream) throws IOException {
- children = propertyListeners.isEmpty() ? null : propertyListeners;
- stream.defaultWriteObject();
- for (Enumeration e = listeners.elements(); e.hasMoreElements(); ) {
- VetoableChangeListener l = (VetoableChangeListener)e.nextElement();
- if (l instanceof Serializable)
- stream.writeObject(l);
- }
- stream.writeObject(null);
- }
+ /**
+ * The non-null source object for any generated events.
+ *
+ * @serial the event source
+ */
+ private final Object source;
- /**
- * Reads the object back from stream (deserialization).
- */
- private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
- stream.defaultReadObject();
- propertyListeners = (children == null) ? new Hashtable() : children;
- VetoableChangeListener l;
- while ((l = (VetoableChangeListener)stream.readObject()) != null) {
- addVetoableChangeListener(l);
- }
- // FIXME: XXX: There is no spec for JDK 1.1 serialization
- // so it is unclear what to do if the value of
- // vetoableChangeSupportSerializedDataVersion is 1.
- }
+ /**
+ * A field to compare serialization versions - this class uses version 2.
+ *
+ * @serial the serialization format
+ */
+ private final int vetoableChangeSupportSerializedDataVersion = 2;
+ /**
+ * The list of all registered vetoable listeners. If this instance was
+ * created by user code, this only holds the global listeners (ie. not tied
+ * to a name), and may be null. If it was created by this class, as a
+ * helper for named properties, then this vector will be non-null, and this
+ * instance appears as a value in the <code>children</code> hashtable of
+ * another instance, so that the listeners are tied to the key of that
+ * hashtable entry.
+ */
+ private transient Vector listeners;
- /** Create VetoableChangeSupport to work with a specific
- ** source bean.
- ** @param source the source bean to use.
- **/
- public VetoableChangeSupport(Object source) {
- this.source = source;
- }
+ /**
+ * Create a VetoableChangeSupport to work with a specific source bean.
+ *
+ * @param source the source bean to use
+ * @throws NullPointerException if source is null
+ */
+ public VetoableChangeSupport(Object source)
+ {
+ this.source = source;
+ if (source == null)
+ throw new NullPointerException();
+ }
- /** Adds a VetoableChangeListener to the list of listeners.
- ** All property change events will be sent to this listener.
- ** <P>
- **
- ** The listener add is not unique: that is, <em>n</em> adds with
- ** the same listener will result in <em>n</em> events being sent
- ** to that listener for every property change.
- ** <P>
- **
- ** Adding a null listener will cause undefined behavior.
- **
- ** @param l the listener to add.
- **/
- public void addVetoableChangeListener(VetoableChangeListener l) {
- listeners.addElement(l);
- }
+ /**
+ * Adds a VetoableChangeListener to the list of global listeners. All
+ * vetoable change events will be sent to this listener. The listener add
+ * is not unique: that is, <em>n</em> adds with the same listener will
+ * result in <em>n</em> events being sent to that listener for every
+ * vetoable change. Adding a null listener may cause a NullPointerException
+ * down the road. This method will unwrap a VetoableChangeListenerProxy,
+ * registering the underlying delegate to the named property list.
+ *
+ * @param l the listener to add
+ */
+ public synchronized void addVetoableChangeListener(VetoableChangeListener l)
+ {
+ if (l instanceof VetoableChangeListenerProxy)
+ {
+ VetoableChangeListenerProxy p = (VetoableChangeListenerProxy) l;
+ addVetoableChangeListener(p.propertyName,
+ (VetoableChangeListener) p.getListener());
+ }
+ else
+ {
+ if (listeners == null)
+ listeners = new Vector();
+ listeners.add(l);
+ }
+ }
- /** Adds a VetoableChangeListener listening on the specified property.
- ** Events will be sent to the listener for that particular property.
- ** <P>
- **
- ** The listener add is not unique; that is, <em>n</em> adds on a
- ** particular property for a particular listener will result in
- ** <em>n</em> events being sent to that listener when that
- ** property is changed.
- ** <P>
- **
- ** The effect is cumulative, too; if you are registered to listen
- ** to receive events on all property changes, and then you
- ** register on a particular property, you will receive change
- ** events for that property twice.
- ** <P>
- **
- ** Adding a null listener will cause undefined behavior.
- **
- ** @param propertyName the name of the property to listen on.
- ** @param l the listener to add.
- **/
- public void addVetoableChangeListener(String propertyName, VetoableChangeListener l) {
- synchronized(propertyListeners) {
- Vector v = (Vector)propertyListeners.get(propertyName);
- try {
- v.addElement(l);
- } catch(NullPointerException e) {
- /* If v is not found, create a new vector. */
- v = new Vector();
- v.addElement(l);
- propertyListeners.put(propertyName, v);
- }
- }
- }
+ /**
+ * Removes a VetoableChangeListener from the list of global listeners. If
+ * any specific properties are being listened on, they must be deregistered
+ * by themselves; this will only remove the general listener to all
+ * properties. If <code>add()</code> has been called multiple times for a
+ * particular listener, <code>remove()</code> will have to be called the
+ * same number of times to deregister it. This method will unwrap a
+ * VetoableChangeListenerProxy, removing the underlying delegate from the
+ * named property list.
+ *
+ * @param l the listener to remove
+ */
+ public synchronized void
+ removeVetoableChangeListener(VetoableChangeListener l)
+ {
+ if (l instanceof VetoableChangeListenerProxy)
+ {
+ VetoableChangeListenerProxy p = (VetoableChangeListenerProxy) l;
+ removeVetoableChangeListener(p.propertyName,
+ (VetoableChangeListener) p.getListener());
+ }
+ else if (listeners != null)
+ {
+ listeners.remove(l);
+ if (listeners.isEmpty())
+ listeners = null;
+ }
+ }
- /** Removes a VetoableChangeListener from the list of listeners.
- ** If any specific properties are being listened on, they must
- ** be deregistered by themselves; this will only remove the
- ** general listener to all properties.
- ** <P>
- **
- ** If <code>add()</code> has been called multiple times for a
- ** particular listener, <code>remove()</code> will have to be
- ** called the same number of times to deregister it.
- **
- ** @param l the listener to remove.
- **/
- public void removeVetoableChangeListener(VetoableChangeListener l) {
- listeners.removeElement(l);
- }
+ /**
+ * Returns an array of all registered vetoable change listeners. Those that
+ * were registered under a name will be wrapped in a
+ * <code>VetoableChangeListenerProxy</code>, so you must check whether the
+ * listener is an instance of the proxy class in order to see what name the
+ * real listener is registered under. If there are no registered listeners,
+ * this returns an empty array.
+ *
+ * @return the array of registered listeners
+ * @see VetoableChangeListenerProxy
+ * @since 1.4
+ */
+ public synchronized VetoableChangeListener[] getVetoableChangeListeners()
+ {
+ ArrayList list = new ArrayList();
+ if (listeners != null)
+ list.addAll(listeners);
+ if (children != null)
+ {
+ int i = children.size();
+ Iterator iter = children.entrySet().iterator();
+ while (--i >= 0)
+ {
+ Entry e = (Entry) iter.next();
+ String name = (String) e.getKey();
+ Vector v = ((VetoableChangeSupport) e.getValue()).listeners;
+ int j = v.size();
+ while (--j >= 0)
+ list.add(new VetoableChangeListenerProxy
+ (name, (VetoableChangeListener) v.get(j)));
+ }
+ }
+ return (VetoableChangeListener[])
+ list.toArray(new VetoableChangeListener[list.size()]);
+ }
- /** Removes a VetoableChangeListener from listening to a specific property.
- ** <P>
- **
- ** If <code>add()</code> has been called multiple times for a
- ** particular listener on a property, <code>remove()</code> will
- ** have to be called the same number of times to deregister it.
- **
- ** @param propertyName the property to stop listening on.
- ** @param l the listener to remove.
- **/
- public void removeVetoableChangeListener(String propertyName, VetoableChangeListener l) {
- synchronized(propertyListeners) {
- Vector v = (Vector)propertyListeners.get(propertyName);
- try {
- v.removeElement(l);
- if(v.size() == 0) {
- propertyListeners.remove(propertyName);
- }
- } catch(NullPointerException e) {
- /* if v is not found, do nothing. */
- }
- }
- }
+ /**
+ * Adds a VetoableChangeListener listening on the specified property. Events
+ * will be sent to the listener only if the property name matches. The
+ * listener add is not unique; that is, <em>n</em> adds on a particular
+ * property for a particular listener will result in <em>n</em> events
+ * being sent to that listener when that property is changed. The effect is
+ * cumulative, too; if you are registered to listen to receive events on
+ * all vetoable changes, and then you register on a particular property,
+ * you will receive change events for that property twice. Adding a null
+ * listener may cause a NullPointerException down the road. This method
+ * will unwrap a VetoableChangeListenerProxy, registering the underlying
+ * delegate to the named property list if the names match, and discarding
+ * it otherwise.
+ *
+ * @param propertyName the name of the property to listen on
+ * @param l the listener to add
+ * @throws NullPointerException if propertyName is null
+ */
+ public synchronized void addVetoableChangeListener(String propertyName,
+ VetoableChangeListener l)
+ {
+ while (l instanceof VetoableChangeListenerProxy)
+ {
+ VetoableChangeListenerProxy p = (VetoableChangeListenerProxy) l;
+ if (propertyName == null ? p.propertyName != null
+ : ! propertyName.equals(p.propertyName))
+ return;
+ l = (VetoableChangeListener) p.getListener();
+ }
+ VetoableChangeSupport s = null;
+ if (children == null)
+ children = new Hashtable();
+ else
+ s = (VetoableChangeSupport) children.get(propertyName);
+ if (s == null)
+ {
+ s = new VetoableChangeSupport(source);
+ s.listeners = new Vector();
+ children.put(propertyName, s);
+ }
+ s.listeners.add(l);
+ }
+ /**
+ * Removes a VetoableChangeListener from listening to a specific property.
+ * If <code>add()</code> has been called multiple times for a particular
+ * listener on a property, <code>remove()</code> will have to be called the
+ * same number of times to deregister it. This method will unwrap a
+ * VetoableChangeListenerProxy, removing the underlying delegate from the
+ * named property list if the names match.
+ *
+ * @param propertyName the property to stop listening on
+ * @param l the listener to remove
+ * @throws NullPointerException if propertyName is null
+ */
+ public synchronized void
+ removeVetoableChangeListener(String propertyName, VetoableChangeListener l)
+ {
+ if (children == null)
+ return;
+ VetoableChangeSupport s
+ = (VetoableChangeSupport) children.get(propertyName);
+ if (s == null)
+ return;
+ while (l instanceof VetoableChangeListenerProxy)
+ {
+ VetoableChangeListenerProxy p = (VetoableChangeListenerProxy) l;
+ if (propertyName == null ? p.propertyName != null
+ : ! propertyName.equals(p.propertyName))
+ return;
+ l = (VetoableChangeListener) p.getListener();
+ }
+ s.listeners.remove(l);
+ if (s.listeners.isEmpty())
+ {
+ children.remove(propertyName);
+ if (children.isEmpty())
+ children = null;
+ }
+ }
- /** Fire a VetoableChangeEvent to all the listeners.
- ** If any listener objects, a reversion event will be sent to
- ** those listeners who received the initial event.
- **
- ** @param proposedChange the event to send.
- ** @exception PropertyVetoException if the change is vetoed.
- **/
- public void fireVetoableChange(PropertyChangeEvent proposedChange) throws PropertyVetoException {
- int currentListener=0;
- try {
- for(;currentListener<listeners.size();currentListener++) {
- ((VetoableChangeListener)listeners.elementAt(currentListener)).vetoableChange(proposedChange);
- }
- } catch(PropertyVetoException e) {
- PropertyChangeEvent reversion = new PropertyChangeEvent(proposedChange.getSource(),proposedChange.getPropertyName(),proposedChange.getNewValue(),proposedChange.getOldValue());
- for(int sendAgain=0;sendAgain<currentListener;sendAgain++) {
- try {
- ((VetoableChangeListener)listeners.elementAt(sendAgain)).vetoableChange(reversion);
- } catch(PropertyVetoException e2) {
- }
- }
- throw e;
- }
+ /**
+ * Returns an array of all vetoable change listeners registered under the
+ * given property name. If there are no registered listeners, this returns
+ * an empty array.
+ *
+ * @return the array of registered listeners
+ * @throws NullPointerException if propertyName is null
+ * @since 1.4
+ */
+ public synchronized VetoableChangeListener[]
+ getVetoableChangeListeners(String propertyName)
+ {
+ if (children == null)
+ return new VetoableChangeListener[0];
+ VetoableChangeSupport s
+ = (VetoableChangeSupport) children.get(propertyName);
+ if (s == null)
+ return new VetoableChangeListener[0];
+ return (VetoableChangeListener[])
+ s.listeners.toArray(new VetoableChangeListener[s.listeners.size()]);
+ }
- Vector moreListeners = (Vector)propertyListeners.get(proposedChange.getPropertyName());
- if(moreListeners != null) {
- try {
- for(currentListener = 0; currentListener < moreListeners.size(); currentListener++) {
- ((VetoableChangeListener)moreListeners.elementAt(currentListener)).vetoableChange(proposedChange);
- }
- } catch(PropertyVetoException e) {
- PropertyChangeEvent reversion = new PropertyChangeEvent(proposedChange.getSource(),proposedChange.getPropertyName(),proposedChange.getNewValue(),proposedChange.getOldValue());
- for(int sendAgain=0;sendAgain<listeners.size();sendAgain++) {
- try {
- ((VetoableChangeListener)listeners.elementAt(currentListener)).vetoableChange(proposedChange);
- } catch(PropertyVetoException e2) {
- }
- }
+ /**
+ * Fire a PropertyChangeEvent containing the old and new values of the
+ * property to all the global listeners, and to all the listeners for the
+ * specified property name. This does nothing if old and new are non-null
+ * and equal. If the change is vetoed, a new event is fired to notify
+ * listeners about the rollback before the exception is thrown.
+ *
+ * @param propertyName the name of the property that changed
+ * @param oldVal the old value
+ * @param newVal the new value
+ * @throws PropertyVetoException if the change is vetoed by a listener
+ */
+ public void fireVetoableChange(String propertyName,
+ Object oldVal, Object newVal)
+ throws PropertyVetoException
+ {
+ fireVetoableChange(new PropertyChangeEvent(source, propertyName,
+ oldVal, newVal));
+ }
- for(int sendAgain=0;sendAgain<currentListener;sendAgain++) {
- try {
- ((VetoableChangeListener)moreListeners.elementAt(sendAgain)).vetoableChange(reversion);
- } catch(PropertyVetoException e2) {
- }
- }
- throw e;
- }
- }
- }
+ /**
+ * Fire a PropertyChangeEvent containing the old and new values of the
+ * property to all the global listeners, and to all the listeners for the
+ * specified property name. This does nothing if old and new are equal.
+ * If the change is vetoed, a new event is fired to notify listeners about
+ * the rollback before the exception is thrown.
+ *
+ * @param propertyName the name of the property that changed
+ * @param oldVal the old value
+ * @param newVal the new value
+ * @throws PropertyVetoException if the change is vetoed by a listener
+ */
+ public void fireVetoableChange(String propertyName, int oldVal, int newVal)
+ throws PropertyVetoException
+ {
+ if (oldVal != newVal)
+ fireVetoableChange(new PropertyChangeEvent(source, propertyName,
+ new Integer(oldVal),
+ new Integer(newVal)));
+ }
- /** Fire a VetoableChangeEvent containing the old and new values of the property to all the listeners.
- ** If any listener objects, a reversion event will be sent to
- ** those listeners who received the initial event.
- **
- ** @param propertyName the name of the property that
- ** changed.
- ** @param oldVal the old value.
- ** @param newVal the new value.
- ** @exception PropertyVetoException if the change is vetoed.
- **/
- public void fireVetoableChange(String propertyName, Object oldVal, Object newVal) throws PropertyVetoException {
- fireVetoableChange(new PropertyChangeEvent(source,propertyName,oldVal,newVal));
- }
+ /**
+ * Fire a PropertyChangeEvent containing the old and new values of the
+ * property to all the global listeners, and to all the listeners for the
+ * specified property name. This does nothing if old and new are equal.
+ * If the change is vetoed, a new event is fired to notify listeners about
+ * the rollback before the exception is thrown.
+ *
+ * @param propertyName the name of the property that changed
+ * @param oldVal the old value
+ * @param newVal the new value
+ * @throws PropertyVetoException if the change is vetoed by a listener
+ */
+ public void fireVetoableChange(String propertyName,
+ boolean oldVal, boolean newVal)
+ throws PropertyVetoException
+ {
+ if (oldVal != newVal)
+ fireVetoableChange(new PropertyChangeEvent(source, propertyName,
+ Boolean.valueOf(oldVal),
+ Boolean.valueOf(newVal)));
+ }
- /** Fire a VetoableChangeEvent containing the old and new values of the property to all the listeners.
- ** If any listener objects, a reversion event will be sent to
- ** those listeners who received the initial event.
- **
- ** @param propertyName the name of the property that
- ** changed.
- ** @param oldVal the old value.
- ** @param newVal the new value.
- ** @exception PropertyVetoException if the change is vetoed.
- **/
- public void fireVetoableChange(String propertyName, boolean oldVal, boolean newVal) throws PropertyVetoException {
- fireVetoableChange(new PropertyChangeEvent(source,propertyName,new Boolean(oldVal),new Boolean(newVal)));
- }
+ /**
+ * Fire a PropertyChangeEvent to all the global listeners, and to all the
+ * listeners for the specified property name. This does nothing if old and
+ * new values of the event are equal. If the change is vetoed, a new event
+ * is fired to notify listeners about the rollback before the exception is
+ * thrown.
+ *
+ * @param event the event to fire
+ * @throws NullPointerException if event is null
+ * @throws PropertyVetoException if the change is vetoed by a listener
+ */
+ public void fireVetoableChange(PropertyChangeEvent event)
+ throws PropertyVetoException
+ {
+ if (event.oldValue != null && event.oldValue.equals(event.newValue))
+ return;
+ Vector v = listeners; // Be thread-safe.
+ if (v != null)
+ {
+ int i = v.size();
+ try
+ {
+ while (--i >= 0)
+ ((VetoableChangeListener) v.get(i)).vetoableChange(event);
+ }
+ catch (PropertyVetoException e)
+ {
+ event = event.rollback();
+ int limit = i;
+ i = v.size();
+ while (--i >= limit)
+ ((VetoableChangeListener) v.get(i)).vetoableChange(event);
+ throw e;
+ }
+ }
+ Hashtable h = children; // Be thread-safe.
+ if (h != null && event.propertyName != null)
+ {
+ VetoableChangeSupport s
+ = (VetoableChangeSupport) h.get(event.propertyName);
+ if (s != null)
+ {
+ Vector v1 = s.listeners; // Be thread-safe.
+ int i = v1 == null ? 0 : v1.size();
+ try
+ {
+ while (--i >= 0)
+ ((VetoableChangeListener) v1.get(i)).vetoableChange(event);
+ }
+ catch (PropertyVetoException e)
+ {
+ event = event.rollback();
+ int limit = i;
+ i = v.size();
+ while (--i >= 0)
+ ((VetoableChangeListener) v.get(i)).vetoableChange(event);
+ i = v1.size();
+ while (--i >= limit)
+ ((VetoableChangeListener) v1.get(i)).vetoableChange(event);
+ throw e;
+ }
+ }
+ }
+ }
- /** Fire a VetoableChangeEvent containing the old and new values of the property to all the listeners.
- ** If any listener objects, a reversion event will be sent to
- ** those listeners who received the initial event.
- **
- ** @param propertyName the name of the property that
- ** changed.
- ** @param oldVal the old value.
- ** @param newVal the new value.
- ** @exception PropertyVetoException if the change is vetoed.
- **/
- public void fireVetoableChange(String propertyName, int oldVal, int newVal) throws PropertyVetoException {
- fireVetoableChange(new PropertyChangeEvent(source,propertyName,new Integer(oldVal),new Integer(newVal)));
- }
+ /**
+ * Tell whether the specified property is being listened on or not. This
+ * will only return <code>true</code> if there are listeners on all
+ * properties or if there is a listener specifically on this property.
+ *
+ * @param propertyName the property that may be listened on
+ * @return whether the property is being listened on
+ * @throws NullPointerException if propertyName is null
+ */
+ public synchronized boolean hasListeners(String propertyName)
+ {
+ return listeners != null || (children != null
+ && children.get(propertyName) != null);
+ }
+ /**
+ * Saves the state of the object to the stream.
+ *
+ * @param s the stream to write to
+ * @throws IOException if anything goes wrong
+ * @serialData this writes out a null-terminated list of serializable
+ * global vetoable change listeners (the listeners for a named
+ * property are written out as the global listeners of the
+ * children, when the children hashtable is saved)
+ */
+ private synchronized void writeObject(ObjectOutputStream s)
+ throws IOException
+ {
+ s.defaultWriteObject();
+ if (listeners != null)
+ {
+ int i = listeners.size();
+ while (--i >= 0)
+ if (listeners.get(i) instanceof Serializable)
+ s.writeObject(listeners.get(i));
+ }
+ s.writeObject(null);
+ }
- /** Tell whether the specified property is being listened on or not.
- ** This will only return <code>true</code> if there are listeners
- ** on all properties or if there is a listener specifically on this
- ** property.
- **
- ** @param propertyName the property that may be listened on
- ** @return whether the property is being listened on
- **/
- public boolean hasListeners(String propertyName) {
- return listeners.size() > 0 || propertyListeners.get(propertyName) != null;
- }
-}
+ /**
+ * Reads the object back from stream (deserialization).
+ *
+ * XXX Since serialization for 1.1 streams was not documented, this may
+ * not work if vetoableChangeSupportSerializedDataVersion is 1.
+ *
+ * @param s the stream to read from
+ * @throws IOException if reading the stream fails
+ * @throws ClassNotFoundException if deserialization fails
+ * @serialData this reads in a null-terminated list of serializable
+ * global vetoable change listeners (the listeners for a named
+ * property are written out as the global listeners of the
+ * children, when the children hashtable is saved)
+ */
+ private void readObject(ObjectInputStream s)
+ throws IOException, ClassNotFoundException
+ {
+ s.defaultReadObject();
+ VetoableChangeListener l = (VetoableChangeListener) s.readObject();
+ while (l != null)
+ {
+ addVetoableChangeListener(l);
+ l = (VetoableChangeListener) s.readObject();
+ }
+ // Sun is not as careful with children as we are, and lets some proxys
+ // in that can never receive events. So, we clean up anything that got
+ // serialized, to make sure our invariants hold.
+ if (children != null)
+ {
+ int i = children.size();
+ Iterator iter = children.entrySet().iterator();
+ while (--i >= 0)
+ {
+ Entry e = (Entry) iter.next();
+ String name = (String) e.getKey();
+ VetoableChangeSupport vcs = (VetoableChangeSupport) e.getValue();
+ if (vcs.listeners == null)
+ vcs.listeners = new Vector();
+ if (vcs.children != null)
+ vcs.listeners.addAll
+ (Arrays.asList(vcs.getVetoableChangeListeners(name)));
+ if (vcs.listeners.size() == 0)
+ iter.remove();
+ else
+ vcs.children = null;
+ }
+ if (children.size() == 0)
+ children = null;
+ }
+ }
+} // class VetoableChangeSupport
diff --git a/libjava/java/io/StreamTokenizer.java b/libjava/java/io/StreamTokenizer.java
index f2e39698ca6..5b3533b633d 100644
--- a/libjava/java/io/StreamTokenizer.java
+++ b/libjava/java/io/StreamTokenizer.java
@@ -1,5 +1,5 @@
/* StreamTokenizer.java -- parses streams of characters into tokens
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation
This file is part of GNU Classpath.
@@ -554,16 +554,13 @@ public class StreamTokenizer
}
/**
- * This method returns the current line number. Note that if the
- * <code>pushBack()</code> method is called, it has no effect on the
- * line number returned by this method.
- *
- * @return The current line number
+ * Puts the current token back into the StreamTokenizer so
+ * <code>nextToken</code> will return the same value on the next call.
+ * May cause the lineno method to return an incorrect value
+ * if lineno is called before the next call to nextToken.
*/
public void pushBack()
{
- // pushBack may cause the lineno method to return an incorrect value
- // if lineno is called before the next call to nextToken.
pushedBack = true;
}
@@ -670,7 +667,10 @@ public class StreamTokenizer
if (hi > 255)
hi = 255;
for (int i = low; i <= hi; i++)
- whitespace[i] = true;
+ {
+ resetChar(i);
+ whitespace[i] = true;
+ }
}
/**
diff --git a/libjava/java/lang/Character.java b/libjava/java/lang/Character.java
index 405232ed41d..9955215f871 100644
--- a/libjava/java/lang/Character.java
+++ b/libjava/java/lang/Character.java
@@ -1488,7 +1488,7 @@ public final class Character implements Serializable, Comparable
* @return a String containing the character
* @since 1.4
*/
- public String toString(char ch)
+ public static String toString(char ch)
{
// This assumes that String.valueOf(char) can create a single-character
// String more efficiently than through the public API.
diff --git a/libjava/java/lang/StackTraceElement.java b/libjava/java/lang/StackTraceElement.java
index 9c60ab16410..d9e8a31b724 100644
--- a/libjava/java/lang/StackTraceElement.java
+++ b/libjava/java/lang/StackTraceElement.java
@@ -191,7 +191,7 @@ public class StackTraceElement implements Serializable
}
if (methodName != null)
sb.append(methodName);
- sb.append('(');
+ sb.append(" (");
if (fileName != null)
sb.append(fileName);
else
diff --git a/libjava/java/lang/Throwable.java b/libjava/java/lang/Throwable.java
index d5488b877e7..56c9d542a50 100644
--- a/libjava/java/lang/Throwable.java
+++ b/libjava/java/lang/Throwable.java
@@ -57,76 +57,6 @@ import java.io.OutputStream;
* bytecode not implemented. JDK 1.1.
*/
-/* A CPlusPlusDemangler sits on top of a PrintWriter. All input is
- * passed through the "c++filt" program (part of GNU binutils) which
- * demangles internal symbols to their C++ source form.
- *
- * Closing a CPlusPlusDemangler doesn't close the underlying
- * PrintWriter; it does, however close underlying process and flush
- * all its buffers, so it's possible to guarantee that after a
- * CPlusPlusDemangler has been closed no more will ever be written to
- * the underlying PrintWriter.
- *
- * FIXME: This implictly converts data from the input stream, which is
- * a stream of characters, to a stream of bytes. We need a way of
- * handling Unicode characters in demangled identifiers. */
-
-class CPlusPlusDemangler extends OutputStream
-{
- java.io.OutputStream procOut;
- java.io.InputStream procIn;
- java.lang.Process proc;
- PrintWriter p;
-
- /* The number of bytes written to the underlying PrintWriter. This
- provides a crude but fairly portable way to determine whether or
- not the attempt to exec c++filt worked. */
- public int written = 0;
-
- CPlusPlusDemangler (PrintWriter writer) throws IOException
- {
- p = writer;
- proc = Runtime.getRuntime ().exec ("c++filt -s java");
- procOut = proc.getOutputStream ();
- procIn = proc.getInputStream ();
- }
-
- public void write (int b) throws IOException
- {
- procOut.write (b);
- while (procIn.available () != 0)
- {
- int c = procIn.read ();
- if (c == -1)
- break;
- else
- {
- p.write (c);
- written++;
- }
- }
- }
-
- public void close () throws IOException
- {
- procOut.close ();
- int c;
- while ((c = procIn.read ()) != -1)
- {
- p.write (c);
- written++;
- }
- p.flush ();
- try
- {
- proc.waitFor ();
- }
- catch (InterruptedException _)
- {
- }
- }
-}
-
/**
* Throwable is the superclass of all exceptions that can be raised.
*
@@ -219,8 +149,7 @@ public class Throwable implements Serializable
* no null entries
* @since 1.4
*/
- // XXX Don't initialize this, once fillInStackTrace() does it.
- private StackTraceElement[] stackTrace = {};
+ private StackTraceElement[] stackTrace;
/**
* Instantiate this Throwable with an empty message. The cause remains
@@ -449,26 +378,102 @@ public class Throwable implements Serializable
}
/**
- * Print a stack trace to the specified PrintWriter. See
- * {@link #printStackTrace()} for the sample format.
+ * <p>Prints the exception, the detailed message and the stack trace
+ * associated with this Throwable to the given <code>PrintWriter</code>.
+ * The actual output written is implemention specific. Use the result of
+ * <code>getStackTrace()</code> when more precise information is needed.
+ *
+ * <p>This implementation first prints a line with the result of this
+ * object's <code>toString()</code> method.
+ * <br>
+ * Then for all elements given by <code>getStackTrace</code> it prints
+ * a line containing three spaces, the string "at " and the result of calling
+ * the <code>toString()</code> method on the <code>StackTraceElement</code>
+ * object. If <code>getStackTrace()</code> returns an empty array it prints
+ * a line containing three spaces and the string
+ * "&lt;&lt;No stacktrace available&gt;&gt;".
+ * <br>
+ * Then if <code>getCause()</code> doesn't return null it adds a line
+ * starting with "Caused by: " and the result of calling
+ * <code>toString()</code> on the cause.
+ * <br>
+ * Then for every cause (of a cause, etc) the stacktrace is printed the
+ * same as for the top level <code>Throwable</code> except that as soon
+ * as all the remaining stack frames of the cause are the same as the
+ * the last stack frames of the throwable that the cause is wrapped in
+ * then a line starting with three spaces and the string "... X more" is
+ * printed, where X is the number of remaining stackframes.
*
* @param w the PrintWriter to write the trace to
* @since 1.1
*/
- public void printStackTrace (PrintWriter wr)
+ public void printStackTrace (PrintWriter pw)
{
- try
+ // First line
+ pw.println(toString());
+
+ // The stacktrace
+ StackTraceElement[] stack = getStackTrace();
+ if (stack == null || stack.length == 0)
{
- CPlusPlusDemangler cPlusPlusFilter = new CPlusPlusDemangler (wr);
- PrintWriter writer = new PrintWriter (cPlusPlusFilter);
- printRawStackTrace (writer);
- writer.close ();
- if (cPlusPlusFilter.written == 0) // The demangler has failed...
- printRawStackTrace (wr);
+ pw.println(" <<No stacktrace available>>");
+ return;
}
- catch (Exception e1)
+ else
+ {
+ for (int i = 0; i < stack.length; i++)
+ pw.println(" at " + stack[i]);
+ }
+
+ // The cause(s)
+ Throwable cause = getCause();
+ while (cause != null)
{
- printRawStackTrace (wr);
+ // Cause first line
+ pw.println("Caused by: " + cause);
+
+ // Cause stacktrace
+ StackTraceElement[] parentStack = stack;
+ stack = cause.getStackTrace();
+ if (stack == null || stack.length == 0)
+ {
+ pw.println(" <<No stacktrace available>>");
+ }
+ else if (parentStack == null || parentStack.length == 0)
+ {
+ for (int i = 0; i < stack.length; i++)
+ pw.println(" at " + stack[i]);
+ }
+ else
+ {
+ boolean equal = false; // Is rest of stack equal to parent frame?
+ for (int i = 0; i < stack.length && ! equal; i++)
+ {
+ // Check if we already printed the rest of the stack
+ // since it was the tail of the parent stack
+ int remaining = stack.length - i;
+ int element = i;
+ int parentElement = parentStack.length - remaining;
+ equal = parentElement >= 0
+ && parentElement < parentStack.length; // be optimistic
+ while (equal && element < stack.length)
+ {
+ if (stack[element].equals(parentStack[parentElement]))
+ {
+ element++;
+ parentElement++;
+ }
+ else
+ equal = false;
+ }
+ // Print stacktrace element or indicate the rest is equal
+ if (! equal)
+ pw.println(" at " + stack[i]);
+ else
+ pw.println(" ..." + remaining + " more");
+ }
+ }
+ cause = cause.getCause();
}
}
@@ -493,6 +498,9 @@ public class Throwable implements Serializable
*/
public StackTraceElement[] getStackTrace()
{
+ if (stackTrace == null)
+ stackTrace = getStackTrace0();
+
return stackTrace;
}
@@ -513,8 +521,8 @@ public class Throwable implements Serializable
this.stackTrace = stackTrace;
}
- private native final void printRawStackTrace (PrintWriter wr);
-
+ private native final StackTraceElement[] getStackTrace0 ();
+
// Setting this flag to false prevents fillInStackTrace() from running.
static boolean trace_enabled = true;
private transient byte stackTraceBytes[];
diff --git a/libjava/java/lang/ieeefp.h b/libjava/java/lang/ieeefp.h
index 8615c7d60ec..fc56de0b379 100644
--- a/libjava/java/lang/ieeefp.h
+++ b/libjava/java/lang/ieeefp.h
@@ -58,6 +58,10 @@
#define __IEEE_LITTLE_ENDIAN
#endif
+#ifdef __x86_64__
+#define __IEEE_LITTLE_ENDIAN
+#endif
+
#ifdef __i960__
#define __IEEE_LITTLE_ENDIAN
#endif
diff --git a/libjava/java/lang/natThrowable.cc b/libjava/java/lang/natThrowable.cc
index e6447086293..c2f7d1b8d8d 100644
--- a/libjava/java/lang/natThrowable.cc
+++ b/libjava/java/lang/natThrowable.cc
@@ -22,6 +22,7 @@ details. */
#include <java/lang/Object.h>
#include <java-threads.h>
#include <java/lang/Throwable.h>
+#include <java/lang/StackTraceElement.h>
#include <java/io/PrintStream.h>
#include <java/io/PrintWriter.h>
#include <java/io/IOException.h>
@@ -67,38 +68,32 @@ java::lang::Throwable::fillInStackTrace (void)
return this;
}
-void
-java::lang::Throwable::printRawStackTrace (java::io::PrintWriter *wr)
+JArray<java::lang::StackTraceElement*> *
+java::lang::Throwable::getStackTrace0 ()
{
- wr->println (toString ());
#ifdef HAVE_BACKTRACE
if (!stackTraceBytes)
- return;
+ return NULL;
int depth = stackTraceBytes->length / sizeof (void *);
void *p[depth];
+ // This memcpy is esential; it ensures that the array of void* is
+ // correctly aligned.
memcpy (p, elements (stackTraceBytes), sizeof p);
+ JArray<java::lang::StackTraceElement*> *result;
+ java::lang::StackTraceElement** el;
+ result = reinterpret_cast <JArray<java::lang::StackTraceElement *>*>
+ (JvNewObjectArray (depth, &java::lang::StackTraceElement::class$, NULL));
+ el = elements (result);
+
_Jv_name_finder finder (_Jv_ThisExecutable ());
for (int i = 0; i < depth; i++)
- {
- bool found = finder.lookup (p[i]);
- wr->print (JvNewStringLatin1 (" at "));
- wr->print (JvNewStringLatin1 (finder.hex));
- if (found)
- {
- wr->print (JvNewStringLatin1 (": "));
- wr->print (JvNewStringLatin1 (finder.method_name));
- if (finder.file_name[0])
- {
- wr->print (JvNewStringLatin1 (" ("));
- wr->print (JvNewStringLatin1 (finder.file_name));
- wr->print (JvNewStringLatin1 (")"));
- }
- }
- wr->println ();
- }
+ el[i] = finder.lookup (p[i]);
+
+ return result;
+#else
+ return NULL;
#endif /* HAVE_BACKTRACE */
- wr->flush ();
}
diff --git a/libjava/mauve-libgcj b/libjava/mauve-libgcj
index 165f0b6f5ee..deda5cb1f01 100644
--- a/libjava/mauve-libgcj
+++ b/libjava/mauve-libgcj
@@ -14,6 +14,12 @@ JDBC2.0
!java.sql.Connection.TestJdbc10
!java.sql.DatabaseMetaData.TestJdbc10
+# We now implement JDBC3.0 which means the following tests don't compile
+!java.sql.Blob.BlobTest
+!java.sql.Clob.ClobTest
+!java.sql.Connection.TestJdbc20
+!java.sql.DatabaseMetaData.TestJdbc20
+
# Cannot be compiled
!java.text.ACIAttribute
diff --git a/libjava/name-finder.cc b/libjava/name-finder.cc
index a09ff0b267e..2d383aaa250 100644
--- a/libjava/name-finder.cc
+++ b/libjava/name-finder.cc
@@ -59,7 +59,7 @@ details. */
_Jv_name_finder::_Jv_name_finder (char *executable)
{
#if defined (HAVE_PIPE) && defined (HAVE_FORK) && defined (HAVE_EXECVP)
- error = 0;
+ demangling_error = lookup_error = 0;
// Initialize file descriptors so that shutdown works properly.
f_pipe[0] = -1;
@@ -68,14 +68,21 @@ _Jv_name_finder::_Jv_name_finder (char *executable)
b_pipe[1] = -1;
b_pipe_fd = NULL;
- char *argv[6];
+ f2_pipe[0] = -1;
+ f2_pipe[1] = -1;
+ b2_pipe[0] = -1;
+ b2_pipe[1] = -1;
+ b2_pipe_fd = NULL;
+
+ // addr2line helper process.
+
+ char *argv[5];
{
int arg = 0;
#ifdef __ia64__
argv[arg++] = "addr2name.awk";
#else
argv[arg++] = "addr2line";
- argv[arg++] = "-C";
argv[arg++] = "-f";
argv[arg++] = "-e";
#endif
@@ -83,10 +90,10 @@ _Jv_name_finder::_Jv_name_finder (char *executable)
argv[arg] = NULL;
}
- error |= pipe (f_pipe) < 0;
- error |= pipe (b_pipe) < 0;
+ lookup_error |= pipe (f_pipe) < 0;
+ lookup_error |= pipe (b_pipe) < 0;
- if (error)
+ if (lookup_error)
return;
pid = fork ();
@@ -109,18 +116,65 @@ _Jv_name_finder::_Jv_name_finder (char *executable)
if (pid < 0)
{
- error |= 1;
+ lookup_error |= 1;
return;
}
b_pipe_fd = fdopen (b_pipe[0], "r");
- error |= !b_pipe_fd;
+ lookup_error |= !b_pipe_fd;
- if (! error)
+ if (! lookup_error)
{
// Don't try to close the fd twice.
b_pipe[0] = -1;
}
+
+ // c++filt helper process.
+
+ char *argv2[4];
+ argv2[0] = "c++filt";
+ argv2[1] = "-s";
+ argv2[2] = "java";
+ argv2[3] = NULL;
+
+ demangling_error |= pipe (f2_pipe) < 0;
+ demangling_error |= pipe (b2_pipe) < 0;
+
+ if (demangling_error)
+ return;
+
+ pid2 = fork ();
+ if (pid2 == 0)
+ {
+ close (f2_pipe[1]);
+ close (b2_pipe[0]);
+ dup2 (f2_pipe[0], fileno (stdin));
+ dup2 (b2_pipe[1], fileno (stdout));
+ execvp (argv2[0], argv2);
+ _exit (127);
+ }
+
+ // Close child end of pipes. Set local descriptors to -1 so we
+ // don't try to close the fd again.
+ close (f2_pipe [0]);
+ f2_pipe[0] = -1;
+ close (b2_pipe [1]);
+ b2_pipe[1] = -1;
+
+ if (pid2 < 0)
+ {
+ demangling_error |= 1;
+ return;
+ }
+
+ b2_pipe_fd = fdopen (b2_pipe[0], "r");
+ demangling_error |= !b2_pipe_fd;
+
+ if (! demangling_error)
+ {
+ // Don't try to close the fd twice.
+ b2_pipe[0] = -1;
+ }
#endif
}
@@ -144,6 +198,94 @@ _Jv_name_finder::toHex (void *p)
hex [digits+2] = 0;
}
+/* Creates a StackTraceElement given a string and a filename.
+ Splits the given string into the class and method part.
+ The string s will be a demangled to a fully qualified java method string.
+ The string f will be decomposed into a file name and a possible line number.
+ The given strings will be altered. */
+
+java::lang::StackTraceElement*
+_Jv_name_finder::createStackTraceElement(char *s, char *f)
+{
+ char *c;
+ char *class_name = NULL;
+ char *method_name = NULL;
+
+#if defined (HAVE_PIPE) && defined (HAVE_FORK) && defined (HAVE_EXECVP)
+ if (demangling_error)
+ goto fail;
+
+ demangling_error |= write (f2_pipe[1], s, strlen (s)) < 0;
+ if (demangling_error)
+ goto fail;
+ demangling_error |= write (f2_pipe[1], "\n", 1) < 0;
+ if (demangling_error)
+ goto fail;
+
+ char name[1024];
+ demangling_error |= (fgets (name, sizeof name, b2_pipe_fd) == NULL);
+ if (demangling_error)
+ goto fail;
+
+ c = strchr (name, '\n');
+ if (c)
+ *c = 0;
+ s = name;
+#endif
+
+ c = strchr (s, '(');
+ if (c)
+ {
+ while(c-->s)
+ if (*c == '.')
+ break;
+
+ if (*c == '.')
+ {
+ *c = 0;
+ class_name = s;
+ method_name = c+1;
+ }
+ else
+ {
+ class_name = NULL;
+ method_name = s;
+ }
+ }
+ else
+ {
+ class_name = NULL;
+ method_name = s;
+ }
+
+ // Get line number
+ int line_number;
+ c = strrchr (f, ':');
+ if (c)
+ {
+ if (c[1] != 0)
+ line_number = atoi(c+1);
+ else
+ line_number = -1;
+ *c = 0;
+ }
+ else
+ {
+ line_number = -1;
+ c = strchr (f, '\n');
+ if (c)
+ *c = 0;
+ }
+
+ fail:
+ return new java::lang::StackTraceElement(
+ f ? JvNewStringLatin1 (f) : NULL,
+ line_number,
+ class_name ? JvNewStringLatin1 (class_name) : NULL,
+ JvNewStringLatin1 (method_name ? method_name : s),
+ false);
+}
+
/* Given a pointer to a function or method, try to convert it into a
name and the appropriate line and source file. The caller passes
the code pointer in p.
@@ -151,12 +293,17 @@ _Jv_name_finder::toHex (void *p)
Returns false if the lookup fails. Even if this happens, the field
he will have been correctly filled in with the pointer. */
-bool
+java::lang::StackTraceElement*
_Jv_name_finder::lookup (void *p)
{
extern char **_Jv_argv;
toHex (p);
+ char name[1024];
+ char file_name[1024];
+
+ file_name[0] = 0;
+
#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
{
Dl_info dl_info;
@@ -166,45 +313,44 @@ _Jv_name_finder::lookup (void *p)
if (dl_info.dli_fname)
strncpy (file_name, dl_info.dli_fname, sizeof file_name);
if (dl_info.dli_sname)
- strncpy (method_name, dl_info.dli_sname, sizeof method_name);
+ strncpy (name, dl_info.dli_sname, sizeof name);
/* Don't trust dladdr() if the address is from the main program. */
if (dl_info.dli_fname != NULL
&& dl_info.dli_sname != NULL
&& (_Jv_argv == NULL || strcmp (file_name, _Jv_argv[0]) != 0))
- return true;
+ return createStackTraceElement (name, file_name);
}
}
#endif
+ memcpy (name, hex, strlen (hex) + 1);
+
#if defined (HAVE_PIPE) && defined (HAVE_FORK) && defined (HAVE_EXECVP)
- if (error)
- return false;
-
- error |= write (f_pipe[1], hex, strlen (hex)) < 0;
- if (error)
- return false;
- error |= write (f_pipe[1], "\n", 1) < 0;
- if (error)
- return false;
-
- error |= (fgets (method_name, sizeof method_name, b_pipe_fd) == NULL);
- if (error)
- return false;
- error |= (fgets (file_name, sizeof file_name, b_pipe_fd) == NULL);
- if (error)
- return false;
-
- char *newline = strchr (method_name, '\n');
- if (newline)
- *newline = 0;
- newline = strchr (file_name, '\n');
- if (newline)
- *newline = 0;
-
- return true;
+ if (lookup_error)
+ goto fail;
+
+ lookup_error |= write (f_pipe[1], hex, strlen (hex)) < 0;
+ if (lookup_error)
+ goto fail;
+ lookup_error |= write (f_pipe[1], "\n", 1) < 0;
+ if (lookup_error)
+ goto fail;
+
+ lookup_error |= (fgets (name, sizeof name, b_pipe_fd) == NULL);
+ if (lookup_error)
+ goto fail;
+ lookup_error |= (fgets (file_name, sizeof file_name, b_pipe_fd) == NULL);
+ if (lookup_error)
+ goto fail;
-#else
- return false;
+ {
+ char *newline = strchr (name, '\n');
+ if (newline)
+ *newline = 0;
+ }
#endif /* defined (HAVE_PIPE) && defined (HAVE_FORK) && defined (HAVE_EXECVP) */
+
+ fail:
+ return (createStackTraceElement (name, file_name));
}
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index 1bf2553f6d6..f555f7e2c4d 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-18 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * libjava.compile/compile.exp: Sort sources.
+ * libjava.jni/jni.exp (gcj_jni_run): Likewise.
+ * libjava.lang/lang.exp: Likewise.
+
2002-07-02 Andrew Haley <aph@redhat.com>
* libjava.lang/inline.java: New file.
diff --git a/libjava/testsuite/libjava.compile/compile.exp b/libjava/testsuite/libjava.compile/compile.exp
index 4a358a6d37d..6b4038659cd 100644
--- a/libjava/testsuite/libjava.compile/compile.exp
+++ b/libjava/testsuite/libjava.compile/compile.exp
@@ -1,6 +1,6 @@
global srcdir subdir
-catch "glob -nocomplain ${srcdir}/${subdir}/*.java" srcfiles
+catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.java] } srcfiles
verbose "srcfiles are $srcfiles"
set prefix ""
diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp
index 724b2545acb..efd8154eb23 100644
--- a/libjava/testsuite/libjava.jni/jni.exp
+++ b/libjava/testsuite/libjava.jni/jni.exp
@@ -167,7 +167,7 @@ proc gcj_jni_run {} {
# For now we only test JNI on native builds.
if {$build_triplet == $host_triplet} {
- catch "glob -nocomplain ${srcdir}/${subdir}/*.java" srcfiles
+ catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.java] } srcfiles
foreach x $srcfiles {
gcj_jni_test_one $x
diff --git a/libjava/testsuite/libjava.lang/lang.exp b/libjava/testsuite/libjava.lang/lang.exp
index c0b8570403f..a4d15c52900 100644
--- a/libjava/testsuite/libjava.lang/lang.exp
+++ b/libjava/testsuite/libjava.lang/lang.exp
@@ -1,6 +1,6 @@
global srcdir subdir
-catch "glob -nocomplain ${srcdir}/${subdir}/*.out" srcfiles
+catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.out] } srcfiles
verbose "srcfiles are $srcfiles"
set prefix ""