This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
cygwin patch for libjava/configure.in
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Subject: cygwin patch for libjava/configure.in
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- Date: Wed, 18 Apr 2001 23:22:00 -0000
- Cc: "'java-patches at gcc dot gnu dot org'" <java-patches at gcc dot gnu dot org>, "'robert dot collins at itdomain dot com dot au'" <robert dot collins at itdomain dot com dot au>
Rob Collins made some progress with libjava on cygwin, see
http://gcc.gnu.org/ml/java/2001-04/msg00261.html
This patch addresses two issues in libjava:
* posix threads on cygwin doesn't/can't link with -lpthreads.
* autoconf detects IP6 but cygwin implementation is incomplete
I have changed the IP6 detection to use another struct defined in RFC2133.
It may be safer to look for both structs with something like
AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6; struct
ip6_mreq mreq;],
2000-04-19 David Billinghurst <David.Billinghurst>
* configure.in: POSIX threads on cygwin does not link with
-lpthreads
Use "struct ip6_mreq mreq" rather than "struct sockaddr_in6 addr6"
in test for HAVE_INET6
--- libjava/configure.in.orig Thu Apr 5 18:16:52 2001
+++ libjava/configure.in Thu Apr 19 01:57:17 2001
@@ -314,8 +314,16 @@
THREADSPEC=
case "$THREADS" in
posix)
- THREADLIBS=-lpthread
- THREADSPEC=-lpthread
+ case "$HOST" in
+ *-*-cygwin*)
+ THREADLIBS=
+ THREADSPEC=
+ ;;
+ *)
+ THREADLIBS=-lpthread
+ THREADSPEC=-lpthread
+ ;;
+ esac
THREADOBJS=posix-threads.lo
THREADH=posix-threads.h
# MIT pthreads doesn't seem to have the mutexattr functions.
@@ -680,8 +688,8 @@
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
-AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
-AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6;],
+AC_MSG_CHECKING([whether struct ip6_mreq is in netinet/in.h])
+AC_TRY_COMPILE([#include <netinet/in.h>], [struct ip6_mreq mreq;],
[AC_DEFINE(HAVE_INET6)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])