From: Eli Zaretskii <eliz@gnu.org>
To: guile-devel@gnu.org
Subject: Re: Link failure on systems lacking mkstemp
Date: Mon, 15 Sep 2014 20:15:02 +0300 [thread overview]
Message-ID: <831trc6c15.fsf@gnu.org> (raw)
In-Reply-To: <83k35ritoo.fsf@gnu.org>
Ping! (1 month)
> Date: Fri, 29 Aug 2014 11:30:47 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> Ping!
>
> > Date: Sat, 16 Aug 2014 17:49:10 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> >
> > > Date: Sat, 16 Aug 2014 14:42:54 +0300
> > > From: Eli Zaretskii <eliz@gnu.org>
> > >
> > > I think the solution is simply remove mkstemp.c from libguile/, and
> > > all its traces from the configury that causes its dependency to be
> > > added to libguile/Makefile. Not sure how to do the latter, though.
> >
> > Actually, there's one small change that's required for using Gnulib's
> > mkstemp: it opens the temporary file in the (default) text I/O mode,
> > while we need it in binary mode, because we use these temporary files
> > for writing *.go files. Here's the proposed patch:
> >
> > +++ libguile/filesys.c 2014-08-16 17:44:35.578125000 +0300
> > @@ -1479,6 +1479,14 @@ SCM_DEFINE (scm_mkstemp, "mkstemp!", 1,
> > 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
> >
> > scm_substring_move_x (scm_from_locale_string (c_tmpl),
> > SCM_INUM0, scm_string_length (tmpl),
> >
> >
>
>
next prev parent reply other threads:[~2014-09-15 17:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 11:42 Link failure on systems lacking mkstemp Eli Zaretskii
2014-08-16 14:49 ` Eli Zaretskii
2014-08-29 8:30 ` Eli Zaretskii
2014-09-15 17:15 ` Eli Zaretskii [this message]
2014-08-29 8:29 ` Eli Zaretskii
2014-09-15 17:14 ` Eli Zaretskii
2015-10-30 14:53 ` Ludovic Courtès
2015-10-30 15:19 ` Eli Zaretskii
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=831trc6c15.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=guile-devel@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).