diff options
author | Michael Koch <konqueror@gmx.de> | 2003-09-10 17:39:20 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-09-10 17:39:20 +0000 |
commit | 4a503716e04b1d4b51c25d183daa727863621364 (patch) | |
tree | 2319d2c672eccbf9eea831feae05f2fe985c4987 /libjava | |
parent | 520abf693092a8244aa99ec41eaa76bafa0f9e20 (diff) | |
download | gcc-4a503716e04b1d4b51c25d183daa727863621364.zip gcc-4a503716e04b1d4b51c25d183daa727863621364.tar.gz gcc-4a503716e04b1d4b51c25d183daa727863621364.tar.bz2 |
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
Diffstat (limited to 'libjava')
21 files changed, 955 insertions, 897 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e92d214..9c3f9c1 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,39 @@ +2003-09-10 Michael Koch <konqueror@gmx.de> + + * java/net/DatagramSocket.java, + java/net/MulticastSocket.java, + java/net/ServerSocket.java, + java/net/Socket.java: + Use gnu.java.net.Plain*SocketImpl instead of + java.net.PlainSocketImpl. + * java/net/PlainDatagramSocketImpl.java, + java/net/PlainSocketImpl.java, + java/net/SocketInputStream.java, + java/net/SocketOutputStream.java, + java/net/natPlainDatagramSocketImplNoNet.cc, + java/net/natPlainDatagramSocketImplPosix.cc, + java/net/natPlainDatagramSocketImplWin32.cc, + java/net/natPlainSocketImplNoNet.cc, + java/net/natPlainSocketImplPosix.cc, + java/net/natPlainSocketImplWin32.cc: + Removed. + * gnu/java/net/PlainDatagramSocketImpl.java, + gnu/java/net/PlainSocketImpl.java, + gnu/java/net/SocketInputStream.java, + gnu/java/net/SocketOutputStream.java, + gnu/java/net/natPlainDatagramSocketImplNoNet.cc, + gnu/java/net/natPlainDatagramSocketImplPosix.cc, + gnu/java/net/natPlainDatagramSocketImplWin32.cc, + gnu/java/net/natPlainSocketImplNoNet.cc, + gnu/java/net/natPlainSocketImplPosix.cc, + gnu/java/net/natPlainSocketImplWin32.cc: + New files (moved from java/net). + * configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc + instead of java/net/natPlain*SocketImpl.cc. + * configure: Regenerated. + * Makefile.am: Moved files from java/net to gnu/java/net. + * Makefile.in: Regenerated. + 2003-09-09 Alan Modra <amodra@bigpond.net.au> * configure: Regenerate. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index f95e5fc..5658ee3 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -2136,6 +2136,8 @@ 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/net/PlainDatagramSocketImpl.java \ +gnu/java/net/PlainSocketImpl.java \ gnu/java/nio/DatagramChannelImpl.java \ gnu/java/nio/FileLockImpl.java \ gnu/java/nio/PipeImpl.java \ @@ -2232,8 +2234,6 @@ java/net/NetPermission.java \ java/net/NetworkInterface.java \ java/net/NoRouteToHostException.java \ java/net/PasswordAuthentication.java \ -java/net/PlainDatagramSocketImpl.java \ -java/net/PlainSocketImpl.java \ java/net/PortUnreachableException.java \ java/net/ProtocolException.java \ java/net/ServerSocket.java \ @@ -2604,6 +2604,8 @@ gnu/gcj/runtime/natStackTrace.cc \ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ gnu/java/awt/natEmbeddedWindow.cc \ +gnu/java/net/natPlainDatagramSocketImpl.cc \ +gnu/java/net/natPlainSocketImpl.cc \ gnu/java/nio/natFileLockImpl.cc \ gnu/java/nio/natSelectorImpl.cc \ java/io/natFile.cc \ @@ -2632,8 +2634,6 @@ java/lang/reflect/natMethod.cc \ java/lang/reflect/natProxy.cc \ java/net/natNetworkInterface.cc \ java/net/natInetAddress.cc \ -java/net/natPlainDatagramSocketImpl.cc \ -java/net/natPlainSocketImpl.cc \ java/nio/natDirectByteBufferImpl.cc \ java/nio/channels/natFileChannelImpl.cc \ java/text/natCollator.cc \ diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 4f00d8b..60e9358 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -1891,6 +1891,8 @@ 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/net/PlainDatagramSocketImpl.java \ +gnu/java/net/PlainSocketImpl.java \ gnu/java/nio/DatagramChannelImpl.java \ gnu/java/nio/FileLockImpl.java \ gnu/java/nio/PipeImpl.java \ @@ -1987,8 +1989,6 @@ java/net/NetPermission.java \ java/net/NetworkInterface.java \ java/net/NoRouteToHostException.java \ java/net/PasswordAuthentication.java \ -java/net/PlainDatagramSocketImpl.java \ -java/net/PlainSocketImpl.java \ java/net/PortUnreachableException.java \ java/net/ProtocolException.java \ java/net/ServerSocket.java \ @@ -2358,6 +2358,8 @@ gnu/gcj/runtime/natStackTrace.cc \ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ gnu/java/awt/natEmbeddedWindow.cc \ +gnu/java/net/natPlainDatagramSocketImpl.cc \ +gnu/java/net/natPlainSocketImpl.cc \ gnu/java/nio/natFileLockImpl.cc \ gnu/java/nio/natSelectorImpl.cc \ java/io/natFile.cc \ @@ -2386,8 +2388,6 @@ java/lang/reflect/natMethod.cc \ java/lang/reflect/natProxy.cc \ java/net/natNetworkInterface.cc \ java/net/natInetAddress.cc \ -java/net/natPlainDatagramSocketImpl.cc \ -java/net/natPlainSocketImpl.cc \ java/nio/natDirectByteBufferImpl.cc \ java/nio/channels/natFileChannelImpl.cc \ java/text/natCollator.cc \ @@ -2535,20 +2535,21 @@ gnu/gcj/runtime/natFinalizerThread.lo gnu/gcj/runtime/natFirstThread.lo \ gnu/gcj/runtime/natNameFinder.lo gnu/gcj/runtime/natSharedLibLoader.lo \ gnu/gcj/runtime/natStackTrace.lo gnu/gcj/runtime/natStringBuffer.lo \ gnu/gcj/runtime/natVMClassLoader.lo gnu/java/awt/natEmbeddedWindow.lo \ -gnu/java/nio/natFileLockImpl.lo gnu/java/nio/natSelectorImpl.lo \ -java/io/natFile.lo java/io/natFileDescriptor.lo \ -java/io/natObjectInputStream.lo java/io/natVMObjectStreamClass.lo \ -java/lang/natCharacter.lo java/lang/natClass.lo \ -java/lang/natClassLoader.lo java/lang/natConcreteProcess.lo \ -java/lang/natDouble.lo java/lang/natFloat.lo java/lang/natMath.lo \ -java/lang/natObject.lo java/lang/natRuntime.lo java/lang/natString.lo \ +gnu/java/net/natPlainDatagramSocketImpl.lo \ +gnu/java/net/natPlainSocketImpl.lo gnu/java/nio/natFileLockImpl.lo \ +gnu/java/nio/natSelectorImpl.lo java/io/natFile.lo \ +java/io/natFileDescriptor.lo java/io/natObjectInputStream.lo \ +java/io/natVMObjectStreamClass.lo java/lang/natCharacter.lo \ +java/lang/natClass.lo java/lang/natClassLoader.lo \ +java/lang/natConcreteProcess.lo java/lang/natDouble.lo \ +java/lang/natFloat.lo java/lang/natMath.lo java/lang/natObject.lo \ +java/lang/natRuntime.lo java/lang/natString.lo \ java/lang/natStringBuffer.lo java/lang/natSystem.lo \ java/lang/natThread.lo java/lang/natVMSecurityManager.lo \ java/lang/ref/natReference.lo java/lang/reflect/natArray.lo \ java/lang/reflect/natConstructor.lo java/lang/reflect/natField.lo \ java/lang/reflect/natMethod.lo java/lang/reflect/natProxy.lo \ java/net/natNetworkInterface.lo java/net/natInetAddress.lo \ -java/net/natPlainDatagramSocketImpl.lo java/net/natPlainSocketImpl.lo \ java/nio/natDirectByteBufferImpl.lo \ java/nio/channels/natFileChannelImpl.lo java/text/natCollator.lo \ java/util/natResourceBundle.lo java/util/natTimeZone.lo \ @@ -3008,7 +3009,11 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ .deps/gnu/java/locale/LocaleInformation_zh_HK.P \ .deps/gnu/java/locale/LocaleInformation_zh_SG.P \ .deps/gnu/java/locale/LocaleInformation_zh_TW.P \ -.deps/gnu/java/math/MPN.P .deps/gnu/java/nio/DatagramChannelImpl.P \ +.deps/gnu/java/math/MPN.P .deps/gnu/java/net/PlainDatagramSocketImpl.P \ +.deps/gnu/java/net/PlainSocketImpl.P \ +.deps/gnu/java/net/natPlainDatagramSocketImpl.P \ +.deps/gnu/java/net/natPlainSocketImpl.P \ +.deps/gnu/java/nio/DatagramChannelImpl.P \ .deps/gnu/java/nio/FileLockImpl.P .deps/gnu/java/nio/PipeImpl.P \ .deps/gnu/java/nio/SelectionKeyImpl.P .deps/gnu/java/nio/SelectorImpl.P \ .deps/gnu/java/nio/SelectorProviderImpl.P \ @@ -3508,8 +3513,6 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ .deps/java/net/NetPermission.P .deps/java/net/NetworkInterface.P \ .deps/java/net/NoRouteToHostException.P \ .deps/java/net/PasswordAuthentication.P \ -.deps/java/net/PlainDatagramSocketImpl.P \ -.deps/java/net/PlainSocketImpl.P \ .deps/java/net/PortUnreachableException.P \ .deps/java/net/ProtocolException.P .deps/java/net/ServerSocket.P \ .deps/java/net/Socket.P .deps/java/net/SocketAddress.P \ @@ -3525,9 +3528,7 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ .deps/java/net/UnknownHostException.P \ .deps/java/net/UnknownServiceException.P \ .deps/java/net/natInetAddress.P .deps/java/net/natNetworkInterface.P \ -.deps/java/net/natPlainDatagramSocketImpl.P \ -.deps/java/net/natPlainSocketImpl.P .deps/java/nio/Buffer.P \ -.deps/java/nio/BufferOverflowException.P \ +.deps/java/nio/Buffer.P .deps/java/nio/BufferOverflowException.P \ .deps/java/nio/BufferUnderflowException.P .deps/java/nio/ByteBuffer.P \ .deps/java/nio/ByteBufferImpl.P .deps/java/nio/ByteOrder.P \ .deps/java/nio/CharBuffer.P .deps/java/nio/CharBufferImpl.P \ diff --git a/libjava/configure b/libjava/configure index 9a15389..e4884e5 100755 --- a/libjava/configure +++ b/libjava/configure @@ -1631,7 +1631,7 @@ else if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.$ac_ext | *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -3182,6 +3182,9 @@ test -d java/net || mkdir java/net +test -d gnu/java || mkdir gnu/java +test -d gnu/java/net || mkdir gnu/java/net + case "${host}" in @@ -3213,7 +3216,7 @@ ZLIBTESTSPEC= # 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:3217: checking for X" >&5 +echo "configure:3220: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3275,12 +3278,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 3279 "configure" +#line 3282 "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:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3287: \"$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* @@ -3349,14 +3352,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 3353 "configure" +#line 3356 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3363: \"$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. @@ -3462,17 +3465,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:3466: checking whether -R must be followed by a space" >&5 +echo "configure:3469: 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 3469 "configure" +#line 3472 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3488,14 +3491,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <<EOF -#line 3492 "configure" +#line 3495 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3527,7 +3530,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:3531: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3534: 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 @@ -3535,7 +3538,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <<EOF -#line 3539 "configure" +#line 3542 "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 @@ -3546,7 +3549,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3553: \"$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 @@ -3568,7 +3571,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:3572: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3575: 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 @@ -3576,7 +3579,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <<EOF -#line 3580 "configure" +#line 3583 "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 @@ -3587,7 +3590,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3594: \"$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 @@ -3616,12 +3619,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:3620: checking for gethostbyname" >&5 +echo "configure:3623: 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 3625 "configure" +#line 3628 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -3644,7 +3647,7 @@ gethostbyname(); ; return 0; } EOF -if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3651: \"$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 @@ -3665,7 +3668,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3669: checking for gethostbyname in -lnsl" >&5 +echo "configure:3672: 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 @@ -3673,7 +3676,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3677 "configure" +#line 3680 "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 @@ -3684,7 +3687,7 @@ int main() { gethostbyname() ; 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:3691: \"$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 @@ -3714,12 +3717,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:3718: checking for connect" >&5 +echo "configure:3721: 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 3723 "configure" +#line 3726 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -3742,7 +3745,7 @@ connect(); ; return 0; } EOF -if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3749: \"$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 @@ -3763,7 +3766,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3767: checking for connect in -lsocket" >&5 +echo "configure:3770: 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 @@ -3771,7 +3774,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 3775 "configure" +#line 3778 "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 @@ -3782,7 +3785,7 @@ int main() { connect() ; return 0; } EOF -if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3789: \"$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 @@ -3806,12 +3809,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:3810: checking for remove" >&5 +echo "configure:3813: 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 3815 "configure" +#line 3818 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove(); below. */ @@ -3834,7 +3837,7 @@ remove(); ; return 0; } EOF -if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3841: \"$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 @@ -3855,7 +3858,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3859: checking for remove in -lposix" >&5 +echo "configure:3862: 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 @@ -3863,7 +3866,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <<EOF -#line 3867 "configure" +#line 3870 "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 @@ -3874,7 +3877,7 @@ int main() { remove() ; return 0; } EOF -if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3881: \"$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 @@ -3898,12 +3901,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3902: checking for shmat" >&5 +echo "configure:3905: 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 3907 "configure" +#line 3910 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat(); below. */ @@ -3926,7 +3929,7 @@ shmat(); ; return 0; } EOF -if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3933: \"$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 @@ -3947,7 +3950,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3951: checking for shmat in -lipc" >&5 +echo "configure:3954: 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 @@ -3955,7 +3958,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <<EOF -#line 3959 "configure" +#line 3962 "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 @@ -3966,7 +3969,7 @@ int main() { shmat() ; return 0; } EOF -if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3973: \"$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 @@ -3999,7 +4002,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:4003: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:4006: 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 @@ -4007,7 +4010,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 4011 "configure" +#line 4014 "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 @@ -4018,7 +4021,7 @@ int main() { IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4025: \"$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 @@ -4116,7 +4119,7 @@ fi libsubdir=.libs echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6 -echo "configure:4120: checking for garbage collector to use" >&5 +echo "configure:4123: 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" @@ -4168,7 +4171,7 @@ esac echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 -echo "configure:4172: checking for thread model used by GCC" >&5 +echo "configure:4175: 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 @@ -4375,12 +4378,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:4379: checking for $ac_func" >&5 +echo "configure:4382: 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 4384 "configure" +#line 4387 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4403,7 +4406,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4410: \"$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 @@ -4430,12 +4433,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:4434: checking for $ac_func" >&5 +echo "configure:4437: 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 4439 "configure" +#line 4442 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4458,7 +4461,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4465: \"$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 @@ -4485,12 +4488,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:4489: checking for $ac_func" >&5 +echo "configure:4492: 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 4494 "configure" +#line 4497 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4513,7 +4516,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4520: \"$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 @@ -4540,12 +4543,12 @@ done for ac_func in nl_langinfo setlocale do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4544: checking for $ac_func" >&5 +echo "configure:4547: 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 4549 "configure" +#line 4552 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4568,7 +4571,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4575: \"$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 @@ -4595,12 +4598,12 @@ done for ac_func in inet_aton inet_addr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4599: checking for $ac_func" >&5 +echo "configure:4602: 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 4604 "configure" +#line 4607 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4623,7 +4626,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4630: \"$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 @@ -4650,12 +4653,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:4654: checking for $ac_func" >&5 +echo "configure:4657: 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 4659 "configure" +#line 4662 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4678,7 +4681,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4685: \"$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 @@ -4705,12 +4708,12 @@ done for ac_func in fork execvp pipe sigaction ftruncate do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4709: checking for $ac_func" >&5 +echo "configure:4712: 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 4714 "configure" +#line 4717 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4733,7 +4736,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4740: \"$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 @@ -4761,17 +4764,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4765: checking for $ac_hdr" >&5 +echo "configure:4768: 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 4770 "configure" +#line 4773 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4778: \"$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* @@ -4798,12 +4801,12 @@ fi done echo $ac_n "checking for backtrace""... $ac_c" 1>&6 -echo "configure:4802: checking for backtrace" >&5 +echo "configure:4805: 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 4807 "configure" +#line 4810 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char backtrace(); below. */ @@ -4826,7 +4829,7 @@ backtrace(); ; return 0; } EOF -if { (eval echo configure:4830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4833: \"$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 @@ -4870,7 +4873,7 @@ fi echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6 -echo "configure:4874: checking for dladdr in -ldl" >&5 +echo "configure:4877: 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 @@ -4878,7 +4881,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4882 "configure" +#line 4885 "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 @@ -4889,7 +4892,7 @@ int main() { dladdr() ; return 0; } EOF -if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4896: \"$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 @@ -4919,7 +4922,7 @@ do ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 -echo "configure:4923: checking for $ac_file" >&5 +echo "configure:4926: 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 @@ -4977,7 +4980,7 @@ fi echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:4981: checking for iconv" >&5 +echo "configure:4984: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4985,7 +4988,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext <<EOF -#line 4989 "configure" +#line 4992 "configure" #include "confdefs.h" #include <stdlib.h> #include <iconv.h> @@ -4995,7 +4998,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else @@ -5007,7 +5010,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext <<EOF -#line 5011 "configure" +#line 5014 "configure" #include "confdefs.h" #include <stdlib.h> #include <iconv.h> @@ -5017,7 +5020,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5024: \"$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 @@ -5038,13 +5041,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6 EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 -echo "configure:5042: checking for iconv declaration" >&5 +echo "configure:5045: 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 5048 "configure" +#line 5051 "configure" #include "confdefs.h" #include <stdlib.h> @@ -5063,7 +5066,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else @@ -5092,19 +5095,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:5096: checking for LC_MESSAGES" >&5 +echo "configure:5099: 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 5101 "configure" +#line 5104 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5111: \"$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 @@ -5125,12 +5128,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:5129: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5132: 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 5134 "configure" +#line 5137 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -5138,7 +5141,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5159,12 +5162,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:5163: checking for tm_zone in struct tm" >&5 +echo "configure:5166: 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 5168 "configure" +#line 5171 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_cv_struct_tm> @@ -5172,7 +5175,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -5192,12 +5195,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:5196: checking for tzname" >&5 +echo "configure:5199: 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 5201 "configure" +#line 5204 "configure" #include "confdefs.h" #include <time.h> #ifndef tzname /* For SGI. */ @@ -5207,7 +5210,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -5232,12 +5235,12 @@ fi for ac_func in gethostbyname_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5236: checking for $ac_func" >&5 +echo "configure:5239: 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 5241 "configure" +#line 5244 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5260,7 +5263,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5267: \"$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 @@ -5287,7 +5290,7 @@ EOF # We look for the one that returns `int'. # Hopefully this check is robust enough. cat > conftest.$ac_ext <<EOF -#line 5291 "configure" +#line 5294 "configure" #include "confdefs.h" #include <netdb.h> EOF @@ -5307,7 +5310,7 @@ rm -f conftest* *" -D_REENTRANT "*) ;; *) echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6 -echo "configure:5311: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5 +echo "configure:5314: 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 @@ -5320,14 +5323,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 5324 "configure" +#line 5327 "configure" #include "confdefs.h" #include <netdb.h> int main() { gethostbyname_r("", 0, 0); ; return 0; } EOF -if { (eval echo configure:5331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_gethostbyname_r_needs_reentrant=no else @@ -5337,14 +5340,14 @@ else CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_REENTRANT" cat > conftest.$ac_ext <<EOF -#line 5341 "configure" +#line 5344 "configure" #include "confdefs.h" #include <netdb.h> int main() { gethostbyname_r("", 0, 0); ; return 0; } EOF -if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_gethostbyname_r_needs_reentrant=yes else @@ -5379,12 +5382,12 @@ EOF esac echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6 -echo "configure:5383: checking for struct hostent_data" >&5 +echo "configure:5386: 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 5388 "configure" +#line 5391 "configure" #include "confdefs.h" #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT) @@ -5395,7 +5398,7 @@ int main() { struct hostent_data data; ; return 0; } EOF -if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_struct_hostent_data=yes else @@ -5427,7 +5430,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 5431 "configure" +#line 5434 "configure" #include "confdefs.h" #include <netdb.h> EOF @@ -5438,12 +5441,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:5442: checking for $ac_func" >&5 +echo "configure:5445: 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 5447 "configure" +#line 5450 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5466,7 +5469,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5473: \"$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 @@ -5493,7 +5496,7 @@ EOF # We look for the one that returns `int'. # Hopefully this check is robust enough. cat > conftest.$ac_ext <<EOF -#line 5497 "configure" +#line 5500 "configure" #include "confdefs.h" #include <netdb.h> EOF @@ -5520,12 +5523,12 @@ rm -f conftest* for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5524: checking for $ac_func" >&5 +echo "configure:5527: 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 5529 "configure" +#line 5532 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5548,7 +5551,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5555: \"$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 @@ -5572,7 +5575,7 @@ EOF EOF cat > conftest.$ac_ext <<EOF -#line 5576 "configure" +#line 5579 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -5596,12 +5599,12 @@ done for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5600: checking for $ac_func" >&5 +echo "configure:5603: 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 5605 "configure" +#line 5608 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5624,7 +5627,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5631: \"$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 @@ -5644,7 +5647,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then EOF cat > conftest.$ac_ext <<EOF -#line 5648 "configure" +#line 5651 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -5675,12 +5678,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:5679: checking for $ac_func" >&5 +echo "configure:5682: 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 5684 "configure" +#line 5687 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5703,7 +5706,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5710: \"$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 @@ -5733,12 +5736,12 @@ done for ac_func in sched_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5737: checking for $ac_func" >&5 +echo "configure:5740: 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 5742 "configure" +#line 5745 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5761,7 +5764,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5768: \"$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 @@ -5783,7 +5786,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 -echo "configure:5787: checking for sched_yield in -lrt" >&5 +echo "configure:5790: 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 @@ -5791,7 +5794,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lrt $LIBS" cat > conftest.$ac_ext <<EOF -#line 5795 "configure" +#line 5798 "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 @@ -5802,7 +5805,7 @@ int main() { sched_yield() ; return 0; } EOF -if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5809: \"$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 @@ -5828,7 +5831,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 -echo "configure:5832: checking for sched_yield in -lposix4" >&5 +echo "configure:5835: 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 @@ -5836,7 +5839,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <<EOF -#line 5840 "configure" +#line 5843 "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 @@ -5847,7 +5850,7 @@ int main() { sched_yield() ; return 0; } EOF -if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5854: \"$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 @@ -5883,7 +5886,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 5887 "configure" +#line 5890 "configure" #include "confdefs.h" #include <pthread.h> int main() { @@ -5892,7 +5895,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define PTHREAD_MUTEX_HAVE_M_COUNT 1 @@ -5904,7 +5907,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 5908 "configure" +#line 5911 "configure" #include "confdefs.h" #include <pthread.h> int main() { @@ -5913,7 +5916,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define PTHREAD_MUTEX_HAVE___M_COUNT 1 @@ -5933,12 +5936,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:5937: checking for $ac_func" >&5 +echo "configure:5940: 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 5942 "configure" +#line 5945 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5961,7 +5964,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5968: \"$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 @@ -5992,12 +5995,12 @@ done for ac_func in memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5996: checking for $ac_func" >&5 +echo "configure:5999: 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 6001 "configure" +#line 6004 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6020,7 +6023,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6027: \"$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 @@ -6050,12 +6053,12 @@ done for ac_func in memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6054: checking for $ac_func" >&5 +echo "configure:6057: 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 6059 "configure" +#line 6062 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6078,7 +6081,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6085: \"$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 @@ -6107,7 +6110,7 @@ done fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:6111: checking for dlopen in -ldl" >&5 +echo "configure:6114: 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 @@ -6115,7 +6118,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 6119 "configure" +#line 6122 "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 @@ -6126,7 +6129,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6133: \"$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 @@ -6171,7 +6174,7 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for socket libraries""... $ac_c" 1>&6 -echo "configure:6175: checking for socket libraries" >&5 +echo "configure:6178: 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 @@ -6179,12 +6182,12 @@ else gcj_checkBoth=0 unset ac_cv_func_connect echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:6183: checking for connect" >&5 +echo "configure:6186: 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 6188 "configure" +#line 6191 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -6207,7 +6210,7 @@ connect(); ; return 0; } EOF -if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6214: \"$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 @@ -6230,7 +6233,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:6234: checking for main in -lsocket" >&5 +echo "configure:6237: 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 @@ -6238,14 +6241,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 6242 "configure" +#line 6245 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6252: \"$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 @@ -6272,12 +6275,12 @@ fi LIBS="$LIBS -lsocket -lnsl" unset ac_cv_func_accept echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:6276: checking for accept" >&5 +echo "configure:6279: 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 6281 "configure" +#line 6284 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char accept(); below. */ @@ -6300,7 +6303,7 @@ accept(); ; return 0; } EOF -if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6307: \"$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 @@ -6327,12 +6330,12 @@ fi gcj_oldLibs=$LIBS LIBS="$LIBS $gcj_cv_lib_sockets" echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:6331: checking for gethostbyname" >&5 +echo "configure:6334: 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 6336 "configure" +#line 6339 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -6355,7 +6358,7 @@ gethostbyname(); ; return 0; } EOF -if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6362: \"$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 @@ -6373,7 +6376,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:6377: checking for main in -lnsl" >&5 +echo "configure:6380: 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 @@ -6381,14 +6384,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 6385 "configure" +#line 6388 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6395: \"$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 @@ -6420,7 +6423,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:6424: checking for deflate in -lz" >&5 +echo "configure:6427: 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 @@ -6428,7 +6431,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 6432 "configure" +#line 6435 "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 @@ -6439,7 +6442,7 @@ int main() { deflate() ; return 0; } EOF -if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6446: \"$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 @@ -6488,7 +6491,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6492: checking for $ac_word" >&5 +echo "configure:6495: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6536,7 +6539,7 @@ fi min_gtk_version=2.0.0 echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:6540: checking for GTK+ - version >= $min_gtk_version" >&5 +echo "configure:6543: checking for GTK+ - version >= $min_gtk_version" >&5 if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs @@ -6571,7 +6574,7 @@ echo "configure:6540: checking for GTK+ - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext <<EOF -#line 6575 "configure" +#line 6578 "configure" #include "confdefs.h" #include <gtk/gtk.h> @@ -6646,7 +6649,7 @@ main () } EOF -if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6680,7 +6683,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext <<EOF -#line 6684 "configure" +#line 6687 "configure" #include "confdefs.h" #include <gtk/gtk.h> @@ -6690,7 +6693,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" @@ -6749,7 +6752,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6753: checking for $ac_word" >&5 +echo "configure:6756: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6799,7 +6802,7 @@ fi min_glib_version=2.0.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:6803: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:6806: checking for GLIB - version >= $min_glib_version" >&5 if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs @@ -6838,7 +6841,7 @@ echo "configure:6803: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext <<EOF -#line 6842 "configure" +#line 6845 "configure" #include "confdefs.h" #include <glib.h> @@ -6913,7 +6916,7 @@ main () } EOF -if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6947,7 +6950,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext <<EOF -#line 6951 "configure" +#line 6954 "configure" #include "confdefs.h" #include <glib.h> @@ -6957,7 +6960,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -7036,7 +7039,7 @@ fi # Extract the first word of "libart2-config", so it can be a program name with args. set dummy libart2-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7040: checking for $ac_word" >&5 +echo "configure:7043: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7073,7 +7076,7 @@ fi # Extract the first word of "libart-config", so it can be a program name with args. set dummy libart-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7077: checking for $ac_word" >&5 +echo "configure:7080: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7109,7 +7112,7 @@ fi fi min_libart_version=2.1.0 echo $ac_n "checking for LIBART - version >= $min_libart_version""... $ac_c" 1>&6 -echo "configure:7113: checking for LIBART - version >= $min_libart_version" >&5 +echo "configure:7116: checking for LIBART - version >= $min_libart_version" >&5 no_libart="" if test "$LIBART_CONFIG" = "no" ; then no_libart=yes @@ -7133,7 +7136,7 @@ echo "configure:7113: checking for LIBART - version >= $min_libart_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext <<EOF -#line 7137 "configure" +#line 7140 "configure" #include "confdefs.h" #include <stdio.h> @@ -7191,7 +7194,7 @@ int main () EOF -if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7225,7 +7228,7 @@ fi CFLAGS="$CFLAGS $LIBART_CFLAGS" LIBS="$LIBS $LIBART_LIBS" cat > conftest.$ac_ext <<EOF -#line 7229 "configure" +#line 7232 "configure" #include "confdefs.h" #include <stdio.h> @@ -7235,7 +7238,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:7239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBART or finding the wrong" @@ -7274,7 +7277,7 @@ rm -f conftest* # requires -ldl. if test "$GC" = boehm; then echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 -echo "configure:7278: checking for main in -ldl" >&5 +echo "configure:7281: 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 @@ -7282,14 +7285,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 7286 "configure" +#line 7289 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:7293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7296: \"$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 @@ -7410,7 +7413,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:7414: checking for $ac_word" >&5 +echo "configure:7417: 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 @@ -7442,7 +7445,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:7446: checking for $ac_word" >&5 +echo "configure:7449: 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 @@ -7504,13 +7507,13 @@ exec 5>>./config.log CPPFLAGS=$GCJ_SAVE_CPPFLAGS echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:7508: checking size of void *" >&5 +echo "configure:7511: 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 7514 "configure" +#line 7517 "configure" #include "confdefs.h" #include "confdefs.h" #include <sys/types.h> @@ -7520,7 +7523,7 @@ int main() { switch (0) case 0: case (sizeof (void *) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:7524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_void_p=$ac_size else @@ -7630,18 +7633,18 @@ EOF echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6 -echo "configure:7634: checking for g++ -ffloat-store bug" >&5 +echo "configure:7637: checking for g++ -ffloat-store bug" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-x c++ -O2 -ffloat-store" cat > conftest.$ac_ext <<EOF -#line 7638 "configure" +#line 7641 "configure" #include "confdefs.h" #include <math.h> int main() { ; return 0; } EOF -if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -7661,17 +7664,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:7665: checking for $ac_hdr" >&5 +echo "configure:7668: 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 7670 "configure" +#line 7673 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7678: \"$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* @@ -7701,17 +7704,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:7705: checking for $ac_hdr" >&5 +echo "configure:7708: 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 7710 "configure" +#line 7713 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7718: \"$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* @@ -7741,17 +7744,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:7745: checking for $ac_hdr" >&5 +echo "configure:7748: 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 7750 "configure" +#line 7753 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7758: \"$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* @@ -7787,12 +7790,12 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:7791: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:7794: 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 7796 "configure" +#line 7799 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -7808,7 +7811,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:7812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -7830,12 +7833,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7834: checking for ANSI C header files" >&5 +echo "configure:7837: 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 7839 "configure" +#line 7842 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -7843,7 +7846,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7850: \"$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* @@ -7860,7 +7863,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 7864 "configure" +#line 7867 "configure" #include "confdefs.h" #include <string.h> EOF @@ -7878,7 +7881,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 7882 "configure" +#line 7885 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -7899,7 +7902,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 7903 "configure" +#line 7906 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -7910,7 +7913,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7934,12 +7937,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:7938: checking for ssize_t" >&5 +echo "configure:7941: 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 7943 "configure" +#line 7946 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -7968,9 +7971,9 @@ fi echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6 -echo "configure:7972: checking for in_addr_t" >&5 +echo "configure:7975: checking for in_addr_t" >&5 cat > conftest.$ac_ext <<EOF -#line 7974 "configure" +#line 7977 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -7984,7 +7987,7 @@ int main() { in_addr_t foo; ; return 0; } EOF -if { (eval echo configure:7988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_IN_ADDR_T 1 @@ -8000,16 +8003,16 @@ fi rm -f conftest* echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6 -echo "configure:8004: checking whether struct ip_mreq is in netinet/in.h" >&5 +echo "configure:8007: checking whether struct ip_mreq is in netinet/in.h" >&5 cat > conftest.$ac_ext <<EOF -#line 8006 "configure" +#line 8009 "configure" #include "confdefs.h" #include <netinet/in.h> int main() { struct ip_mreq mreq; ; return 0; } EOF -if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_IP_MREQ 1 @@ -8025,16 +8028,16 @@ fi rm -f conftest* echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6 -echo "configure:8029: checking whether struct ipv6_mreq is in netinet/in.h" >&5 +echo "configure:8032: checking whether struct ipv6_mreq is in netinet/in.h" >&5 cat > conftest.$ac_ext <<EOF -#line 8031 "configure" +#line 8034 "configure" #include "confdefs.h" #include <netinet/in.h> int main() { struct ipv6_mreq mreq6; ; return 0; } EOF -if { (eval echo configure:8038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_IPV6_MREQ 1 @@ -8050,16 +8053,16 @@ fi rm -f conftest* echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6 -echo "configure:8054: checking whether struct sockaddr_in6 is in netinet/in.h" >&5 +echo "configure:8057: checking whether struct sockaddr_in6 is in netinet/in.h" >&5 cat > conftest.$ac_ext <<EOF -#line 8056 "configure" +#line 8059 "configure" #include "confdefs.h" #include <netinet/in.h> int main() { struct sockaddr_in6 addr6; ; return 0; } EOF -if { (eval echo configure:8063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_INET6 1 @@ -8075,9 +8078,9 @@ fi rm -f conftest* echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6 -echo "configure:8079: checking for socklen_t in sys/socket.h" >&5 +echo "configure:8082: checking for socklen_t in sys/socket.h" >&5 cat > conftest.$ac_ext <<EOF -#line 8081 "configure" +#line 8084 "configure" #include "confdefs.h" #define _POSIX_PII_SOCKET #include <sys/types.h> @@ -8086,7 +8089,7 @@ int main() { socklen_t x = 5; ; return 0; } EOF -if { (eval echo configure:8090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 @@ -8102,16 +8105,16 @@ fi rm -f conftest* echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:8106: checking for tm_gmtoff in struct tm" >&5 +echo "configure:8109: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext <<EOF -#line 8108 "configure" +#line 8111 "configure" #include "confdefs.h" #include <time.h> int main() { struct tm tim; tim.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:8115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define STRUCT_TM_HAS_GMTOFF 1 @@ -8124,16 +8127,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:8128: checking for global timezone variable" >&5 +echo "configure:8131: checking for global timezone variable" >&5 cat > conftest.$ac_ext <<EOF -#line 8130 "configure" +#line 8133 "configure" #include "confdefs.h" #include <time.h> int main() { void i(){long z2 = 2*timezone;} ; return 0; } EOF -if { (eval echo configure:8137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIMEZONE 1 @@ -8146,16 +8149,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:8150: checking for global _timezone variable" >&5 +echo "configure:8153: checking for global _timezone variable" >&5 cat > conftest.$ac_ext <<EOF -#line 8152 "configure" +#line 8155 "configure" #include "confdefs.h" #include <time.h> int main() { long z2 = _timezone; ; return 0; } EOF -if { (eval echo configure:8159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UNDERSCORE_TIMEZONE 1 @@ -8177,19 +8180,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:8181: checking for working alloca.h" >&5 +echo "configure:8184: 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 8186 "configure" +#line 8189 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8196: \"$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 @@ -8210,12 +8213,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:8214: checking for alloca" >&5 +echo "configure:8217: 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 8219 "configure" +#line 8222 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -8243,7 +8246,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8250: \"$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 @@ -8275,12 +8278,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:8279: checking whether alloca needs Cray hooks" >&5 +echo "configure:8282: 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 8284 "configure" +#line 8287 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -8305,12 +8308,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:8309: checking for $ac_func" >&5 +echo "configure:8312: 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 8314 "configure" +#line 8317 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8333,7 +8336,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:8337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8340: \"$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 @@ -8360,7 +8363,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:8364: checking stack direction for C alloca" >&5 +echo "configure:8367: 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 @@ -8368,7 +8371,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 8372 "configure" +#line 8375 "configure" #include "confdefs.h" find_stack_direction () { @@ -8387,7 +8390,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8394: \"$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 @@ -8412,17 +8415,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8416: checking for $ac_hdr" >&5 +echo "configure:8419: 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 8421 "configure" +#line 8424 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8429: \"$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* @@ -8451,12 +8454,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8455: checking for $ac_func" >&5 +echo "configure:8458: 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 8460 "configure" +#line 8463 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8479,7 +8482,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8486: \"$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 @@ -8504,7 +8507,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:8508: checking for working mmap" >&5 +echo "configure:8511: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8512,7 +8515,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 8516 "configure" +#line 8519 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -8652,7 +8655,7 @@ main() } EOF -if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -8680,7 +8683,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:8684: checking for $ac_word" >&5 +echo "configure:8687: 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 @@ -9258,8 +9261,8 @@ fi; done EOF cat >> $CONFIG_STATUS <<EOF -ac_sources="include/$PLATFORMH java/io/natFile${FILE-${PLATFORM}}.cc java/io/natFileDescriptor${FILE-${PLATFORM}}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc java/net/natInetAddress${PLATFORMNET}.cc java/net/natNetworkInterface${PLATFORMNET}.cc java/net/natPlainSocketImpl${PLATFORMNET}.cc java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER" -ac_dests="include/platform.h java/io/natFile.cc java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc java/net/natInetAddress.cc java/net/natNetworkInterface.cc java/net/natPlainSocketImpl.cc java/net/natPlainDatagramSocketImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h" +ac_sources="include/$PLATFORMH java/io/natFile${FILE-${PLATFORM}}.cc java/io/natFileDescriptor${FILE-${PLATFORM}}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc java/net/natInetAddress${PLATFORMNET}.cc java/net/natNetworkInterface${PLATFORMNET}.cc gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER" +ac_dests="include/platform.h java/io/natFile.cc java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc java/net/natInetAddress.cc java/net/natNetworkInterface.cc gnu/java/net/natPlainSocketImpl.cc gnu/java/net/natPlainDatagramSocketImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h" EOF cat >> $CONFIG_STATUS <<\EOF @@ -9453,7 +9456,7 @@ if test "$no_recursion" != yes; then fi fi - cd $ac_popdir + cd "$ac_popdir" done fi diff --git a/libjava/configure.in b/libjava/configure.in index 24224db..d787120 100644 --- a/libjava/configure.in +++ b/libjava/configure.in @@ -272,13 +272,16 @@ test -d java/lang || mkdir java/lang AC_LINK_FILES(java/lang/${PLATFORM}Process.java, java/lang/ConcreteProcess.java) AC_LINK_FILES(java/lang/nat${PLATFORM}Process.cc, java/lang/natConcreteProcess.cc) -dnl Likewise for natInetAddress.cc, natNetworkInterface.cc, natPlainSocketImpl.cc -dnl and natPlainDatagramSocketImpl.cc +dnl Likewise for natInetAddress.cc and natNetworkInterface.cc. test -d java/net || mkdir java/net AC_LINK_FILES(java/net/natInetAddress${PLATFORMNET}.cc, java/net/natInetAddress.cc) AC_LINK_FILES(java/net/natNetworkInterface${PLATFORMNET}.cc, java/net/natNetworkInterface.cc) -AC_LINK_FILES(java/net/natPlainSocketImpl${PLATFORMNET}.cc, java/net/natPlainSocketImpl.cc) -AC_LINK_FILES(java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc, java/net/natPlainDatagramSocketImpl.cc) + +dnl Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.ca.c +test -d gnu/java || mkdir gnu/java +test -d gnu/java/net || mkdir gnu/java/net +AC_LINK_FILES(gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainSocketImpl.cc) +AC_LINK_FILES(gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainDatagramSocketImpl.cc) case "${host}" in *mingw*) diff --git a/libjava/java/net/PlainDatagramSocketImpl.java b/libjava/gnu/java/net/PlainDatagramSocketImpl.java index 83fdb63..a0785db 100644 --- a/libjava/java/net/PlainDatagramSocketImpl.java +++ b/libjava/gnu/java/net/PlainDatagramSocketImpl.java @@ -1,5 +1,5 @@ /* PlainDatagramSocketImpl.java -- Default DatagramSocket implementation - Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -36,9 +36,17 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -package java.net; +package gnu.java.net; import java.io.IOException; +import java.net.DatagramPacket; +import java.net.DatagramSocketImpl; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.NetworkInterface; +import java.net.SocketAddress; +import java.net.SocketOptions; +import java.net.SocketException; import gnu.classpath.Configuration; /** @@ -55,7 +63,7 @@ import gnu.classpath.Configuration; * @author Aaron M. Renn <arenn@urbanophile.com> * @author Warren Levy <warrenl@cygnus.com> */ -class PlainDatagramSocketImpl extends DatagramSocketImpl +public final class PlainDatagramSocketImpl extends DatagramSocketImpl { // Static initializer to load native library static diff --git a/libjava/java/net/PlainSocketImpl.java b/libjava/gnu/java/net/PlainSocketImpl.java index ad0ce46..182f357f 100644 --- a/libjava/java/net/PlainSocketImpl.java +++ b/libjava/gnu/java/net/PlainSocketImpl.java @@ -1,5 +1,5 @@ /* PlainSocketImpl.java -- Default socket implementation - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -36,11 +36,17 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -package java.net; +package gnu.java.net; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.net.SocketException; +import java.net.SocketImpl; +import java.net.SocketOptions; import gnu.classpath.Configuration; /** @@ -59,7 +65,7 @@ import gnu.classpath.Configuration; * @author Nic Ferrier <nferrier@tapsellferrier.co.uk> * @author Aaron M. Renn <arenn@urbanophile.com> */ -class PlainSocketImpl extends SocketImpl +public final class PlainSocketImpl extends SocketImpl { // Static initializer to load native library. static diff --git a/libjava/java/net/SocketInputStream.java b/libjava/gnu/java/net/SocketInputStream.java index f2d4d39..90d703b 100644 --- a/libjava/java/net/SocketInputStream.java +++ b/libjava/gnu/java/net/SocketInputStream.java @@ -36,7 +36,7 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -package java.net; +package gnu.java.net; import java.io.InputStream; import java.io.IOException; diff --git a/libjava/java/net/SocketOutputStream.java b/libjava/gnu/java/net/SocketOutputStream.java index 7ce19ae..4d68e3c 100644 --- a/libjava/java/net/SocketOutputStream.java +++ b/libjava/gnu/java/net/SocketOutputStream.java @@ -35,7 +35,8 @@ 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.net; + +package gnu.java.net; import java.io.OutputStream; import java.io.IOException; diff --git a/libjava/gnu/java/net/natPlainDatagramSocketImplNoNet.cc b/libjava/gnu/java/net/natPlainDatagramSocketImplNoNet.cc new file mode 100644 index 0000000..7cb5a2e --- /dev/null +++ b/libjava/gnu/java/net/natPlainDatagramSocketImplNoNet.cc @@ -0,0 +1,119 @@ +/* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#include <config.h> +#include <platform.h> + +#include <gnu/java/net/PlainDatagramSocketImpl.h> +#include <java/io/IOException.h> +#include <java/lang/Object.h> +#include <java/net/BindException.h> +#include <java/net/DatagramPacket.h> +#include <java/net/InetAddress.h> +#include <java/net/NetworkInterface.h> +#include <java/net/SocketException.h> + +void +gnu::java::net::PlainDatagramSocketImpl::create () +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("DatagramSocketImpl.create: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::bind (jint, ::java::net::InetAddress *) +{ + throw new ::java::net::BindException ( + JvNewStringLatin1 ("DatagramSocketImpl.bind: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::connect (::java::net::InetAddress *, jint) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("DatagramSocketImpl.connect: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::disconnect () +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("DatagramSocketImpl.disconnect: unimplemented")); +} + +jint +gnu::java::net::PlainDatagramSocketImpl::peek (::java::net::InetAddress *) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.peek: unimplemented")); +} + +jint +gnu::java::net::PlainDatagramSocketImpl::peekData (::java::net::DatagramPacket *) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.peekData: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::close () +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.close: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::send (::java::net::DatagramPacket *) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.send: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::receive (::java::net::DatagramPacket *) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.receive: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::setTimeToLive (jint) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.setTimeToLive: unimplemented")); +} + +jint +gnu::java::net::PlainDatagramSocketImpl::getTimeToLive () +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.getTimeToLive: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::mcastGrp (::java::net::InetAddress *, + ::java::net::NetworkInterface *, + jboolean) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("DatagramSocketImpl.mcastGrp: unimplemented")); +} + +void +gnu::java::net::PlainDatagramSocketImpl::setOption (jint, ::java::lang::Object *) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("DatagramSocketImpl.setOption: unimplemented")); +} + +::java::lang::Object * +gnu::java::net::PlainDatagramSocketImpl::getOption (jint) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("DatagramSocketImpl.getOption: unimplemented")); +} diff --git a/libjava/java/net/natPlainDatagramSocketImplPosix.cc b/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc index 14f6fee..f1897b7 100644 --- a/libjava/java/net/natPlainDatagramSocketImplPosix.cc +++ b/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc @@ -24,11 +24,11 @@ details. */ #endif #include <gcj/cni.h> +#include <gnu/java/net/PlainDatagramSocketImpl.h> #include <java/io/IOException.h> #include <java/io/InterruptedIOException.h> #include <java/net/BindException.h> #include <java/net/SocketException.h> -#include <java/net/PlainDatagramSocketImpl.h> #include <java/net/InetAddress.h> #include <java/net/NetworkInterface.h> #include <java/net/DatagramPacket.h> @@ -69,14 +69,14 @@ union InAddr // NoRouteToHostException; also consider UnknownHostException, ConnectException. void -java::net::PlainDatagramSocketImpl::create () +gnu::java::net::PlainDatagramSocketImpl::create () { int sock = _Jv_socket (AF_INET, SOCK_DGRAM, 0); if (sock < 0) { char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); + throw new ::java::net::SocketException (JvNewStringUTF (strerr)); } _Jv_platform_close_on_exec (sock); @@ -87,8 +87,8 @@ java::net::PlainDatagramSocketImpl::create () } void -java::net::PlainDatagramSocketImpl::bind (jint lport, - java::net::InetAddress *host) +gnu::java::net::PlainDatagramSocketImpl::bind (jint lport, + ::java::net::InetAddress *host) { union SockAddr u; struct sockaddr *ptr = (struct sockaddr *) &u.address; @@ -119,7 +119,7 @@ java::net::PlainDatagramSocketImpl::bind (jint lport, } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (_Jv_bind (fnum, ptr, len) == 0) { @@ -143,25 +143,25 @@ java::net::PlainDatagramSocketImpl::bind (jint lport, error: char* strerr = strerror (errno); - throw new java::net::BindException (JvNewStringUTF (strerr)); + throw new ::java::net::BindException (JvNewStringUTF (strerr)); } void -java::net::PlainDatagramSocketImpl::connect (java::net::InetAddress *, jint) +gnu::java::net::PlainDatagramSocketImpl::connect (::java::net::InetAddress *, jint) { throw new ::java::lang::InternalError (JvNewStringLatin1 ( "PlainDatagramSocketImpl::connect: not implemented yet")); } void -java::net::PlainDatagramSocketImpl::disconnect () +gnu::java::net::PlainDatagramSocketImpl::disconnect () { throw new ::java::lang::InternalError (JvNewStringLatin1 ( "PlainDatagramSocketImpl::disconnect: not implemented yet")); } jint -java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *i) +gnu::java::net::PlainDatagramSocketImpl::peek (::java::net::InetAddress *i) { // FIXME: Deal with Multicast and if the socket is connected. union SockAddr u; @@ -189,7 +189,7 @@ java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *i) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); i->addr = raddr; return rport; @@ -197,13 +197,13 @@ java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *i) char* strerr = strerror (errno); if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); + throw new ::java::net::PortUnreachableException (JvNewStringUTF (strerr)); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } jint -java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) +gnu::java::net::PlainDatagramSocketImpl::peekData (::java::net::DatagramPacket *p) { // FIXME: Deal with Multicast and if the socket is connected. union SockAddr u; @@ -224,7 +224,7 @@ java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0) goto error; else if (retval == 0) - throw new java::io::InterruptedIOException (); + throw new ::java::io::InterruptedIOException (); } retlen = @@ -250,9 +250,9 @@ java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); - p->setAddress (new InetAddress (raddr, NULL)); + p->setAddress (new ::java::net::InetAddress (raddr, NULL)); p->setPort (rport); p->setLength ((jint) retlen); return rport; @@ -261,14 +261,14 @@ java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) char* strerr = strerror (errno); if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); + throw new ::java::net::PortUnreachableException (JvNewStringUTF (strerr)); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } // Close(shutdown) the socket. void -java::net::PlainDatagramSocketImpl::close () +gnu::java::net::PlainDatagramSocketImpl::close () { // Avoid races from asynchronous finalization. JvSynchronize sync (this); @@ -281,7 +281,7 @@ java::net::PlainDatagramSocketImpl::close () } void -java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *p) +gnu::java::net::PlainDatagramSocketImpl::send (::java::net::DatagramPacket *p) { // FIXME: Deal with Multicast and if the socket is connected. jint rport = p->getPort(); @@ -308,7 +308,7 @@ java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *p) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (::sendto (fnum, (char *) dbytes, p->getLength(), 0, ptr, len) >= 0) return; @@ -316,13 +316,13 @@ java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *p) char* strerr = strerror (errno); if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); + throw new ::java::net::PortUnreachableException (JvNewStringUTF (strerr)); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } void -java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) +gnu::java::net::PlainDatagramSocketImpl::receive (::java::net::DatagramPacket *p) { // FIXME: Deal with Multicast and if the socket is connected. union SockAddr u; @@ -343,7 +343,7 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0) goto error; else if (retval == 0) - throw new java::io::InterruptedIOException (); + throw new ::java::io::InterruptedIOException (); } retlen = @@ -369,9 +369,9 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); - p->setAddress (new InetAddress (raddr, NULL)); + p->setAddress (new ::java::net::InetAddress (raddr, NULL)); p->setPort (rport); p->setLength ((jint) retlen); return; @@ -380,13 +380,13 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) char* strerr = strerror (errno); if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); + throw new ::java::net::PortUnreachableException (JvNewStringUTF (strerr)); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } void -java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl) +gnu::java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl) { // Assumes IPPROTO_IP rather than IPPROTO_IPV6 since socket created is IPv4. char val = (char) ttl; @@ -396,11 +396,11 @@ java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl) return; char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } jint -java::net::PlainDatagramSocketImpl::getTimeToLive () +gnu::java::net::PlainDatagramSocketImpl::getTimeToLive () { // Assumes IPPROTO_IP rather than IPPROTO_IPV6 since socket created is IPv4. char val; @@ -410,13 +410,13 @@ java::net::PlainDatagramSocketImpl::getTimeToLive () return ((int) val) & 0xFF; char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } void -java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr, - java::net::NetworkInterface *, - jboolean join) +gnu::java::net::PlainDatagramSocketImpl::mcastGrp (::java::net::InetAddress *inetaddr, + ::java::net::NetworkInterface *, + jboolean join) { // FIXME: implement use of NetworkInterface @@ -464,35 +464,35 @@ java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr, } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (::setsockopt (fnum, level, opname, ptr, len) == 0) return; char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } void -java::net::PlainDatagramSocketImpl::setOption (jint optID, - java::lang::Object *value) +gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID, + ::java::lang::Object *value) { int val; socklen_t val_len = sizeof (val); if (fnum < 0) - throw new java::net::SocketException (JvNewStringUTF ("Socket closed")); + throw new ::java::net::SocketException (JvNewStringUTF ("Socket closed")); - if (_Jv_IsInstanceOf (value, &java::lang::Boolean::class$)) + if (_Jv_IsInstanceOf (value, &::java::lang::Boolean::class$)) { - java::lang::Boolean *boolobj = - static_cast<java::lang::Boolean *> (value); + ::java::lang::Boolean *boolobj = + static_cast< ::java::lang::Boolean *> (value); val = boolobj->booleanValue() ? 1 : 0; } - else if (_Jv_IsInstanceOf (value, &java::lang::Integer::class$)) + else if (_Jv_IsInstanceOf (value, &::java::lang::Integer::class$)) { - java::lang::Integer *intobj = - static_cast<java::lang::Integer *> (value); + ::java::lang::Integer *intobj = + static_cast< ::java::lang::Integer *> (value); val = (int) intobj->intValue(); } // Else assume value to be an InetAddress for use with IP_MULTICAST_IF. @@ -500,15 +500,15 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, switch (optID) { case _Jv_TCP_NODELAY_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("TCP_NODELAY not valid for UDP")); return; case _Jv_SO_LINGER_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_LINGER not valid for UDP")); return; case _Jv_SO_KEEPALIVE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_KEEPALIVE not valid for UDP")); return; @@ -519,7 +519,7 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, break; case _Jv_SO_OOBINLINE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_OOBINLINE: not valid for UDP")); break; @@ -531,7 +531,7 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, if (::setsockopt (fnum, SOL_SOCKET, opt, (char *) &val, val_len) != 0) goto error; #else - throw new java::lang::InternalError ( + throw new ::java::lang::InternalError ( JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); #endif return; @@ -541,12 +541,12 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, val_len) != 0) goto error; #else - throw new java::lang::InternalError ( + throw new ::java::lang::InternalError ( JvNewStringUTF ("SO_REUSEADDR not supported")); #endif return; case _Jv_SO_BINDADDR_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_BINDADDR: read only option")); return; case _Jv_IP_MULTICAST_IF_ : @@ -557,7 +557,7 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, int level, opname; const char *ptr; - haddress = ((java::net::InetAddress *) value)->addr; + haddress = ((::java::net::InetAddress *) value)->addr; bytes = elements (haddress); len = haddress->length; if (len == 4) @@ -581,19 +581,19 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, #endif else throw - new java::net::SocketException (JvNewStringUTF ("invalid length")); + new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (::setsockopt (fnum, level, opname, ptr, len) != 0) goto error; return; case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF2: not yet implemented")); break; case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_LOOP: not yet implemented")); break; @@ -612,11 +612,11 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, error: char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); + throw new ::java::net::SocketException (JvNewStringUTF (strerr)); } -java::lang::Object * -java::net::PlainDatagramSocketImpl::getOption (jint optID) +::java::lang::Object * +gnu::java::net::PlainDatagramSocketImpl::getOption (jint optID) { int val; socklen_t val_len = sizeof(val); @@ -626,15 +626,15 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) switch (optID) { case _Jv_TCP_NODELAY_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("TCP_NODELAY not valid for UDP")); break; case _Jv_SO_LINGER_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_LINGER not valid for UDP")); break; case _Jv_SO_KEEPALIVE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_KEEPALIVE not valid for UDP")); break; @@ -642,10 +642,10 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); case _Jv_SO_OOBINLINE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_OOBINLINE not valid for UDP")); break; @@ -657,9 +657,9 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, opt, (char *) &val, &val_len) != 0) goto error; else - return new java::lang::Integer (val); + return new ::java::lang::Integer (val); #else - throw new java::lang::InternalError ( + throw new ::java::lang::InternalError ( JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); #endif break; @@ -683,9 +683,9 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) } #endif else - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("invalid family")); - localAddress = new java::net::InetAddress (laddr, NULL); + localAddress = new ::java::net::InetAddress (laddr, NULL); } return localAddress; break; @@ -694,9 +694,9 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, SO_REUSEADDR, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); #else - throw new java::lang::InternalError ( + throw new ::java::lang::InternalError ( JvNewStringUTF ("SO_REUSEADDR not supported")); #endif break; @@ -713,18 +713,18 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) bytes = inet_ntoa (inaddr); - return java::net::InetAddress::getByName (JvNewStringLatin1 (bytes)); + return ::java::net::InetAddress::getByName (JvNewStringLatin1 (bytes)); #else - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF: not available - no inet_ntoa()")); #endif break; case _Jv_SO_TIMEOUT_ : - return new java::lang::Integer (timeout); + return new ::java::lang::Integer (timeout); break; case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF2: not yet implemented")); break; @@ -732,13 +732,13 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, IP_MULTICAST_LOOP, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); case _Jv_IP_TOS_ : if (::getsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Integer (val); + return new ::java::lang::Integer (val); default : errno = ENOPROTOOPT; @@ -746,5 +746,5 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) error: char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); + throw new ::java::net::SocketException (JvNewStringUTF (strerr)); } diff --git a/libjava/java/net/natPlainDatagramSocketImplWin32.cc b/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc index 53927de..ae4b092 100644 --- a/libjava/java/net/natPlainDatagramSocketImplWin32.cc +++ b/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc @@ -15,11 +15,11 @@ details. */ #include <bstring.h> #endif +#include <gnu/java/net/PlainDatagramSocketImpl.h> #include <java/io/IOException.h> #include <java/io/InterruptedIOException.h> #include <java/net/BindException.h> #include <java/net/SocketException.h> -#include <java/net/PlainDatagramSocketImpl.h> #include <java/net/InetAddress.h> #include <java/net/NetworkInterface.h> #include <java/net/DatagramPacket.h> @@ -60,7 +60,7 @@ union InAddr // NoRouteToHostException; also consider UnknownHostException, ConnectException. void -java::net::PlainDatagramSocketImpl::create () +gnu::java::net::PlainDatagramSocketImpl::create () { SOCKET sock = ::socket (AF_INET, SOCK_DGRAM, 0); @@ -77,8 +77,8 @@ java::net::PlainDatagramSocketImpl::create () } void -java::net::PlainDatagramSocketImpl::bind (jint lport, - java::net::InetAddress *host) +gnu::java::net::PlainDatagramSocketImpl::bind (jint lport, + ::java::net::InetAddress *host) { union SockAddr u; struct sockaddr *ptr = (struct sockaddr *) &u.address; @@ -109,7 +109,7 @@ java::net::PlainDatagramSocketImpl::bind (jint lport, } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (::bind (fnum, ptr, len) == 0) { @@ -133,25 +133,25 @@ java::net::PlainDatagramSocketImpl::bind (jint lport, error: DWORD dwErrorCode = WSAGetLastError (); - throw new java::net::BindException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::BindException (_Jv_WinStrError (dwErrorCode)); } void -java::net::PlainDatagramSocketImpl::connect (java::net::InetAddress *, jint) -{ +gnu::java::net::PlainDatagramSocketImpl::connect (::java::net::InetAddress *, jint) +{ throw new ::java::lang::InternalError (JvNewStringLatin1 ( "PlainDatagramSocketImpl::connect: not implemented yet")); } void -java::net::PlainDatagramSocketImpl::disconnect () +gnu::java::net::PlainDatagramSocketImpl::disconnect () { throw new ::java::lang::InternalError (JvNewStringLatin1 ( "PlainDatagramSocketImpl::disconnect: not implemented yet")); } jint -java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *i) +gnu::java::net::PlainDatagramSocketImpl::peek (::java::net::InetAddress *i) { // FIXME: Deal with Multicast and if the socket is connected. union SockAddr u; @@ -179,14 +179,14 @@ java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *i) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); i->addr = raddr; return rport; error: DWORD dwErrorCode = WSAGetLastError (); if (dwErrorCode == WSAECONNRESET) - throw new PortUnreachableException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::PortUnreachableException (_Jv_WinStrError (dwErrorCode)); _Jv_ThrowIOException (); return -1; @@ -194,7 +194,7 @@ error: } jint -java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) +gnu::java::net::PlainDatagramSocketImpl::peekData(::java::net::DatagramPacket *p) { // FIXME: Deal with Multicast and if the socket is connected. union SockAddr u; @@ -233,7 +233,7 @@ java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); p->setAddress (new InetAddress (raddr, NULL)); p->setPort (rport); @@ -243,9 +243,9 @@ java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) error: DWORD dwErrorCode = WSAGetLastError (); if (dwErrorCode == WSAECONNRESET) - throw new PortUnreachableException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::PortUnreachableException (_Jv_WinStrError (dwErrorCode)); else if (dwErrorCode == WSAETIMEDOUT) - throw new java::net::SocketTimeoutException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::SocketTimeoutException (_Jv_WinStrError (dwErrorCode)); else _Jv_ThrowIOException (); @@ -255,7 +255,7 @@ error: // Close(shutdown) the socket. void -java::net::PlainDatagramSocketImpl::close () +gnu::java::net::PlainDatagramSocketImpl::close () { // Avoid races from asynchronous finalization. JvSynchronize sync (this); @@ -268,7 +268,7 @@ java::net::PlainDatagramSocketImpl::close () } void -java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *p) +gnu::java::net::PlainDatagramSocketImpl::send (::java::net::DatagramPacket *p) { // FIXME: Deal with Multicast and if the socket is connected. jint rport = p->getPort(); @@ -295,20 +295,20 @@ java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *p) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (::sendto (fnum, (char *) dbytes, p->getLength(), 0, ptr, len) >= 0) return; DWORD dwErrorCode = WSAGetLastError (); if (dwErrorCode == WSAECONNRESET) - throw new PortUnreachableException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::PortUnreachableException (_Jv_WinStrError (dwErrorCode)); _Jv_ThrowIOException (); } void -java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) +gnu::java::net::PlainDatagramSocketImpl::receive (::java::net::DatagramPacket *p) { // FIXME: Deal with Multicast and if the socket is connected. union SockAddr u; @@ -350,9 +350,9 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); - p->setAddress (new InetAddress (raddr, NULL)); + p->setAddress (new ::java::net::InetAddress (raddr, NULL)); p->setPort (rport); p->setLength ((jint) retlen); return; @@ -360,15 +360,15 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) error: DWORD dwErrorCode = WSAGetLastError(); if (dwErrorCode == WSAECONNRESET) - throw new PortUnreachableException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::PortUnreachableException (_Jv_WinStrError (dwErrorCode)); else if (dwErrorCode == WSAETIMEDOUT) - throw new java::net::SocketTimeoutException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::SocketTimeoutException (_Jv_WinStrError (dwErrorCode)); else - throw new java::io::IOException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::io::IOException (_Jv_WinStrError (dwErrorCode)); } void -java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl) +gnu::java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl) { // Assumes IPPROTO_IP rather than IPPROTO_IPV6 since socket created is IPv4. char val = (char) ttl; @@ -381,7 +381,7 @@ java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl) } jint -java::net::PlainDatagramSocketImpl::getTimeToLive () +gnu::java::net::PlainDatagramSocketImpl::getTimeToLive () { // Assumes IPPROTO_IP rather than IPPROTO_IPV6 since socket created is IPv4. char val; @@ -397,9 +397,9 @@ java::net::PlainDatagramSocketImpl::getTimeToLive () } void -java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr, - java::net::NetworkInterface *, - jboolean) +gnu::java::net::PlainDatagramSocketImpl::mcastGrp (::java::net::InetAddress *inetaddr, + ::java::net::NetworkInterface *, + jboolean join) { // FIXME: implement use of NetworkInterface jbyteArray haddress = inetaddr->addr; @@ -444,7 +444,7 @@ java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr, } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (::setsockopt (fnum, level, opname, ptr, len) == 0) return; @@ -453,25 +453,25 @@ java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr, } void -java::net::PlainDatagramSocketImpl::setOption (jint optID, - java::lang::Object *value) +gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID, + ::java::lang::Object *value) { int val; socklen_t val_len = sizeof (val); if (fnum < 0) - throw new java::net::SocketException (JvNewStringUTF ("Socket closed")); + throw new ::java::net::SocketException (JvNewStringUTF ("Socket closed")); - if (_Jv_IsInstanceOf (value, &java::lang::Boolean::class$)) + if (_Jv_IsInstanceOf (value, &::java::lang::Boolean::class$)) { - java::lang::Boolean *boolobj = - static_cast<java::lang::Boolean *> (value); + ::java::lang::Boolean *boolobj = + static_cast< ::java::lang::Boolean *> (value); val = boolobj->booleanValue() ? 1 : 0; } - else if (_Jv_IsInstanceOf (value, &java::lang::Integer::class$)) + else if (_Jv_IsInstanceOf (value, &::java::lang::Integer::class$)) { - java::lang::Integer *intobj = - static_cast<java::lang::Integer *> (value); + ::java::lang::Integer *intobj = + static_cast< ::java::lang::Integer *> (value); val = (int) intobj->intValue(); } // Else assume value to be an InetAddress for use with IP_MULTICAST_IF. @@ -479,15 +479,15 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, switch (optID) { case _Jv_TCP_NODELAY_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("TCP_NODELAY not valid for UDP")); return; case _Jv_SO_LINGER_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_LINGER not valid for UDP")); return; case _Jv_SO_KEEPALIVE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_KEEPALIVE not valid for UDP")); return; @@ -498,7 +498,7 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, break; case _Jv_SO_OOBINLINE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_OOBINLINE: not valid for UDP")); break; @@ -515,7 +515,7 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, goto error; return; case _Jv_SO_BINDADDR_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_BINDADDR: read only option")); return; case _Jv_IP_MULTICAST_IF_ : @@ -526,7 +526,7 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, int level, opname; const char *ptr; - haddress = ((java::net::InetAddress *) value)->addr; + haddress = ((::java::net::InetAddress *) value)->addr; bytes = elements (haddress); len = haddress->length; if (len == 4) @@ -550,19 +550,19 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, #endif else throw - new java::net::SocketException (JvNewStringUTF ("invalid length")); + new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (::setsockopt (fnum, level, opname, ptr, len) != 0) goto error; return; case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF2: not yet implemented")); break; case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_LOOP: not yet implemented")); break; @@ -583,8 +583,8 @@ java::net::PlainDatagramSocketImpl::setOption (jint optID, _Jv_ThrowSocketException (); } -java::lang::Object * -java::net::PlainDatagramSocketImpl::getOption (jint optID) +::java::lang::Object * +gnu::java::net::PlainDatagramSocketImpl::getOption (jint optID) { int val; socklen_t val_len = sizeof(val); @@ -594,15 +594,15 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) switch (optID) { case _Jv_TCP_NODELAY_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("TCP_NODELAY not valid for UDP")); break; case _Jv_SO_LINGER_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_LINGER not valid for UDP")); break; case _Jv_SO_KEEPALIVE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_KEEPALIVE not valid for UDP")); break; @@ -610,10 +610,10 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); case _Jv_SO_OOBINLINE_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_OOBINLINE not valid for UDP")); break; @@ -624,7 +624,7 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, opt, (char *) &val, &val_len) != 0) goto error; else - return new java::lang::Integer (val); + return new ::java::lang::Integer (val); break; case _Jv_SO_BINDADDR_: // cache the local address @@ -646,9 +646,9 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) } #endif else - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("invalid family")); - localAddress = new java::net::InetAddress (laddr, NULL); + localAddress = new ::java::net::InetAddress (laddr, NULL); } return localAddress; break; @@ -656,7 +656,7 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, SO_REUSEADDR, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); break; case _Jv_IP_MULTICAST_IF_ : struct in_addr inaddr; @@ -670,14 +670,14 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) bytes = inet_ntoa (inaddr); - return java::net::InetAddress::getByName (JvNewStringLatin1 (bytes)); + return ::java::net::InetAddress::getByName (JvNewStringLatin1 (bytes)); break; case _Jv_SO_TIMEOUT_ : - return new java::lang::Integer (timeout); - break; - + return new ::java::lang::Integer (timeout); + break; + case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF2: not yet implemented")); break; @@ -685,14 +685,14 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, IP_MULTICAST_LOOP, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); case _Jv_IP_TOS_ : if (::getsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Integer (val); - + return new ::java::lang::Integer (val); + default : WSASetLastError (WSAENOPROTOOPT); } diff --git a/libjava/gnu/java/net/natPlainSocketImplNoNet.cc b/libjava/gnu/java/net/natPlainSocketImplNoNet.cc new file mode 100644 index 0000000..7465d63 --- /dev/null +++ b/libjava/gnu/java/net/natPlainSocketImplNoNet.cc @@ -0,0 +1,128 @@ +/* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#include <config.h> +#include <platform.h> + +#include <gnu/java/net/PlainSocketImpl.h> +#include <java/io/IOException.h> +#include <java/net/BindException.h> +#include <java/net/ConnectException.h> +#include <java/net/SocketException.h> + +void +gnu::java::net::PlainSocketImpl::create (jboolean) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("SocketImpl.create: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *, jint) +{ + throw new ::java::net::BindException ( + JvNewStringLatin1 ("SocketImpl.bind: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::connect (::java::net::SocketAddress *, jint) +{ + throw new ::java::net::ConnectException ( + JvNewStringLatin1 ("SocketImpl.connect: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::listen (jint) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("SocketImpl.listen: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::accept (gnu::java::net::PlainSocketImpl *) +{ + throw new ::java::io::IOException ( + JvNewStringLatin1 ("SocketImpl.accept: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::setOption (jint, ::java::lang::Object *) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.setOption: unimplemented")); +} + +::java::lang::Object * +gnu::java::net::PlainSocketImpl::getOption (jint) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.getOption: unimplemented")); +} + +jint +gnu::java::net::PlainSocketImpl::read(void) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.read: unimplemented")); +} + +jint +gnu::java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.read: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::write(jint b) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.write: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.write: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::sendUrgentData(jint data) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.sendUrgentData: unimplemented")); +} + +jint +gnu::java::net::PlainSocketImpl::available(void) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.available: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::close(void) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.close: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::shutdownInput (void) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.shutdownInput: unimplemented")); +} + +void +gnu::java::net::PlainSocketImpl::shutdownOutput (void) +{ + throw new ::java::net::SocketException ( + JvNewStringLatin1 ("SocketImpl.shutdownOutput: unimplemented")); +} diff --git a/libjava/java/net/natPlainSocketImplPosix.cc b/libjava/gnu/java/net/natPlainSocketImplPosix.cc index f2a71b6..0b0bb1d 100644 --- a/libjava/java/net/natPlainSocketImplPosix.cc +++ b/libjava/gnu/java/net/natPlainSocketImplPosix.cc @@ -31,11 +31,11 @@ details. */ #include <gcj/cni.h> #include <gcj/javaprims.h> +#include <gnu/java/net/PlainSocketImpl.h> #include <java/io/IOException.h> #include <java/io/InterruptedIOException.h> #include <java/net/BindException.h> #include <java/net/ConnectException.h> -#include <java/net/PlainSocketImpl.h> #include <java/net/InetAddress.h> #include <java/net/InetSocketAddress.h> #include <java/net/SocketException.h> @@ -59,14 +59,14 @@ union SockAddr }; void -java::net::PlainSocketImpl::create (jboolean stream) +gnu::java::net::PlainSocketImpl::create (jboolean stream) { int sock = _Jv_socket (AF_INET, stream ? SOCK_STREAM : SOCK_DGRAM, 0); if (sock < 0) { char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } _Jv_platform_close_on_exec (sock); @@ -77,7 +77,7 @@ java::net::PlainSocketImpl::create (jboolean stream) } void -java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport) +gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lport) { union SockAddr u; struct sockaddr *ptr = (struct sockaddr *) &u.address; @@ -108,7 +108,7 @@ java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); // Enable SO_REUSEADDR, so that servers can reuse ports left in TIME_WAIT. ::setsockopt(fnum, SOL_SOCKET, SO_REUSEADDR, (char *) &i, sizeof(i)); @@ -130,15 +130,15 @@ java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport) error: char* strerr = strerror (errno); - throw new java::net::BindException (JvNewStringUTF (strerr)); + throw new ::java::net::BindException (JvNewStringUTF (strerr)); } void -java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, +gnu::java::net::PlainSocketImpl::connect (::java::net::SocketAddress *addr, jint timeout) { - java::net::InetSocketAddress *tmp = (java::net::InetSocketAddress*) addr; - java::net::InetAddress *host = tmp->getAddress(); + ::java::net::InetSocketAddress *tmp = (::java::net::InetSocketAddress*) addr; + ::java::net::InetAddress *host = tmp->getAddress(); jint rport = tmp->getPort(); union SockAddr u; @@ -164,7 +164,7 @@ java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (timeout > 0) { @@ -185,7 +185,7 @@ java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, if ((retval = _Jv_select (fnum + 1, &fset, &fset, NULL, &tv)) < 0) goto error; else if (retval == 0) - throw new java::net::SocketTimeoutException + throw new ::java::net::SocketTimeoutException (JvNewStringUTF ("Connect timed out")); // Set the socket back into a blocking state. ::fcntl (fnum, F_SETFL, flags); @@ -212,21 +212,21 @@ java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, error: char* strerr = strerror (errno); - throw new java::net::ConnectException (JvNewStringUTF (strerr)); + throw new ::java::net::ConnectException (JvNewStringUTF (strerr)); } void -java::net::PlainSocketImpl::listen (jint backlog) +gnu::java::net::PlainSocketImpl::listen (jint backlog) { if (::listen (fnum, backlog) != 0) { char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } } void -java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) +gnu::java::net::PlainSocketImpl::accept (gnu::java::net::PlainSocketImpl *s) { union SockAddr u; socklen_t addrlen = sizeof(u); @@ -245,7 +245,7 @@ java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) if ((retval = _Jv_select (fnum + 1, &fset, &fset, NULL, &tv)) < 0) goto error; else if (retval == 0) - throw new java::net::SocketTimeoutException ( + throw new ::java::net::SocketTimeoutException ( JvNewStringUTF("Accept timed out")); } @@ -273,22 +273,22 @@ java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); s->fnum = new_socket; s->localport = localport; - s->address = new InetAddress (raddr, NULL); + s->address = new ::java::net::InetAddress (raddr, NULL); s->port = rport; return; error: char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); + throw new ::java::io::IOException (JvNewStringUTF (strerr)); } // Close(shutdown) the socket. void -java::net::PlainSocketImpl::close() +gnu::java::net::PlainSocketImpl::close() { // Avoid races from asynchronous finalization. JvSynchronize sync (this); @@ -301,7 +301,7 @@ java::net::PlainSocketImpl::close() // These three errors are not errors according to tests performed // on the reference implementation. if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF) - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); + throw new ::java::io::IOException (JvNewStringUTF (strerror (errno))); } // Safe place to reset the file pointer. fnum = -1; @@ -310,7 +310,7 @@ java::net::PlainSocketImpl::close() // Write a byte to the socket. void -java::net::PlainSocketImpl::write(jint b) +gnu::java::net::PlainSocketImpl::write(jint b) { jbyte d =(jbyte) b; int r = 0; @@ -320,17 +320,17 @@ java::net::PlainSocketImpl::write(jint b) r = _Jv_write (fnum, &d, 1); if (r == -1) { - if (java::lang::Thread::interrupted()) + if (::java::lang::Thread::interrupted()) { - java::io::InterruptedIOException *iioe - = new java::io::InterruptedIOException + ::java::io::InterruptedIOException *iioe + = new ::java::io::InterruptedIOException (JvNewStringLatin1 (strerror (errno))); iioe->bytesTransferred = 0; throw iioe; } // Some errors should not cause exceptions. if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF) - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); + throw new ::java::io::IOException (JvNewStringUTF (strerror (errno))); break; } } @@ -338,12 +338,12 @@ java::net::PlainSocketImpl::write(jint b) // Write some bytes to the socket. void -java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) +gnu::java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) { if (! b) - throw new java::lang::NullPointerException; + throw new ::java::lang::NullPointerException; if (offset < 0 || len < 0 || offset + len > JvGetArrayLength (b)) - throw new java::lang::ArrayIndexOutOfBoundsException; + throw new ::java::lang::ArrayIndexOutOfBoundsException; jbyte *bytes = elements (b) + offset; int written = 0; @@ -354,17 +354,17 @@ java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) if (r == -1) { - if (java::lang::Thread::interrupted()) + if (::java::lang::Thread::interrupted()) { - java::io::InterruptedIOException *iioe - = new java::io::InterruptedIOException + ::java::io::InterruptedIOException *iioe + = new ::java::io::InterruptedIOException (JvNewStringLatin1 (strerror (errno))); iioe->bytesTransferred = written; throw iioe; } // Some errors should not cause exceptions. if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF) - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); + throw new ::java::io::IOException (JvNewStringUTF (strerror (errno))); break; } @@ -375,15 +375,15 @@ java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) } void -java::net::PlainSocketImpl::sendUrgentData (jint) +gnu::java::net::PlainSocketImpl::sendUrgentData (jint) { - throw new SocketException (JvNewStringLatin1 ( + throw new ::java::net::SocketException (JvNewStringLatin1 ( "PlainSocketImpl: sending of urgent data not supported by this socket")); } // Read a single byte from the socket. jint -java::net::PlainSocketImpl::read(void) +gnu::java::net::PlainSocketImpl::read(void) { jbyte b; @@ -404,7 +404,7 @@ java::net::PlainSocketImpl::read(void) // If select returns 0 we've waited without getting data... // that means we've timed out. if (sel_retval == 0) - throw new java::net::SocketTimeoutException + throw new ::java::net::SocketTimeoutException (JvNewStringUTF ("read timed out") ); // If select returns ok we know we either got signalled or read some data... // either way we need to try to read. @@ -415,10 +415,10 @@ java::net::PlainSocketImpl::read(void) if (r == 0) return -1; - if (java::lang::Thread::interrupted()) + if (::java::lang::Thread::interrupted()) { - java::io::InterruptedIOException *iioe = - new java::io::InterruptedIOException + ::java::io::InterruptedIOException *iioe = + new ::java::io::InterruptedIOException (JvNewStringUTF("read interrupted")); iioe->bytesTransferred = r == -1 ? 0 : r; throw iioe; @@ -430,7 +430,7 @@ java::net::PlainSocketImpl::read(void) return -1; // Other errors need to be signalled. - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); + throw new ::java::io::IOException (JvNewStringUTF (strerror (errno))); } return b & 0xFF; @@ -438,15 +438,15 @@ java::net::PlainSocketImpl::read(void) // Read count bytes into the buffer, starting at offset. jint -java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) +gnu::java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) { if (! buffer) - throw new java::lang::NullPointerException; + throw new ::java::lang::NullPointerException; jsize bsize = JvGetArrayLength (buffer); if (offset < 0 || count < 0 || offset + count > bsize) - throw new java::lang::ArrayIndexOutOfBoundsException; + throw new ::java::lang::ArrayIndexOutOfBoundsException; jbyte *bytes = elements (buffer) + offset; @@ -469,10 +469,10 @@ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) // the socket to see what happened. if (sel_retval == 0) { - java::net::SocketTimeoutException *timeoutException = - new java::net::SocketTimeoutException + ::java::net::SocketTimeoutException *timeoutException = + new ::java::net::SocketTimeoutException (JvNewStringUTF ("read timed out")); - throw timeoutException; + throw timeoutException; } } @@ -482,10 +482,10 @@ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) if (r == 0) return -1; - if (java::lang::Thread::interrupted()) + if (::java::lang::Thread::interrupted()) { - java::io::InterruptedIOException *iioe = - new java::io::InterruptedIOException + ::java::io::InterruptedIOException *iioe = + new ::java::io::InterruptedIOException (JvNewStringUTF ("read interrupted")); iioe->bytesTransferred = r == -1 ? 0 : r; throw iioe; @@ -497,7 +497,7 @@ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) return -1; // Other errors need to be signalled. - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); + throw new ::java::io::IOException (JvNewStringUTF (strerror (errno))); } return r; @@ -505,7 +505,7 @@ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) // How many bytes are available? jint -java::net::PlainSocketImpl::available(void) +gnu::java::net::PlainSocketImpl::available(void) { #if defined(FIONREAD) || defined(HAVE_SELECT) long num = 0; @@ -534,7 +534,7 @@ java::net::PlainSocketImpl::available(void) if (r == -1) { posix_error: - throw new java::io::IOException(JvNewStringUTF(strerror(errno))); + throw new ::java::io::IOException(JvNewStringUTF(strerror(errno))); } // If we didn't get anything we can use select. @@ -558,23 +558,23 @@ java::net::PlainSocketImpl::available(void) return (jint) num; #else - throw new java::io::IOException (JvNewStringUTF ("unimplemented")); + throw new ::java::io::IOException (JvNewStringUTF ("unimplemented")); #endif } void -java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) +gnu::java::net::PlainSocketImpl::setOption (jint optID, ::java::lang::Object *value) { int val; socklen_t val_len = sizeof (val); if (fnum < 0) - throw new java::net::SocketException (JvNewStringUTF ("Socket closed")); + throw new ::java::net::SocketException (JvNewStringUTF ("Socket closed")); - if (_Jv_IsInstanceOf (value, &java::lang::Boolean::class$)) + if (_Jv_IsInstanceOf (value, &::java::lang::Boolean::class$)) { - java::lang::Boolean *boolobj = - static_cast<java::lang::Boolean *> (value); + ::java::lang::Boolean *boolobj = + static_cast< ::java::lang::Boolean *> (value); if (boolobj->booleanValue()) val = 1; else @@ -585,15 +585,15 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) val = 0; } } - else if (_Jv_IsInstanceOf (value, &java::lang::Integer::class$)) + else if (_Jv_IsInstanceOf (value, &::java::lang::Integer::class$)) { - java::lang::Integer *intobj = - static_cast<java::lang::Integer *> (value); + ::java::lang::Integer *intobj = + static_cast< ::java::lang::Integer *> (value); val = (int) intobj->intValue(); } else { - throw new java::lang::IllegalArgumentException ( + throw new ::java::lang::IllegalArgumentException ( JvNewStringLatin1 ("`value' must be Boolean or Integer")); } @@ -605,7 +605,7 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) val_len) != 0) goto error; #else - throw new java::lang::InternalError + throw new ::java::lang::InternalError (JvNewStringUTF ("TCP_NODELAY not supported")); #endif /* TCP_NODELAY */ return; @@ -617,7 +617,7 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) break; case _Jv_SO_BROADCAST_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("SO_BROADCAST not valid for TCP")); break; @@ -637,7 +637,7 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) sizeof(l_val)) != 0) goto error; #else - throw new java::lang::InternalError ( + throw new ::java::lang::InternalError ( JvNewStringUTF ("SO_LINGER not supported")); #endif /* SO_LINGER */ return; @@ -650,28 +650,28 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) if (::setsockopt (fnum, SOL_SOCKET, opt, (char *) &val, val_len) != 0) goto error; #else - throw new java::lang::InternalError ( + throw new ::java::lang::InternalError ( JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); #endif return; case _Jv_SO_BINDADDR_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_BINDADDR: read only option")); return; case _Jv_IP_MULTICAST_IF_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP")); return; case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP")); break; case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP")); break; @@ -682,7 +682,7 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) break; case _Jv_SO_REUSEADDR_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_REUSEADDR: not valid for TCP")); return; @@ -696,11 +696,11 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) error: char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); + throw new ::java::net::SocketException (JvNewStringUTF (strerr)); } -java::lang::Object * -java::net::PlainSocketImpl::getOption (jint optID) +::java::lang::Object * +gnu::java::net::PlainSocketImpl::getOption (jint optID) { int val; socklen_t val_len = sizeof(val); @@ -717,9 +717,9 @@ java::net::PlainSocketImpl::getOption (jint optID) &val_len) != 0) goto error; else - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); #else - throw new java::lang::InternalError + throw new ::java::lang::InternalError (JvNewStringUTF ("TCP_NODELAY not supported")); #endif break; @@ -731,11 +731,11 @@ java::net::PlainSocketImpl::getOption (jint optID) goto error; if (l_val.l_onoff) - return new java::lang::Integer (l_val.l_linger); + return new ::java::lang::Integer (l_val.l_linger); else - return new java::lang::Boolean ((jboolean)false); + return new ::java::lang::Boolean ((jboolean)false); #else - throw new java::lang::InternalError + throw new ::java::lang::InternalError (JvNewStringUTF ("SO_LINGER not supported")); #endif break; @@ -745,19 +745,19 @@ java::net::PlainSocketImpl::getOption (jint optID) &val_len) != 0) goto error; else - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); case _Jv_SO_BROADCAST_ : if (::getsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean ((jboolean)val); + return new ::java::lang::Boolean ((jboolean)val); case _Jv_SO_OOBINLINE_ : if (::getsockopt (fnum, SOL_SOCKET, SO_OOBINLINE, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Boolean ((jboolean)val); + return new ::java::lang::Boolean ((jboolean)val); case _Jv_SO_RCVBUF_ : case _Jv_SO_SNDBUF_ : @@ -767,9 +767,9 @@ java::net::PlainSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, opt, (char *) &val, &val_len) != 0) goto error; else - return new java::lang::Integer (val); + return new ::java::lang::Integer (val); #else - throw new java::lang::InternalError + throw new ::java::lang::InternalError (JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); #endif break; @@ -795,25 +795,25 @@ java::net::PlainSocketImpl::getOption (jint optID) } #endif else - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); - localAddress = new java::net::InetAddress (laddr, NULL); + localAddress = new ::java::net::InetAddress (laddr, NULL); } return localAddress; break; case _Jv_IP_MULTICAST_IF_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP")); break; case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP")); break; case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP")); break; @@ -821,16 +821,16 @@ java::net::PlainSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, &val_len) != 0) goto error; - return new java::lang::Integer (val); + return new ::java::lang::Integer (val); break; case _Jv_SO_REUSEADDR_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("SO_REUSEADDR: not valid for TCP")); break; case _Jv_SO_TIMEOUT_ : - return new java::lang::Integer (timeout); + return new ::java::lang::Integer (timeout); break; default : @@ -839,19 +839,19 @@ java::net::PlainSocketImpl::getOption (jint optID) error: char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); + throw new ::java::net::SocketException (JvNewStringUTF (strerr)); } void -java::net::PlainSocketImpl::shutdownInput (void) +gnu::java::net::PlainSocketImpl::shutdownInput (void) { if (::shutdown (fnum, 0)) - throw new SocketException (JvNewStringUTF (strerror (errno))); + throw new ::java::net::SocketException (JvNewStringUTF (strerror (errno))); } void -java::net::PlainSocketImpl::shutdownOutput (void) +gnu::java::net::PlainSocketImpl::shutdownOutput (void) { if (::shutdown (fnum, 1)) - throw new SocketException (JvNewStringUTF (strerror (errno))); + throw new ::java::net::SocketException (JvNewStringUTF (strerror (errno))); } diff --git a/libjava/java/net/natPlainSocketImplWin32.cc b/libjava/gnu/java/net/natPlainSocketImplWin32.cc index d43ad23..e4837ed 100644 --- a/libjava/java/net/natPlainSocketImplWin32.cc +++ b/libjava/gnu/java/net/natPlainSocketImplWin32.cc @@ -13,11 +13,11 @@ details. */ #undef MAX_PRIORITY #undef MIN_PRIORITY +#include <gnu/java/net/PlainSocketImpl.h> #include <java/io/IOException.h> #include <java/io/InterruptedIOException.h> #include <java/net/BindException.h> #include <java/net/ConnectException.h> -#include <java/net/PlainSocketImpl.h> #include <java/net/InetAddress.h> #include <java/net/InetSocketAddress.h> #include <java/net/SocketException.h> @@ -41,7 +41,7 @@ union SockAddr }; void -java::net::PlainSocketImpl::create (jboolean stream) +gnu::java::net::PlainSocketImpl::create (jboolean stream) { int sock = ::socket (AF_INET, stream ? SOCK_STREAM : SOCK_DGRAM, 0); @@ -58,7 +58,7 @@ java::net::PlainSocketImpl::create (jboolean stream) } void -java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport) +gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lport) { union SockAddr u; struct sockaddr *ptr = (struct sockaddr *) &u.address; @@ -89,7 +89,7 @@ java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); // Enable SO_REUSEADDR, so that servers can reuse ports left in TIME_WAIT. ::setsockopt(fnum, SOL_SOCKET, SO_REUSEADDR, (char *) &i, sizeof(i)); @@ -111,13 +111,13 @@ java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport) error: DWORD dwErrorCode = WSAGetLastError (); - throw new java::net::BindException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::BindException (_Jv_WinStrError (dwErrorCode)); } static void throwConnectException (DWORD dwErrorCode) { - throw new java::net::ConnectException (_Jv_WinStrError (dwErrorCode)); + throw new ::java::net::ConnectException (_Jv_WinStrError (dwErrorCode)); } static void @@ -127,11 +127,11 @@ throwConnectException () } void -java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, +gnu::java::net::PlainSocketImpl::connect (::java::net::SocketAddress *addr, jint timeout) { - java::net::InetSocketAddress *tmp = (java::net::InetSocketAddress*) addr; - java::net::InetAddress *host = tmp->getAddress(); + ::java::net::InetSocketAddress *tmp = (::java::net::InetSocketAddress*) addr; + ::java::net::InetAddress *host = tmp->getAddress(); jint rport = tmp->getPort(); union SockAddr u; @@ -158,7 +158,7 @@ java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid length")); if (timeout > 0) { @@ -180,7 +180,7 @@ java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, throwConnectException (); else if (dwRet == WSA_WAIT_TIMEOUT) - throw new java::net::SocketTimeoutException + throw new ::java::net::SocketTimeoutException (JvNewStringUTF ("connect timed out")); // If we get here, we still need to check whether the actual @@ -219,7 +219,7 @@ java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, } void -java::net::PlainSocketImpl::listen (jint backlog) +gnu::java::net::PlainSocketImpl::listen (jint backlog) { if (::listen (fnum, backlog) == SOCKET_ERROR) { @@ -228,7 +228,7 @@ java::net::PlainSocketImpl::listen (jint backlog) } void -java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) +gnu::java::net::PlainSocketImpl::accept (::java::net::PlainSocketImpl *s) { union SockAddr u; socklen_t addrlen = sizeof(u); @@ -277,7 +277,7 @@ java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) if (dwRet == WSA_WAIT_FAILED) goto error; else if (dwRet == WSA_WAIT_TIMEOUT) - throw new java::net::SocketTimeoutException + throw new ::java::net::SocketTimeoutException (JvNewStringUTF ("accept timed out")); } } @@ -308,7 +308,7 @@ java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) } #endif else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); s->fnum = new_socket; s->localport = localport; @@ -322,7 +322,7 @@ java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) // Close(shutdown) the socket. void -java::net::PlainSocketImpl::close() +gnu::java::net::PlainSocketImpl::close() { // Avoid races from asynchronous finalization. JvSynchronize sync (this); @@ -346,7 +346,7 @@ java::net::PlainSocketImpl::close() // Write a byte to the socket. void -java::net::PlainSocketImpl::write(jint b) +gnu::java::net::PlainSocketImpl::write(jint b) { jbyte d =(jbyte) b; int r = 0; @@ -357,10 +357,10 @@ java::net::PlainSocketImpl::write(jint b) if (r == -1) { DWORD dwErr = WSAGetLastError(); - if (java::lang::Thread::interrupted()) + if (::java::lang::Thread::interrupted()) { - java::io::InterruptedIOException *iioe - = new java::io::InterruptedIOException + ::java::io::InterruptedIOException *iioe + = new ::java::io::InterruptedIOException (_Jv_WinStrError (dwErr)); iioe->bytesTransferred = 0; throw iioe; @@ -376,12 +376,12 @@ java::net::PlainSocketImpl::write(jint b) // Write some bytes to the socket. void -java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) +gnu::java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) { if (! b) - throw new java::lang::NullPointerException; + throw new ::java::lang::NullPointerException; if (offset < 0 || len < 0 || offset + len > JvGetArrayLength (b)) - throw new java::lang::ArrayIndexOutOfBoundsException; + throw new ::java::lang::ArrayIndexOutOfBoundsException; jbyte *bytes = elements (b) + offset; int written = 0; @@ -392,10 +392,10 @@ java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) if (r == -1) { DWORD dwErr = WSAGetLastError(); - if (java::lang::Thread::interrupted()) + if (::java::lang::Thread::interrupted()) { - java::io::InterruptedIOException *iioe - = new java::io::InterruptedIOException + ::java::io::InterruptedIOException *iioe + = new ::java::io::InterruptedIOException (_Jv_WinStrError (dwErr)); iioe->bytesTransferred = written; throw iioe; @@ -414,9 +414,9 @@ java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) } void -java::net::PlainSocketImpl::sendUrgentData (jint) +gnu::java::net::PlainSocketImpl::sendUrgentData (jint) { - throw new SocketException (JvNewStringLatin1 ( + throw new ::java::net::SocketException (JvNewStringLatin1 ( "PlainSocketImpl: sending of urgent data not supported by this socket")); } @@ -451,10 +451,10 @@ doRead(int fnum, void* buf, int count, int timeout) dwErrorCode = WSAGetLastError (); // save WSAGetLastError() before calling Thread.interrupted() - if (java::lang::Thread::interrupted()) + if (::java::lang::Thread::interrupted()) { - java::io::InterruptedIOException *iioe = - new java::io::InterruptedIOException + ::java::io::InterruptedIOException *iioe = + new ::java::io::InterruptedIOException (JvNewStringUTF("read interrupted")); iioe->bytesTransferred = r == -1 ? 0 : r; throw iioe; @@ -468,7 +468,7 @@ error: // Other errors need to be signalled. if (dwErrorCode == WSAETIMEDOUT) - throw new java::net::SocketTimeoutException + throw new ::java::net::SocketTimeoutException (JvNewStringUTF ("read timed out") ); else _Jv_ThrowIOException (dwErrorCode); @@ -479,7 +479,7 @@ error: // Read a single byte from the socket. jint -java::net::PlainSocketImpl::read(void) +gnu::java::net::PlainSocketImpl::read(void) { jbyte b; doRead(fnum, &b, 1, timeout); @@ -488,15 +488,15 @@ java::net::PlainSocketImpl::read(void) // Read count bytes into the buffer, starting at offset. jint -java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) +gnu::java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) { if (! buffer) - throw new java::lang::NullPointerException; + throw new ::java::lang::NullPointerException; jsize bsize = JvGetArrayLength (buffer); if (offset < 0 || count < 0 || offset + count > bsize) - throw new java::lang::ArrayIndexOutOfBoundsException; + throw new ::java::lang::ArrayIndexOutOfBoundsException; jbyte *bytes = elements (buffer) + offset; @@ -506,7 +506,7 @@ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) // How many bytes are available? jint -java::net::PlainSocketImpl::available(void) +gnu::java::net::PlainSocketImpl::available(void) { unsigned long num = 0; @@ -517,18 +517,18 @@ java::net::PlainSocketImpl::available(void) } void -java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) +gnu::java::net::PlainSocketImpl::setOption (jint optID, ::java::lang::Object *value) { int val; socklen_t val_len = sizeof (val); if (fnum < 0) - throw new java::net::SocketException (JvNewStringUTF ("Socket closed")); + throw new ::java::net::SocketException (JvNewStringUTF ("Socket closed")); - if (_Jv_IsInstanceOf (value, &java::lang::Boolean::class$)) + if (_Jv_IsInstanceOf (value, &::java::lang::Boolean::class$)) { - java::lang::Boolean *boolobj = - static_cast<java::lang::Boolean *> (value); + ::java::lang::Boolean *boolobj = + static_cast< ::java::lang::Boolean *> (value); if (boolobj->booleanValue()) val = 1; else @@ -539,15 +539,15 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) val = 0; } } - else if (_Jv_IsInstanceOf (value, &java::lang::Integer::class$)) + else if (_Jv_IsInstanceOf (value, &::java::lang::Integer::class$)) { - java::lang::Integer *intobj = - static_cast<java::lang::Integer *> (value); + ::java::lang::Integer *intobj = + static_cast< ::java::lang::Integer *> (value); val = (int) intobj->intValue(); } else { - throw new java::lang::IllegalArgumentException ( + throw new ::java::lang::IllegalArgumentException ( JvNewStringLatin1 ("`value' must be Boolean or Integer")); } @@ -566,7 +566,7 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) break; case _Jv_SO_BROADCAST_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("SO_BROADCAST not valid for TCP")); break; @@ -596,22 +596,22 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) return; case _Jv_SO_BINDADDR_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_BINDADDR: read only option")); return; case _Jv_IP_MULTICAST_IF_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP")); return; case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP")); break; case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP")); break; @@ -622,7 +622,7 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) break; case _Jv_SO_REUSEADDR_ : - throw new java::net::SocketException ( + throw new ::java::net::SocketException ( JvNewStringUTF ("SO_REUSEADDR: not valid for TCP")); return; @@ -638,8 +638,8 @@ error: _Jv_ThrowSocketException (); } -java::lang::Object * -java::net::PlainSocketImpl::getOption (jint optID) +::java::lang::Object * +gnu::java::net::PlainSocketImpl::getOption (jint optID) { int val; socklen_t val_len = sizeof(val); @@ -655,7 +655,7 @@ java::net::PlainSocketImpl::getOption (jint optID) &val_len) == SOCKET_ERROR) goto error; else - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); break; case _Jv_SO_LINGER_ : @@ -664,9 +664,9 @@ java::net::PlainSocketImpl::getOption (jint optID) goto error; if (l_val.l_onoff) - return new java::lang::Integer (l_val.l_linger); + return new ::java::lang::Integer (l_val.l_linger); else - return new java::lang::Boolean ((jboolean)false); + return new ::java::lang::Boolean ((jboolean)false); break; case _Jv_SO_KEEPALIVE_ : @@ -674,19 +674,19 @@ java::net::PlainSocketImpl::getOption (jint optID) &val_len) == SOCKET_ERROR) goto error; else - return new java::lang::Boolean (val != 0); + return new ::java::lang::Boolean (val != 0); case _Jv_SO_BROADCAST_ : if (::getsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &val, &val_len) == SOCKET_ERROR) goto error; - return new java::lang::Boolean ((jboolean)val); + return new ::java::lang::Boolean ((jboolean)val); case _Jv_SO_OOBINLINE_ : if (::getsockopt (fnum, SOL_SOCKET, SO_OOBINLINE, (char *) &val, &val_len) == SOCKET_ERROR) goto error; - return new java::lang::Boolean ((jboolean)val); + return new ::java::lang::Boolean ((jboolean)val); case _Jv_SO_RCVBUF_ : case _Jv_SO_SNDBUF_ : @@ -696,7 +696,7 @@ java::net::PlainSocketImpl::getOption (jint optID) &val_len) == SOCKET_ERROR) goto error; else - return new java::lang::Integer (val); + return new ::java::lang::Integer (val); break; case _Jv_SO_BINDADDR_: // cache the local address @@ -721,25 +721,25 @@ java::net::PlainSocketImpl::getOption (jint optID) } #endif else - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("invalid family")); - localAddress = new java::net::InetAddress (laddr, NULL); + localAddress = new ::java::net::InetAddress (laddr, NULL); } return localAddress; break; case _Jv_IP_MULTICAST_IF_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP")); break; case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP")); break; case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP")); break; @@ -747,16 +747,16 @@ java::net::PlainSocketImpl::getOption (jint optID) if (::getsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, &val_len) == SOCKET_ERROR) goto error; - return new java::lang::Integer (val); + return new ::java::lang::Integer (val); break; case _Jv_SO_REUSEADDR_ : - throw new java::net::SocketException + throw new ::java::net::SocketException (JvNewStringUTF ("SO_REUSEADDR: not valid for TCP")); break; case _Jv_SO_TIMEOUT_ : - return new java::lang::Integer (timeout); + return new ::java::lang::Integer (timeout); break; default : @@ -770,14 +770,14 @@ error: } void -java::net::PlainSocketImpl::shutdownInput (void) +gnu::java::net::PlainSocketImpl::shutdownInput (void) { if (::shutdown (fnum, 0)) _Jv_ThrowSocketException (); } void -java::net::PlainSocketImpl::shutdownOutput (void) +gnu::java::net::PlainSocketImpl::shutdownOutput (void) { if (::shutdown (fnum, 1)) _Jv_ThrowSocketException (); diff --git a/libjava/java/net/DatagramSocket.java b/libjava/java/net/DatagramSocket.java index 57f3da7..401bcb8 100644 --- a/libjava/java/net/DatagramSocket.java +++ b/libjava/java/net/DatagramSocket.java @@ -35,8 +35,10 @@ 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.net; +import gnu.java.net.PlainDatagramSocketImpl; import java.io.IOException; import java.nio.channels.DatagramChannel; import java.nio.channels.IllegalBlockingModeException; @@ -266,38 +268,30 @@ public class DatagramSocket */ public InetAddress getLocalAddress() { - // FIXME: JCL p. 510 says this should call checkConnect. But what - // string should be used as the hostname? Maybe this is just a side - // effect of calling InetAddress.getLocalHost. - // - // And is getOption with SO_BINDADDR the right way to get the address? - // Doesn't seem to be since this method doesn't throw a SocketException - // and SO_BINADDR can throw one. - // - // Also see RETURNS section in JCL p. 510 about returning any local - // addr "if the current execution context is not allowed to connect to - // the network interface that is actually bound to this datagram socket." - // How is that done? via InetAddress.getLocalHost? But that throws - // an UnknownHostException and this method doesn't. - // - // if (s != null) - // s.checkConnect("localhost", -1); + if (impl == null + || closed) + return null; + + InetAddress result; + try { - return (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR); - } - catch (SocketException ex) - { - } + result = (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR); - try + SecurityManager s = System.getSecurityManager(); + if (s != null) + s.checkConnect (result.getHostName(), -1); + } + catch (SecurityException e) { - return InetAddress.getLocalHost(); + result = InetAddress.ANY_IF; } - catch (UnknownHostException ex) + catch (SocketException e) { - return null; + result = InetAddress.ANY_IF; } + + return result; } /** diff --git a/libjava/java/net/MulticastSocket.java b/libjava/java/net/MulticastSocket.java index 1b7b422..cedd9c6 100644 --- a/libjava/java/net/MulticastSocket.java +++ b/libjava/java/net/MulticastSocket.java @@ -36,8 +36,10 @@ 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.net; +import gnu.java.net.PlainDatagramSocketImpl; import java.io.IOException; import java.util.Enumeration; diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java index 3614354..4e6d709 100644 --- a/libjava/java/net/ServerSocket.java +++ b/libjava/java/net/ServerSocket.java @@ -1,5 +1,5 @@ /* ServerSocket.java -- Class for implementing server side sockets - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,8 +35,10 @@ 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.net; +import gnu.java.net.PlainSocketImpl; import java.io.IOException; import java.nio.channels.IllegalBlockingModeException; import java.nio.channels.ServerSocketChannel; diff --git a/libjava/java/net/Socket.java b/libjava/java/net/Socket.java index c261516..90dfac2 100644 --- a/libjava/java/net/Socket.java +++ b/libjava/java/net/Socket.java @@ -1,5 +1,5 @@ /* Socket.java -- Client socket implementation - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,8 +35,10 @@ 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.net; +import gnu.java.net.PlainSocketImpl; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; diff --git a/libjava/java/net/natPlainDatagramSocketImplNoNet.cc b/libjava/java/net/natPlainDatagramSocketImplNoNet.cc deleted file mode 100644 index a2a08d7..0000000 --- a/libjava/java/net/natPlainDatagramSocketImplNoNet.cc +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (C) 2003 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include <config.h> -#include <platform.h> - -#include <java/io/IOException.h> -#include <java/lang/Object.h> -#include <java/net/BindException.h> -#include <java/net/DatagramPacket.h> -#include <java/net/InetAddress.h> -#include <java/net/NetworkInterface.h> -#include <java/net/PlainDatagramSocketImpl.h> -#include <java/net/SocketException.h> - -void -java::net::PlainDatagramSocketImpl::create () -{ - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.create: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::bind (jint, java::net::InetAddress *) -{ - throw new BindException ( - JvNewStringLatin1 ("DatagramSocketImpl.bind: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::connect (java::net::InetAddress *, jint) -{ - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.connect: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::disconnect () -{ - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.disconnect: unimplemented")); -} - -jint -java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.peek: unimplemented")); -} - -jint -java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.peekData: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::close () -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.close: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.send: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.receive: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::setTimeToLive (jint) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.setTimeToLive: unimplemented")); -} - -jint -java::net::PlainDatagramSocketImpl::getTimeToLive () -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.getTimeToLive: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *, - java::net::NetworkInterface *, - jboolean) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.mcastGrp: unimplemented")); -} - -void -java::net::PlainDatagramSocketImpl::setOption (jint, java::lang::Object *) -{ - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.setOption: unimplemented")); -} - -java::lang::Object * -java::net::PlainDatagramSocketImpl::getOption (jint) -{ - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.getOption: unimplemented")); -} diff --git a/libjava/java/net/natPlainSocketImplNoNet.cc b/libjava/java/net/natPlainSocketImplNoNet.cc deleted file mode 100644 index e65438e..0000000 --- a/libjava/java/net/natPlainSocketImplNoNet.cc +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) 2003 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include <config.h> -#include <platform.h> - -#include <java/io/IOException.h> -#include <java/net/BindException.h> -#include <java/net/ConnectException.h> -#include <java/net/PlainSocketImpl.h> -#include <java/net/SocketException.h> - -void -java::net::PlainSocketImpl::create (jboolean) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("SocketImpl.create: unimplemented")); -} - -void -java::net::PlainSocketImpl::bind (java::net::InetAddress *, jint) -{ - throw new BindException ( - JvNewStringLatin1 ("SocketImpl.bind: unimplemented")); -} - -void -java::net::PlainSocketImpl::connect (java::net::SocketAddress *, jint) -{ - throw new ConnectException ( - JvNewStringLatin1 ("SocketImpl.connect: unimplemented")); -} - -void -java::net::PlainSocketImpl::listen (jint) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("SocketImpl.listen: unimplemented")); -} - -void -java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *) -{ - throw new java::io::IOException ( - JvNewStringLatin1 ("SocketImpl.accept: unimplemented")); -} - -void -java::net::PlainSocketImpl::setOption (jint, java::lang::Object *) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.setOption: unimplemented")); -} - -java::lang::Object * -java::net::PlainSocketImpl::getOption (jint) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.getOption: unimplemented")); -} - -jint -java::net::PlainSocketImpl::read(void) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.read: unimplemented")); -} - -jint -java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.read: unimplemented")); -} - -void -java::net::PlainSocketImpl::write(jint b) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.write: unimplemented")); -} - -void -java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.write: unimplemented")); -} - -void -java::net::PlainSocketImpl::sendUrgentData(jint data) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.sendUrgentData: unimplemented")); -} - -jint -java::net::PlainSocketImpl::available(void) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.available: unimplemented")); -} - -void -java::net::PlainSocketImpl::close(void) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.close: unimplemented")); -} - -void -java::net::PlainSocketImpl::shutdownInput (void) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.shutdownInput: unimplemented")); -} - -void -java::net::PlainSocketImpl::shutdownOutput (void) -{ - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.shutdownOutput: unimplemented")); -} |