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: mingw patch Date: Thu, 28 Apr 2005 00:06:09 +0200 Organization: Jan at Appel Message-ID: <87zmvj98oe.fsf@peder.flower> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114639350 20146 80.91.229.2 (27 Apr 2005 22:02:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2005 22:02:30 +0000 (UTC) Cc: Han-Wen Nienhuys Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Apr 28 00:02:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DQubN-0002UU-CV for guile-devel@m.gmane.org; Thu, 28 Apr 2005 00:01:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQuhN-0002iz-Ey for guile-devel@m.gmane.org; Wed, 27 Apr 2005 18:08:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DQuhJ-0002fu-JB for guile-devel@gnu.org; Wed, 27 Apr 2005 18:07:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DQuhI-0002ex-S3 for guile-devel@gnu.org; Wed, 27 Apr 2005 18:07:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQuhI-0001jp-Nu for guile-devel@gnu.org; Wed, 27 Apr 2005 18:07:56 -0400 Original-Received: from [194.109.24.30] (helo=smtp-vbr10.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DQuje-0008BI-FV for guile-devel@gnu.org; Wed, 27 Apr 2005 18:10:22 -0400 Original-Received: from peder.flower (appel.xs4all.nl [80.126.34.178]) by smtp-vbr10.xs4all.nl (8.12.11/8.12.11) with ESMTP id j3RM6Gw1083225; Thu, 28 Apr 2005 00:06:16 +0200 (CEST) (envelope-from janneke@gnu.org) Original-Received: from localhost ([127.0.0.1] helo=peder.flower ident=janneke) by peder.flower with esmtp (Exim 4.43) id 1DQufa-0002rz-IG; Thu, 28 Apr 2005 00:06:10 +0200 Original-To: guile-devel@gnu.org 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:4927 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4927 To compile guile-CVS for mingw today, I needed the patch below. Jan. 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 27 Apr 2005 20:41:59 -0000 @@ -1096,7 +1096,7 @@ esac ## ## Remove fileblocks.o from the object list. This file gets added by ## the Autoconf macro AC_STRUCT_ST_BLOCKS. But there is no need. -#LIBOBJS="`echo ${LIBOBJS} | sed 's/fileblocks\.o//g'`" +LIBOBJS="`echo ${LIBOBJS} | sed 's/fileblocks\.o//g'`" ## If we're creating a shared library (using libtool!), then we'll ## need to generate a list of .lo files corresponding to the .o files Index: libguile/ChangeLog =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/ChangeLog,v retrieving revision 1.2265 diff -p -u -r1.2265 ChangeLog --- libguile/ChangeLog 25 Apr 2005 00:04:02 -0000 1.2265 +++ libguile/ChangeLog 27 Apr 2005 20:42:01 -0000 @@ -1,3 +1,18 @@ +2005-04-26 Jan Nieuwenhuizen + + * socket.c (socklen_t)[__MINGW32__]: Use int. + (s_scm_setsockopt)[__MINGW32__]: 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-25 Kevin Ryde * ramap.c (scm_array_map_x): Allow no source args, add num args checks 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 27 Apr 2005 20:42:01 -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/guile.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/guile.c,v retrieving revision 1.18 diff -p -u -r1.18 guile.c --- libguile/guile.c 22 Oct 2004 13:01:59 -0000 1.18 +++ libguile/guile.c 27 Apr 2005 20:42:01 -0000 @@ -66,7 +66,7 @@ inner_main (void *closure SCM_UNUSED, in int main (int argc, char **argv) { -#if !defined (__MINGW32__) +#ifdef __MINGW32__ /* libtool automagically inserts this variable into your executable... */ extern const lt_dlsymlist lt_preloaded_symbols[]; lt_dlpreload_default (lt_preloaded_symbols); 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 27 Apr 2005 20:42:01 -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 27 Apr 2005 20:42:02 -0000 @@ -37,6 +37,7 @@ #include "libguile/socket.h" #ifdef __MINGW32__ +#define socklen_t int #include "win32-socket.h" #endif @@ -550,7 +551,10 @@ SCM_DEFINE (scm_setsockopt, "setsockopt" #ifdef HAVE_STRUCT_LINGER struct linger opt_linger; #endif + +#ifndef __MINGW32__ struct ip_mreq opt_mreq; +#endif const void *optval = NULL; socklen_t optlen = 0; @@ -602,6 +606,7 @@ SCM_DEFINE (scm_setsockopt, "setsockopt" } } +#ifndef __MINGW32__ if (ilevel == IPPROTO_IP && (ioptname == IP_ADD_MEMBERSHIP || ioptname == IP_DROP_MEMBERSHIP)) { @@ -612,6 +617,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 27 Apr 2005 20:42:02 -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 27 Apr 2005 20:42:02 -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