From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.devel Subject: Re: mingw patch Date: Mon, 02 May 2005 20:51:20 +0200 Organization: Jan at Appel Message-ID: <874qdl5umv.fsf@peder.flower> References: <87zmvj98oe.fsf@peder.flower> <871x8tkujw.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115069062 18065 80.91.229.2 (2 May 2005 21:24:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 May 2005 21:24:22 +0000 (UTC) Cc: Han-Wen Nienhuys Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 02 23:24:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSiN9-00066P-Gz for guile-devel@m.gmane.org; Mon, 02 May 2005 23:22:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSiU6-0007Ua-M1 for guile-devel@m.gmane.org; Mon, 02 May 2005 17:29:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSg4l-0000vP-KR for guile-devel@gnu.org; Mon, 02 May 2005 14:55:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSg4h-0000tu-Nq for guile-devel@gnu.org; Mon, 02 May 2005 14:55:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSg2c-0000NI-VX for guile-devel@gnu.org; Mon, 02 May 2005 14:53:15 -0400 Original-Received: from [194.109.24.35] (helo=smtp-vbr15.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DSg5S-0007vC-0R for guile-devel@gnu.org; Mon, 02 May 2005 14:56:10 -0400 Original-Received: from peder.flower (appel.xs4all.nl [80.126.34.178]) by smtp-vbr15.xs4all.nl (8.12.11/8.12.11) with ESMTP id j42IpPkv033911; Mon, 2 May 2005 20:51:30 +0200 (CEST) (envelope-from janneke@gnu.org) Original-Received: from localhost ([127.0.0.1] helo=peder.flower) by peder.flower with esmtp (Exim 4.43) id 1DSg0m-0006WP-AZ; Mon, 02 May 2005 20:51:20 +0200 Original-To: guile-devel@gnu.org In-Reply-To: <871x8tkujw.fsf@zip.com.au> (Kevin Ryde's message of "Sat, 30 Apr 2005 09:54:59 +1000") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:4935 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4935 Kevin Ryde writes: > That'd be better as a HAVE_SOCKLEN_T. > And this would definitely be better as a HAVE_STRUCT_IP_MREQ or > whatever. Ok, better version below. Jan. Index: ChangeLog =================================================================== RCS file: /cvsroot/guile/guile/guile-core/ChangeLog,v retrieving revision 1.463 diff -p -u -r1.463 ChangeLog --- ChangeLog 13 Mar 2005 00:37:33 -0000 1.463 +++ ChangeLog 2 May 2005 13:23:36 -0000 @@ -1,3 +1,7 @@ +2005-05-02 Jan Nieuwenhuizen + + * configure.in: Add tests for socklen_t and ip_mreq. + 2005-03-13 Kevin Ryde * configure.in, GUILE-VERSION (LIBGUILE_SRFI_SRFI_60): New defines. Index: configure.in =================================================================== RCS file: /cvsroot/guile/guile/guile-core/configure.in,v retrieving revision 1.265 diff -p -u -r1.265 configure.in --- configure.in 13 Mar 2005 00:36:50 -0000 1.265 +++ configure.in 2 May 2005 13:23:37 -0000 @@ -520,6 +520,9 @@ AC_SUBST([SCM_I_GSC_T_UINTMAX]) AC_SUBST([SCM_I_GSC_NEEDS_STDINT_H]) AC_SUBST([SCM_I_GSC_NEEDS_INTTYPES_H]) +AC_CHECK_TYPE(socklen_t, int) +AC_CHECK_TYPE(struct ip_mreq) + AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_TIME Index: libguile/ChangeLog =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/ChangeLog,v retrieving revision 1.2268 diff -p -u -r1.2268 ChangeLog --- libguile/ChangeLog 30 Apr 2005 20:54:35 -0000 1.2268 +++ libguile/ChangeLog 2 May 2005 13:23:38 -0000 @@ -1,3 +1,20 @@ +2005-05-02 Jan Nieuwenhuizen + + * hashtab.h: Bugfix: use SCM_API (WAS: extern). + + * socket.c: Remove obsolete comment about socklen_t. + (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code. + + * numbers.h (isnan)[__MINGW32__]: Remove. + + * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add + DEFAULT_INCLUDES when cross compiling. + + * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines. + + * stime.c (s_scm_strftime)[!HAVE_TM_ZONE]: Use scm_vector_elements + instead of SCM_VELTS. + 2005-04-30 Han-Wen Nienhuys * list.h: remove scm_list() Index: libguile/Makefile.am =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/Makefile.am,v retrieving revision 1.202 diff -p -u -r1.202 Makefile.am --- libguile/Makefile.am 8 Mar 2005 00:53:21 -0000 1.202 +++ libguile/Makefile.am 2 May 2005 13:23:38 -0000 @@ -42,7 +42,7 @@ gen_scmconfig_SOURCES = gen-scmconfig.c ## For some reason, OBJEXT does not include the dot gen-scmconfig.$(OBJEXT): gen-scmconfig.c if [ "$(cross_compiling)" = "yes" ]; then \ - $(CC_FOR_BUILD) $(DEFS) $(INCLUDES) -c -o $@ $<; \ + $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ $<; \ else \ $(COMPILE) -c -o $@ $<; \ fi Index: libguile/hashtab.h =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/hashtab.h,v retrieving revision 1.30 diff -p -u -r1.30 hashtab.h --- libguile/hashtab.h 4 Apr 2005 14:53:27 -0000 1.30 +++ libguile/hashtab.h 2 May 2005 13:23:38 -0000 @@ -31,7 +31,7 @@ #define SCM_HASHTABLEF_WEAK_CAR SCM_WVECTF_WEAK_KEY #define SCM_HASHTABLEF_WEAK_CDR SCM_WVECTF_WEAK_VALUE -extern scm_t_bits scm_tc16_hashtable; +SCM_API scm_t_bits scm_tc16_hashtable; #define SCM_HASHTABLE_P(x) SCM_SMOB_PREDICATE (scm_tc16_hashtable, x) #define SCM_VALIDATE_HASHTABLE(pos, arg) \ Index: libguile/numbers.h =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/numbers.h,v retrieving revision 1.99 diff -p -u -r1.99 numbers.h --- libguile/numbers.h 14 Apr 2005 00:35:50 -0000 1.99 +++ libguile/numbers.h 2 May 2005 13:23:38 -0000 @@ -92,7 +92,6 @@ # include # ifdef __MINGW32__ # define copysign _copysign -# define isnan _isnan # define finite _finite # endif /* __MINGW32__ */ # endif /* ndef GO32 */ Index: libguile/socket.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/socket.c,v retrieving revision 1.112 diff -p -u -r1.112 socket.c --- libguile/socket.c 27 Feb 2005 23:50:30 -0000 1.112 +++ libguile/socket.c 2 May 2005 13:23:39 -0000 @@ -67,10 +67,6 @@ + strlen ((ptr)->sun_path)) #endif -/* we are not currently using socklen_t. it's not defined on all systems, - so would need to be checked by configure. in the meantime, plain - int is the best alternative. */ - SCM_DEFINE (scm_htons, "htons", 1, 0, 0, @@ -550,7 +546,10 @@ SCM_DEFINE (scm_setsockopt, "setsockopt" #ifdef HAVE_STRUCT_LINGER struct linger opt_linger; #endif + +#if HAVE_STRUCT_IP_MREQ struct ip_mreq opt_mreq; +#endif const void *optval = NULL; socklen_t optlen = 0; @@ -602,6 +601,7 @@ SCM_DEFINE (scm_setsockopt, "setsockopt" } } +#if HAVE_STRUCT_IP_MREQ if (ilevel == IPPROTO_IP && (ioptname == IP_ADD_MEMBERSHIP || ioptname == IP_DROP_MEMBERSHIP)) { @@ -612,6 +612,7 @@ SCM_DEFINE (scm_setsockopt, "setsockopt" optlen = sizeof (opt_mreq); optval = &opt_mreq; } +#endif if (optval == NULL) { Index: libguile/stime.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/stime.c,v retrieving revision 1.102 diff -p -u -r1.102 stime.c --- libguile/stime.c 7 Mar 2005 21:42:02 -0000 1.102 +++ libguile/stime.c 2 May 2005 13:23:39 -0000 @@ -653,7 +653,10 @@ SCM_DEFINE (scm_strftime, "strftime", 2, environment. interrupts and thread switching must be deferred until TZ is restored. */ char **oldenv = NULL; - SCM *velts = (SCM *) SCM_VELTS (stime); + scm_t_array_handle handle; + size_t len; + ssize_t inc; + SCM *velts = scm_vector_elements (stime, &handle, &len, &inc); int have_zone = 0; if (scm_is_true (velts[10]) && *SCM_STRING_CHARS (velts[10]) != 0) Index: libguile/threads.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/threads.c,v retrieving revision 1.78 diff -p -u -r1.78 threads.c --- libguile/threads.c 24 Mar 2005 10:21:22 -0000 1.78 +++ libguile/threads.c 2 May 2005 13:23:39 -0000 @@ -43,6 +43,15 @@ #include "libguile/continuations.h" #include "libguile/init.h" +#ifdef __MINGW32__ +#ifndef ETIMEDOUT +# define ETIMEDOUT WSAETIMEDOUT +#endif +# include +# include +# define pipe(fd) _pipe (fd, 256, O_BINARY) +#endif /* __MINGW32__ */ + /*** Queues */ /* Make an empty queue data structure. -- Jan Nieuwenhuizen | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http://www.lilypond.org _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel