From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: headache on build repeatibility: octave vs BLODA ?
Date: Wed, 29 Jan 2020 16:08:00 -0000 [thread overview]
Message-ID: <20200130010827.9b8102597f7fe7df637f509b@nifty.ne.jp> (raw)
In-Reply-To: <20200129153428.GP3549@calimero.vinschen.de>
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
On Wed, 29 Jan 2020 16:34:28 +0100
Corinna Vinschen wrote:
> On Jan 29 16:32, Corinna Vinschen wrote:
> > On Jan 29 22:46, Takashi Yano wrote:
> > > --- m4/fseeko.m4.orig 2020-01-29 21:39:37.280507900 +0900
> > > +++ m4/fseeko.m4 2020-01-29 21:36:29.263747100 +0900
> > > @@ -30,16 +30,19 @@
> > > HAVE_FSEEKO=0
> > > else
> > > if test $WINDOWS_64_BIT_OFF_T = 1; then
>
> This makes me a bit suspicious... it looks like a check only
> required for native builds, not for Cygwin.
I think REPLACE_FSEEKO is set to 1 not here,
> > > m4_ifdef([gl_FUNC_FFLUSH_STDIN], [
> > > gl_FUNC_FFLUSH_STDIN
> > > case "$gl_cv_func_fflush_stdin" in
> > > *yes) ;;
> > > - *) REPLACE_FSEEKO=1 ;;
> > > + dnl *) REPLACE_FSEEKO=1 ;;
> > > + *) REPLACE_FSEEKO=0 ;;
> > > esac
but here.
gl_cv_func_fflush_stdin is set here in configure by:
if ac_fn_c_try_run "$LINENO"; then :
gl_cv_func_fflush_stdin=yes
else
gl_cv_func_fflush_stdin=no
fi
and the test code for this decision is as attached. conftest.c
returns 0 in cygwin 3.0.7, while cygwin with commit 59362c80e3a
returns 5.
I am not sure why segfault occurs if fseeko is replaced.
Probably due to a bug in octave or cygwin.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
[-- Attachment #2: conftest.c --]
[-- Type: text/x-csrc, Size: 1462 bytes --]
#include <stdio.h>
# include <unistd.h>
int
main ()
{
FILE *f = fopen ("conftest.txt", "r");
char buffer[10];
int fd;
int c;
if (f == NULL)
return 1;
fd = fileno (f);
if (fd < 0 || fread (buffer, 1, 5, f) != 5)
{ fclose (f); return 2; }
/* For deterministic results, ensure f read a bigger buffer. */
if (lseek (fd, 0, SEEK_CUR) == 5)
{ fclose (f); return 3; }
/* POSIX requires fflush-fseek to set file offset of fd. This fails
on BSD systems and on mingw. */
if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
{ fclose (f); return 4; }
if (lseek (fd, 0, SEEK_CUR) != 5)
{ fclose (f); return 5; }
/* Verify behaviour of fflush after ungetc. See
<http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
/* Verify behaviour of fflush after a backup ungetc. This fails on
mingw. */
c = fgetc (f);
ungetc (c, f);
fflush (f);
if (fgetc (f) != c)
{ fclose (f); return 6; }
/* Verify behaviour of fflush after a non-backup ungetc. This fails
on glibc 2.8 and on BSD systems. */
c = fgetc (f);
ungetc ('@', f);
fflush (f);
if (fgetc (f) != c)
{ fclose (f); return 7; }
fclose (f);
return 0;
;
return 0;
}
[-- Attachment #3: conftest.txt --]
[-- Type: text/plain, Size: 13 bytes --]
hello world
[-- Attachment #4: Type: text/plain, Size: 219 bytes --]
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2020-01-29 16:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-25 16:55 Marco Atzeri
2020-01-25 18:15 ` Brian Inglis
2020-01-27 6:54 ` Marco Atzeri
2020-01-25 20:36 ` Achim Gratz
2020-01-26 6:58 ` Marco Atzeri
2020-01-26 8:05 ` ASSI
2020-01-26 8:38 ` Marco Atzeri
2020-01-27 6:45 ` Marco Atzeri
2020-01-27 11:33 ` Takashi Yano
2020-01-28 6:41 ` Marco Atzeri
2020-01-28 14:55 ` Takashi Yano
2020-01-29 9:44 ` Corinna Vinschen
2020-01-29 12:19 ` Marco Atzeri
2020-01-29 13:46 ` Takashi Yano
2020-01-29 15:11 ` Takashi Yano
2020-01-29 15:32 ` Corinna Vinschen
2020-01-29 15:34 ` Corinna Vinschen
2020-01-29 16:08 ` Takashi Yano [this message]
2020-01-29 17:57 ` Corinna Vinschen
2020-01-30 21:05 ` Brian Inglis
2020-01-30 21:34 ` Marco Atzeri
2020-01-28 17:26 ` ASSI
2020-01-28 20:04 ` Marco Atzeri
2020-01-28 20:21 ` Achim Gratz
2020-01-26 2:42 ` Takashi Yano
2020-01-26 5:11 ` Takashi Yano
2020-01-26 10:24 ` Marco Atzeri
2020-01-26 10:31 ` Takashi Yano
2020-01-29 0:03 ` Hans-Bernhard Bröker
2020-01-29 0:39 ` Hans-Bernhard Bröker
2020-01-29 5:10 ` Marco Atzeri
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200130010827.9b8102597f7fe7df637f509b@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=cygwin@cygwin.com \
/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).