Eli Zaretskii <e...@gnu.org> writes:

> This patch removes several "#ifdef HAVE_POSIX" conditionals that
> unnecessarily prevent useful Guile functions from showing up in the
> MinGW build on MS-Windows.

I think perhaps we should simply remove the --disable-posix configure
option in master, since it is apparently no longer needed on Windows.
Of course this patch would be part of that.

If we decide to keep --disable-posix (which should be the case on
stable-2.0 regardless), then I think we should not apply this patch.
Instead, we should just recommend that MinGW builds be done without
--disable-posix.

> diff --git a/libguile/filesys.c b/libguile/filesys.c
> index aa3e671..441ced8 100644
> --- a/libguile/filesys.c
> +++ b/libguile/filesys.c
> @@ -111,7 +111,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
> +# include <windows.h>
> +/* FIXME: Should use 'link' module from gnulib.  */
> +# define link(f1,f2)  CreateHardLink(f2, f1, NULL)
> +# define HAVE_LINK 1
>  #endif /* __MINGW32__ */

Rather than including Windows-specific code in Guile and this FIXME,
let's just add the 'link' Gnulib module, as you suggest.  I already have
a list of some more modules to add, so I'll do that in the next day or
so.

What do you think?

    Thanks,
      Mark

Reply via email to