From: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: Han-Wen Nienhuys <hanwen@lilypond.org>
Subject: mingw patch
Date: Thu, 28 Apr 2005 00:06:09 +0200 [thread overview]
Message-ID: <87zmvj98oe.fsf@peder.flower> (raw)
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 <janneke@gnu.org>
+
+ * 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 <user42@zip.com.au>
* 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 <float.h>
# 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 <fcntl.h>
+# include <process.h>
+# define pipe(fd) _pipe (fd, 256, O_BINARY)
+#endif /* __MINGW32__ */
+
/*** Queues */
/* Make an empty queue data structure.
--
Jan Nieuwenhuizen <janneke@gnu.org> | 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
next reply other threads:[~2005-04-27 22:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-27 22:06 Jan Nieuwenhuizen [this message]
2005-04-29 23:54 ` mingw patch Kevin Ryde
2005-05-02 18:51 ` Jan Nieuwenhuizen
2005-05-18 8:00 ` heromyth
2005-06-05 18:29 ` Marius Vollmer
2005-06-10 12:59 ` Jan Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zmvj98oe.fsf@peder.flower \
--to=janneke@gnu.org \
--cc=hanwen@lilypond.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).