From: ludo@gnu.org (Ludovic Courtès)
To: Eli Zaretskii <eliz@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: guile 2.0.9 build on mingw
Date: Sun, 16 Jun 2013 21:50:40 +0200 [thread overview]
Message-ID: <87r4g1ygvj.fsf@gnu.org> (raw)
In-Reply-To: <8361xjky0f.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 12 Jun 2013 21:02:56 +0300")
[-- Attachment #1: Type: text/plain, Size: 2708 bytes --]
Eli Zaretskii <eliz@gnu.org> skribis:
>> Date: Tue, 11 Jun 2013 19:53:21 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: ludo@gnu.org, guile-user@gnu.org
>>
>> Btw, --disable-posix disables too much, for no good reason. E.g., it
>> removes such innocent and important functionalities as "chdir",
>> "open", and "close". This is unnecessary, especially since most of
>> the functions disabled by --disable-posix already have HAVE_foo guards
>> around them, so systems that don't have them will not have the
>> corresponding Guile feature. I will try to lift as much of the
>> disabled functionality as MinGW can bear.
>
> Please find the changes to do this below. I removed most of the
> HAVE_POSIX ifdef's, as they are no longer needed.
Sorry I had overlooked this one. It looks nice!
We would need the copyright to be assigned to the FSF before it can be
committed. How does that sound? If you’re willing to do so, I can send
you the paperwork off-line.
> The bug report at http://bugs.gnu.org/14171 says that when Guile is
> compiled with enable-posix, it "can't start the REPL". Can someone
> please show me a simple way of trying that? I'd like to see if my
> build, which didn't use --disable-posix, has any problems in that
> area, and if so try to debug them.
No idea.
A few comments:
> --- libguile/filesys.c~0 2013-04-09 09:52:31.000000000 +0300
> +++ libguile/filesys.c 2013-06-12 13:41:31.244477700 +0300
> @@ -112,7 +112,12 @@
>
> /* Some more definitions for the native Windows port. */
> #ifdef __MINGW32__
> -# define fsync(fd) _commit (fd)
> +# define fsync(fd) _commit (fd)
> +# define WIN32_LEAN_AND_MEAN
What does that mean? :-)
> +# include <windows.h>
> +/* FIXME: Should use 'link' module from gnulib. */
> +# define link(f1,f2) CreateHardLink(f2, f1, NULL)
> +# define HAVE_LINK 1
Let’s do it then, and remove that part of the patch.
> -#ifdef HAVE_POSIX
> -
Note that HAVE_POSIX really means --enable-posix. Since this patch
keeps that option, it should probably keep the #ifdefs. That would be a
topic for a separate patch.
> @@ -921,7 +958,7 @@ SCM_DEFINE (scm_setegid, "setegid", 1, 0
> {
> int rv;
>
> -#ifdef HAVE_SETEUID
> +#ifdef HAVE_SETEGID
Oops, applied.
> @@ -1320,7 +1357,130 @@ scm_open_process (SCM mode, SCM prog, SC
> }
> #endif
>
> +#ifdef HAVE_FORK
> pid = fork ();
> +#elif defined(__MINGW32__)
> + {
> + int save_stdin = -1, save_stdout = -1;
> + int errno_save;
> +
> + if (reading)
[...]
Could this MinGW-specific code be moved to a separate function?
I think the patch also needs something like this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 309 bytes --]
--- a/configure.ac
+++ b/configure.ac
@@ -760,7 +760,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
sched_setaffinity sendfile])
AM_CONDITIONAL([BUILD_ICE_9_POPEN],
- [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"])
+ [test "x$enable_posix" = "xyes"])
[-- Attachment #3: Type: text/plain, Size: 21 bytes --]
Thanks,
Ludo’.
next prev parent reply other threads:[~2013-06-16 19:50 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
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 [this message]
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=87r4g1ygvj.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=eliz@gnu.org \
--cc=guile-user@gnu.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).