[kaffe] CVS kaffe (dalibor): Added a check for broken SO_RCVTIMEO
Kaffe CVS
cvs-commits at kaffe.org
Wed Aug 18 13:59:10 PDT 2004
PatchSet 5080
Date: 2004/08/18 20:55:12
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Added a check for broken SO_RCVTIMEO
2004-08-18 Dalibor Topic <robilad at kaffe.org>,
Guilhem Lavaux <guilhem at kaffe.org>
* configure.ac: Added a check for broken
SO_RCVTIMEO.
* configure,
config/config.h.in:
Regenerated.
Members:
ChangeLog:1.2638->1.2639
configure:1.371->1.372
configure.ac:1.69->1.70
config/config.h.in:1.121->1.122
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2638 kaffe/ChangeLog:1.2639
--- kaffe/ChangeLog:1.2638 Wed Aug 18 19:58:26 2004
+++ kaffe/ChangeLog Wed Aug 18 20:55:12 2004
@@ -1,3 +1,13 @@
+2004-08-18 Dalibor Topic <robilad at kaffe.org>,
+ Guilhem Lavaux <guilhem at kaffe.org>
+
+ * configure.ac: Added a check for broken
+ SO_RCVTIMEO.
+
+ * configure,
+ config/config.h.in:
+ Regenerated.
+
2004-08-18 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/net/URI.java:
Index: kaffe/configure
diff -u kaffe/configure:1.371 kaffe/configure:1.372
--- kaffe/configure:1.371 Sun Aug 15 20:02:12 2004
+++ kaffe/configure Wed Aug 18 20:55:13 2004
@@ -50228,6 +50228,84 @@
fi
+echo "$as_me:$LINENO: checking whether setsockopt(SO_RCVTIMEO) is broken" >&5
+echo $ECHO_N "checking whether setsockopt(SO_RCVTIMEO) is broken... $ECHO_C" >&6
+if test "${ac_cv_so_rcvtimeo_broken+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_so_rcvtimeo_broken=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if defined(HAVE_SYS_TYPES_H)
+#include <sys/types.h>
+#endif
+
+#if defined(HAVE_SYS_SOCKET_H)
+#include <sys/socket.h>
+#endif
+
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+
+int main(void) {
+ int fd;
+ int ret;
+ struct timeval new_tv;
+
+ /* Open the socket (INET/TCP).*/
+ fd = socket(AF_INET, SOCK_STREAM, 0);
+
+ /* set the timeout for the incoming queue */
+ /* 1 second for example */
+ new_tv.tv_sec = 1;
+ new_tv.tv_usec = 0;
+
+ ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &new_tv, sizeof(new_tv));
+ return ret;
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_so_rcvtimeo_broken=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_so_rcvtimeo_broken=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_so_rcvtimeo_broken" >&5
+echo "${ECHO_T}$ac_cv_so_rcvtimeo_broken" >&6
+if test x"$ac_cv_sr_rcvtimeo_broken" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BROKEN_SO_RCVTIMEO 1
+_ACEOF
+
+fi
+
# Check whether --enable-gtk-cairo or --disable-gtk-cairo was given.
if test "${enable_gtk_cairo+set}" = set; then
enableval="$enable_gtk_cairo"
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.69 kaffe/configure.ac:1.70
--- kaffe/configure.ac:1.69 Sun Aug 15 20:02:22 2004
+++ kaffe/configure.ac Wed Aug 18 20:55:17 2004
@@ -1465,6 +1465,45 @@
AC_DEFINE(HAVE_DECLARED_SWAB, 1, [Is function swab declared])
fi
+dnl =========================================================
+dnl Test whether SO_RCVTIMEO is broken
+dnl =========================================================
+AC_CACHE_CHECK([whether setsockopt(SO_RCVTIMEO) is broken],
+ ac_cv_so_rcvtimeo_broken, [dnl
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#if defined(HAVE_SYS_TYPES_H)
+#include <sys/types.h>
+#endif
+
+#if defined(HAVE_SYS_SOCKET_H)
+#include <sys/socket.h>
+#endif
+
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+
+int main(void) {
+ int fd;
+ int ret;
+ struct timeval new_tv;
+
+ /* Open the socket (INET/TCP).*/
+ fd = socket(AF_INET, SOCK_STREAM, 0);
+
+ /* set the timeout for the incoming queue */
+ /* 1 second for example */
+ new_tv.tv_sec = 1;
+ new_tv.tv_usec = 0;
+
+ ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &new_tv, sizeof(new_tv));
+ return ret;
+}
+]])],[ac_cv_so_rcvtimeo_broken=no],[ac_cv_so_rcvtimeo_broken=yes],[ac_cv_so_rcvtimeo_broken=cross])])
+if test x"$ac_cv_sr_rcvtimeo_broken" = x"yes"; then
+ AC_DEFINE(HAVE_BROKEN_SO_RCVTIMEO, 1, [Define if setsockopt(SO_RCVTIMEO) is broken])
+fi
+
dnl ------------------------------------------------------------
dnl determine whether to enable the cairo GTK Graphics2D backend
dnl ------------------------------------------------------------
Index: kaffe/config/config.h.in
diff -u kaffe/config/config.h.in:1.121 kaffe/config/config.h.in:1.122
--- kaffe/config/config.h.in:1.121 Sun Jul 25 06:37:21 2004
+++ kaffe/config/config.h.in Wed Aug 18 20:55:17 2004
@@ -55,6 +55,9 @@
/* Do we have bool */
#undef HAVE_BOOL
+/* Define if setsockopt(SO_RCVTIMEO) is broken */
+#undef HAVE_BROKEN_SO_RCVTIMEO
+
/* Define to 1 if you have the <bsd/libc.h> header file. */
#undef HAVE_BSD_LIBC_H
More information about the kaffe
mailing list