From: Eli Zaretskii <eliz@gnu.org>
To: mhw@netris.org, ludo@gnu.org
Cc: guile-user@gnu.org
Subject: Re: guile 2.0.9 build on mingw
Date: Thu, 13 Jun 2013 16:33:58 +0300 [thread overview]
Message-ID: <83k3lyw2wp.fsf@gnu.org> (raw)
In-Reply-To: <838v2fky99.fsf@gnu.org>
Here are a few more changes that fix problems exposed by the test
suite.
The patch below, which should be applied on top of the one I sent
yesterday, is needed because open-pipe does this:
(open-pipe* mode "/bin/sh" "-c" command))
and obviously there's no /bin/sh on Windows.
--- libguile/posix.c~1 2013-06-13 08:54:44.926293300 +0300
+++ libguile/posix.c 2013-06-13 08:57:44.262743700 +0300
@@ -1300,7 +1300,9 @@ scm_open_process (SCM mode, SCM prog, SC
int pid;
char *exec_file;
char **exec_argv;
+#ifdef HAVE_FORK
int max_fd = 1024;
+#endif
exec_file = scm_to_locale_string (prog);
exec_argv = scm_i_allocate_string_pointers (scm_cons (prog, args));
@@ -1435,6 +1437,14 @@ scm_open_process (SCM mode, SCM prog, SC
close (p2c[0]);
}
+ if (c_strcasecmp (exec_file, "/bin/sh") == 0)
+ {
+ strcpy (exec_file, "cmd.exe");
+ strcpy (exec_argv[0], "cmd.exe");
+ if (strcmp (exec_argv[1], "-c") == 0)
+ strcpy (exec_argv[1], "/c");
+ }
+
pid = spawnvp (P_NOWAIT, exec_file, exec_argv);
errno_save = errno;
@@ -1486,7 +1496,6 @@ scm_open_process (SCM mode, SCM prog, SC
{
int errno_save = errno;
- free (exec_file);
if (reading)
{
close (c2p[0]);
@@ -1512,6 +1521,7 @@ scm_open_process (SCM mode, SCM prog, SC
exec_file, msg);
}
#endif
+ free (exec_file);
SCM_SYSERROR;
}
@@ -1592,9 +1602,9 @@ scm_open_process (SCM mode, SCM prog, SC
}
_exit (EXIT_FAILURE);
+#endif /* HAVE_FORK */
/* Not reached. */
return SCM_BOOL_F;
-#endif /* HAVE_FORK */
}
#undef FUNC_NAME
The tests in foreign.test failed because they need to be able to call
C functions in Guile itself. According to libtool documentation, this
requires to link with -export-dynamic, so this is needed:
--- libguile/Makefile.am~ 2013-04-03 15:11:28.000000000 +0300
+++ libguile/Makefile.am 2013-06-13 13:34:27.545323200 +0300
@@ -113,7 +113,7 @@
guile_SOURCES = guile.c
guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
guile_LDADD = libguile-@GUILE_EFFECTIVE_VERSION@.la
-guile_LDFLAGS = $(GUILE_CFLAGS)
+guile_LDFLAGS = $(GUILE_CFLAGS) -export-dynamic
libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
The following patch prevents test failure on systems that don't
support symlinks, and thus test-symlink file is not created and does
not exist there.
--- test-suite/tests/filesys.test~0 2013-04-09 09:52:31.000000000 +0300
+++ test-suite/tests/filesys.test 2013-06-13 07:49:51.567974100 +0300
@@ -222,4 +222,5 @@
(throw 'unresolved)))))
(delete-file (test-file))
-(delete-file (test-symlink))
+(if (file-exists? (test-symlink))
+ (delete-file (test-symlink)))
Thanks.
next prev parent reply other threads:[~2013-06-13 13:33 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 19:46 guile 2.0.9 build on mingw Panicz Maciej Godek
2013-05-20 20:05 ` Eli Zaretskii
2013-05-20 20:46 ` Andy Wingo
2013-05-20 21:09 ` objc
2013-05-21 2:43 ` Eli Zaretskii
2013-05-22 15:26 ` Eli Zaretskii
2013-06-07 8:37 ` Eli Zaretskii
2013-06-07 12:44 ` Ludovic Courtès
2013-06-07 14:59 ` Eli Zaretskii
2013-06-09 17:10 ` Eli Zaretskii
2013-06-09 20:33 ` Ludovic Courtès
2013-06-09 21:16 ` Andy Wingo
2013-06-09 21:35 ` Ludovic Courtès
2013-06-10 16:18 ` Eli Zaretskii
2013-06-10 16:18 ` Eli Zaretskii
2013-06-10 16:23 ` Eli Zaretskii
2013-06-10 19:09 ` Mark H Weaver
2013-06-10 19:49 ` Eli Zaretskii
2013-06-10 20:54 ` Mark H Weaver
2013-06-11 16:53 ` Eli Zaretskii
2013-06-11 22:11 ` Ludovic Courtès
2013-06-12 17:46 ` Eli Zaretskii
2013-06-18 21:51 ` Why launch the Guile signal delivery thread on exit? (was Re: guile 2.0.9 build on mingw) Mark H Weaver
2013-06-19 15:51 ` Eli Zaretskii
2013-06-19 16:06 ` Julian Graham
2013-06-19 19:20 ` Ludovic Courtès
2013-06-12 17:57 ` guile 2.0.9 build on mingw Eli Zaretskii
2013-06-13 13:26 ` Eli Zaretskii
2013-06-16 14:19 ` Ludovic Courtès
2013-06-13 13:33 ` Eli Zaretskii [this message]
2013-06-16 14:36 ` Ludovic Courtès
2013-06-16 15:40 ` Eli Zaretskii
2013-06-16 14:55 ` Ludovic Courtès
2013-06-16 15:47 ` Eli Zaretskii
2013-06-16 18:59 ` Ludovic Courtès
2013-06-13 13:40 ` Eli Zaretskii
2013-06-16 14:59 ` Ludovic Courtès
2013-06-17 15:41 ` Eli Zaretskii
2013-06-18 20:45 ` Ludovic Courtès
2013-06-18 22:28 ` Mark H Weaver
2013-06-19 3:03 ` Eli Zaretskii
2013-06-19 19:26 ` Ludovic Courtès
2013-06-19 20:02 ` Eli Zaretskii
2013-06-19 2:59 ` Eli Zaretskii
2013-06-19 15:56 ` Eli Zaretskii
2013-06-19 19:38 ` Ludovic Courtès
2013-06-13 13:41 ` Eli Zaretskii
2013-06-16 15:04 ` Ludovic Courtès
2013-06-16 15:48 ` Eli Zaretskii
2013-06-16 14:44 ` Ludovic Courtès
2013-06-16 15:41 ` Eli Zaretskii
2013-06-12 17:59 ` Eli Zaretskii
2013-06-16 14:46 ` Ludovic Courtès
2013-06-12 18:02 ` Eli Zaretskii
2013-06-16 19:50 ` Ludovic Courtès
2013-06-16 20:22 ` Eli Zaretskii
2013-06-17 15:45 ` Mark H Weaver
2013-06-18 17:17 ` Eli Zaretskii
2013-06-18 19:31 ` Eli Zaretskii
2013-06-18 20:19 ` Ludovic Courtès
2013-06-19 2:53 ` Eli Zaretskii
2013-06-19 19:28 ` Ludovic Courtès
2013-06-19 19:56 ` Eli Zaretskii
2013-05-26 20:41 ` Panicz Maciej Godek
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=83k3lyw2wp.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=guile-user@gnu.org \
--cc=ludo@gnu.org \
--cc=mhw@netris.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).