Re: open-process and related functions for MinGW Guile

2014-06-29 Thread Eli Zaretskii
> From: l...@gnu.org (Ludovic Courtès) > Cc: Mark H Weaver , guile-devel@gnu.org > Date: Sun, 29 Jun 2014 22:21:28 +0200 > > > +#ifdef __MINGW32__ > > + > > +#include > > + > > +# define WEXITSTATUS(stat_val) ((stat_val) & 255) > > +# define WIFEXITED(stat_val) (((stat_val) & 0xC000) == 0)

Re: open-process and related functions for MinGW Guile

2014-06-29 Thread Ludovic Courtès
Hello, Eli, Eli Zaretskii skribis: > This is a sequel to the thread that started here: > > http://lists.gnu.org/archive/html/guile-devel/2014-02/msg00047.html > > As agreed with Mark at the end of that thread, please find below > patches that enable open-process and friends in the MinGW build

Windows file names snafu

2014-06-29 Thread Eli Zaretskii
This issue is caused by code that treats file names like strings. That fails when the compared strings differ by their directory separators ('/' vs '\'). I bumped into this in a couple of tests that failed or even aborted with backtrace. A related issue is the file names passed to Bash via open-p

Don't skip popen.test on MinGW

2014-06-29 Thread Eli Zaretskii
Another issue related to open-process is that popen.test was being skipped because if-supported returns #f. I fixed it thusly: (define-syntax-rule (if-supported body ...) (if (or (provided? 'fork) ((string-contains %host-type "-mingw32"))) (begin body ...)))

Compile ice-9/popen.scm for MinGW

2014-06-29 Thread Eli Zaretskii
Once open-process worked for me, I quickly found out that modules/ice-9/popen.scm is not being compiled. This is because configure.ac explicitly excludes it for systems lacking 'fork': AM_CONDITIONAL([BUILD_ICE_9_POPEN], [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"

open-process and related functions for MinGW Guile

2014-06-29 Thread Eli Zaretskii
This is a sequel to the thread that started here: http://lists.gnu.org/archive/html/guile-devel/2014-02/msg00047.html As agreed with Mark at the end of that thread, please find below patches that enable open-process and friends in the MinGW build of Guile. The main changes since the patches I