From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: guile 2.0.9 build on mingw Date: Thu, 13 Jun 2013 16:33:58 +0300 Message-ID: <83k3lyw2wp.fsf@gnu.org> References: <83sj1hv2ml.fsf@gnu.org> <874ndx9y7h.fsf@pobox.com> <83ip2bt4qk.fsf@gnu.org> <8761xqhyyt.fsf@gnu.org> <83li6mt18y.fsf@gnu.org> <83wqq3mcq9.fsf@gnu.org> <87k3m3kor5.fsf@gnu.org> <83ehcalysu.fsf@gnu.org> <87sj0pvl4a.fsf@tines.lan> <837gi1n3v5.fsf@gnu.org> <87k3m1vg8b.fsf@tines.lan> <83txl4lhby.fsf@gnu.org> <838v2fky99.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1371130441 31908 80.91.229.3 (13 Jun 2013 13:34:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Jun 2013 13:34:01 +0000 (UTC) Cc: guile-user@gnu.org To: mhw@netris.org, ludo@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jun 13 15:34:01 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Un7f7-0006VE-Bc for guile-user@m.gmane.org; Thu, 13 Jun 2013 15:34:01 +0200 Original-Received: from localhost ([::1]:56009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un7f6-0001Z1-SN for guile-user@m.gmane.org; Thu, 13 Jun 2013 09:34:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un7ey-0001Yw-In for guile-user@gnu.org; Thu, 13 Jun 2013 09:33:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Un7ex-0005Es-6u for guile-user@gnu.org; Thu, 13 Jun 2013 09:33:52 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:62300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un7ew-0005EX-Up; Thu, 13 Jun 2013 09:33:51 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MOC007002YOC100@a-mtaout22.012.net.il>; Thu, 13 Jun 2013 16:33:49 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MOC006P530CZQ50@a-mtaout22.012.net.il>; Thu, 13 Jun 2013 16:33:49 +0300 (IDT) In-reply-to: <838v2fky99.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10435 Archived-At: 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.