[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MinGW-related patches that were reported in 2014 but not applied
From: |
Andy Wingo |
Subject: |
Re: MinGW-related patches that were reported in 2014 but not applied |
Date: |
Sat, 16 Jul 2016 15:39:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
On Sat 16 Jul 2016 13:24, Eli Zaretskii <address@hidden> writes:
> diff --git a/libguile/filesys.c b/libguile/filesys.c
> index 48232e8..c47c2f4 100644
> --- a/libguile/filesys.c
> +++ b/libguile/filesys.c
> @@ -1472,6 +1472,14 @@ SCM_DEFINE (scm_mkstemp, "mkstemp!", 1, 0, 0,
> SCM_SYSCALL (rv = mkstemp (c_tmpl));
> if (rv == -1)
> SCM_SYSERROR;
> +#ifdef __MINGW32__
> + /* Files created by this function are used for *.go files, so make
> + sure they use binary I/O, or else the produced *.go files will be
> + corrupted by end-of-line conversion and ^Z "software EOF"
> + misfeature. Gnulib's 'mkstemp' uses the default text mode to
> + open the file . */
> + _setmode (rv, _O_BINARY);
> +#endif
This function is used for other purposes as well. I think the right
thing here is to use the mkostemp gnulib module instead and pass
O_BINARY in the flags. I have made this change in git; please let me
know if it causes problems for you.
Andy
- MinGW-related patches that were reported in 2014 but not applied, Eli Zaretskii, 2016/07/15
- Re: MinGW-related patches that were reported in 2014 but not applied, Andy Wingo, 2016/07/16
- Re: MinGW-related patches that were reported in 2014 but not applied, Andy Wingo, 2016/07/23
- Re: MinGW-related patches that were reported in 2014 but not applied, Eli Zaretskii, 2016/07/23
- Re: MinGW-related patches that were reported in 2014 but not applied, Andy Wingo, 2016/07/23
- Re: MinGW-related patches that were reported in 2014 but not applied, Eli Zaretskii, 2016/07/24
Re: MinGW-related patches that were reported in 2014 but not applied, Andy Wingo, 2016/07/23