Paolo Bonzini <[EMAIL PROTECTED]> wrote:
> Hi all, git sed gives this problem when running "sh autoboot":
>
> configure.ac:17: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE
> ../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
...
>
> Can anyone help? Also, I would l
> Here's a patch that does the job, at the expense of
> switching to AM_GNU_GETTEXT([external]). I switched coreutils
> to that approach a long time ago and haven't looked back.
> No one has complained, either.
Great, thanks.
Paolo
"Richard W.M. Jones" <[EMAIL PROTECTED]> wrote:
> I have to go off and do something else this afternoon, but here is a
> preliminary patch for flock support for Windows. It compiles with my
> MinGW cross-compiler but I haven't really tested it properly yet.
>
> As you can see, it introduces anothe
On Friday 03 October 2008 08:18:32 you wrote:
> I suppose you've seen Bruno's reply.
> So would you please make the copyright change he proposed,
> add the paragraph suggested by Ian, and post a final version?
Final version of patch is attached.
Summary:
- add copyrights (from Bruno's reply)
- add
> I cannot change 'close-stream', since you own that module. But for
> 'fwriteerror',
> which I use in GNU gettext - and where I don't want to have spurious, timing-
> dependent error messages - I'm applying this:
I tend to agree with you on EPIPE, but OTOH this is as bad as it can be.
Can't we
Bruno Haible <[EMAIL PROTECTED]> wrote:
> Jim Meyering wrote:
>> >* lib/close-stream.c (close_stream): Ignore error EPIPE from fclose.
>> >
>> I know this condition arises only when ignoring or handling SIGPIPE,
>> (which should be rather unusual) but even so, I really dislike the idea
>> of ig
Kamil Dudka <[EMAIL PROTECTED]> wrote:
> On Friday 03 October 2008 08:18:32 you wrote:
>> I suppose you've seen Bruno's reply.
>> So would you please make the copyright change he proposed,
>> add the paragraph suggested by Ian, and post a final version?
> Final version of patch is attached.
>
> Sum
On Fri, Oct 03, 2008 at 02:25:42AM +0200, Bruno Haible wrote:
> Richard W.M. Jones wrote:
> > here is a preliminary patch for flock support for Windows.
>
> Three comments.
>
> * About the function. Why flock() and not lockf()?
> There are three APIs for locking:
> - lockf in POSIX [1],
>
Paolo Bonzini wrote:
> Is it possible to implement the "tee
> --ignore-sigpipe" as you did (delaying SIGPIPE until the last input
> closes, which I also think is the right thing to do) while having
> close-stream ignore EPIPE?
Yes it is. The complete patch was posted here:
http://lists.gnu.org/
Jim Meyering wrote:
> > EPIPE is part of the normal shutdown
> > protocol of pipes, when the pipe writer chooses to block or ignore SIGPIPE.
>
> First, you're assuming that the pipe writer chooses to
> block or ignore SIGPIPE
Yes, EPIPE only occurs if SIGPIPE is blocked or ignored.
> which is no
Kamil Dudka <[EMAIL PROTECTED]> wrote:
> On Friday 03 of October 2008 09:55:40 Jim Meyering wrote:
>> Please review these small changes that I expect to fold into your change
>> set: - use c_isdigit, c_isalpha, c_isalnum directly; no need for casts -
> Sorry, but I am not sure here. This was Bruno
On Friday 03 of October 2008 09:55:40 Jim Meyering wrote:
> Please review these small changes that I expect to fold into your change
> set: - use c_isdigit, c_isalpha, c_isalnum directly; no need for casts -
Sorry, but I am not sure here. This was Bruno's suggestion from
http://lists.gnu.org/archiv
Kamil Dudka <[EMAIL PROTECTED]> wrote:
> On Friday 03 of October 2008 09:55:40 Jim Meyering wrote:
>> Please review these small changes that I expect to fold into your change
>> set: - use c_isdigit, c_isalpha, c_isalnum directly; no need for casts -
> Sorry, but I am not sure here. This was Bruno
Jim Meyering wrote:
> Here's a patch that does the job, at the expense of
> switching to AM_GNU_GETTEXT([external]).
Agreed. Shipping intl/* as part of the package was the usual approach around
1995-1998. Nowadays, thanks to the other packages that use i18n via gettext()
and thanks to libttol, you
Jim Meyering wrote:
> >> set: - use c_isdigit, c_isalpha, c_isalnum directly; no need for casts -
> > Sorry, but I am not sure here. ...
>
> Oops. You're right.
> While some of the uses are ok without the cast (i.e., in order),
> others do required it. So I'll leave the casts.
Good point. I sho
Jim,
> Imagine a scenario in which the pipe reader is expected always to
> be reading, and so the pipe writer can expect that any write failure with
> errno==EPIPE indicates the reader has terminated unexpectedly.
If the writer should terminate first, the reader can still detect the
failure using
Bruno Haible wrote:
> Paolo Bonzini wrote:
>> Is it possible to implement the "tee
>> --ignore-sigpipe" as you did (delaying SIGPIPE until the last input
>> closes, which I also think is the right thing to do) while having
>> close-stream ignore EPIPE?
>
> Yes it is. The complete patch was posted
Paolo Bonzini wrote:
> > * About the function. Why flock() and not lockf()?
> > There are three APIs for locking:
> > - lockf in POSIX [1],
> > - fcntl in POSIX [2],
> > - flock in BSD and glibc [3][4].
> >
> > According to the gnulib doc (doc/posix-functions/lockf.texi,
> > doc/
Bruno Haible <[EMAIL PROTECTED]> wrote:
> Jim Meyering wrote:
>> >> set: - use c_isdigit, c_isalpha, c_isalnum directly; no need for casts -
>> > Sorry, but I am not sure here. ...
>>
>> Oops. You're right.
>> While some of the uses are ok without the cast (i.e., in order),
>> others do required i
Paolo Bonzini <[EMAIL PROTECTED]> wrote:
> Jim,
>
>> Imagine a scenario in which the pipe reader is expected always to
>> be reading, and so the pipe writer can expect that any write failure with
>> errno==EPIPE indicates the reader has terminated unexpectedly.
>
> If the writer should terminate fi
Bruno Haible <[EMAIL PROTECTED]> wrote:
> Jim Meyering wrote:
>> > EPIPE is part of the normal shutdown
>> > protocol of pipes, when the pipe writer chooses to block or ignore SIGPIPE.
>>
>> First, you're assuming that the pipe writer chooses to
>> block or ignore SIGPIPE
>
> Yes, EPIPE only occurs
FYI,
this might be the final iteration ;-)
Here's the incremental,
and following it, the combined patch:
>From 5c26b63b1bd8aaf0bfaa275b884ff8b7edb4ce25 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[EMAIL PROTECTED]>
Date: Fri, 3 Oct 2008 11:51:55 +0200
Subject: [PATCH] tweaks
---
lib/filevercmp.
>> But lockf unlike flock does not support shared locks, which are very
>> useful. I can take care of implementing it in terms of fcntl when
>> Richard's patch goes in.
>
> Very good point. You can write flock() in terms of fcntl()?
Yes, simply like this:
struct flock fl;
fl.l_start = 0;
On Fri, Oct 03, 2008 at 02:19:05PM +0200, Bruno Haible wrote:
> Very good point. You can write flock() in terms of fcntl()? Also, in glibc
> we have code for lockf() in terms of fcntl.
I've written an flock-in-terms-of-fcntl in the latest version.
Coming soon ... I'm working around some tricky b
Jim Meyering wrote:
> Paolo Bonzini <[EMAIL PROTECTED]> wrote:
>> Jim,
>>
>>> Imagine a scenario in which the pipe reader is expected always to
>>> be reading, and so the pipe writer can expect that any write failure with
>>> errno==EPIPE indicates the reader has terminated unexpectedly.
>> If the
> Yes, and actually, that bugs me quite a lot. While gnulib is still finding
> its feet, that's still acceptable, but at some point (the core interfaces of)
> gnulib really ought to settle down. And I've moaned on and off that it
> really would be very nice (for the sake of being able to rebuild
Paolo Bonzini <[EMAIL PROTECTED]> wrote:
> Jim Meyering wrote:
>> Paolo Bonzini <[EMAIL PROTECTED]> wrote:
>>> Jim,
>>>
Imagine a scenario in which the pipe reader is expected always to
be reading, and so the pipe writer can expect that any write failure with
errno==EPIPE indicates
Paolo Bonzini wrote:
> > http://lists.gnu.org/archive/html/bug-coreutils/2008-09/msg00024.html
>
> Doesn't the comment in patch 2
To make it clear:
- Patch 1 only - applies if close_stdout were modified to ignore EPIPE
always (which Jim has rejected).
- Patch 1 + 2 combined - applies if
Jim Meyering wrote:
> Imagine a scenario in which the pipe reader is expected always to
> be reading, and so the pipe writer can expect that any write failure with
> errno==EPIPE indicates the reader has terminated unexpectedly.
>>>
>>> The above was assuming that SIGPIPE is being igno
Paolo Bonzini <[EMAIL PROTECTED]> wrote:
> Jim Meyering wrote:
>
>> Imagine a scenario in which the pipe reader is expected always to
>> be reading, and so the pipe writer can expect that any write failure with
>> errno==EPIPE indicates the reader has terminated unexpectedly.
This primarily adds a test suite, and an implementation of flock in
terms of fcntl. It removes the Win95/98/ME implementation of flock,
which simplifies the Windows version greatly.
When you run the tests under Wine, you'll see this warning several
times. It appears to be a bug in Wine, but doe
Bruno Haible wrote:
> Paolo Bonzini wrote:
>>> http://lists.gnu.org/archive/html/bug-coreutils/2008-09/msg00024.html
>> Doesn't the comment in patch 2
>
> To make it clear:
> - Patch 1 only - applies if close_stdout were modified to ignore EPIPE
> always (which Jim has rejected).
> - Pat
Jim Meyering wrote:
> > ... if SIGPIPE is blocked or ignored.
> >
> >> which is not generally recommended.
>
> In some contexts. Some environments (mis-configured login/csh) have
> resulted in the default SIGPIPE handler being SIG_IGN.
I agree that having SIGPIPE blocked or ignoring during an ex
Thanks!
> +static BOOL
> +do_lock_shared (HANDLE h, int non_blocking)
> +static BOOL
> +do_lock_exclusive (HANDLE h, int non_blocking)
There's quite some duplication here. However, with the other changes
below it might become acceptable.
> + case ERROR_LOCK_VIOLATION:
> + /* EWOULDBL
This patch tweaks the mapping of error codes in the errno module and in
winsock.c, so that under mingw EWOULDBLOCK is not different from EAGAIN.
It was inspired by the flock patch.
Ok?
Paolo
2008-10-03 Paolo Bonzini <[EMAIL PROTECTED]>
* lib/strerror.c: Return an error string for WSA
Paolo Bonzini wrote:
> > If you want both scenarios - the "don't know which of the two terminates
> > first"
> > and the "writer must terminate first" - to be supported by close_stream and
> > close_stdout, IMO the program needs to be able to tell these functions about
> > it, probably through a g
> What else do you propose to cover these cases, if not a global variable?
If only one behavior is needed across an entire package, a dummy module
with gl_MODULE_INDICATOR would do. Better than having fwriteerror do
one thing and close_stdout do another.
Paolo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Paolo Bonzini on 10/3/2008 7:27 AM:
> This patch tweaks the mapping of error codes in the errno module and in
> winsock.c, so that under mingw EWOULDBLOCK is not different from EAGAIN.
> It was inspired by the flock patch.
I'm in favor o
On Friday 03 October 2008 15:27, Paolo Bonzini wrote:
> This patch tweaks the mapping of error codes in the errno module and in
> winsock.c, so that under mingw EWOULDBLOCK is not different from EAGAIN.
Why should this be done? POSIX [1] does not require this. Portable applications
have to check a
Paolo Bonzini wrote:
> > To make it clear:
> > - Patch 1 only - applies if close_stdout were modified to ignore EPIPE
> > always (which Jim has rejected).
> > - Patch 1 + 2 combined - applies if close_stdout is as it currently is.
>
> What's wrong in having patch 1 + 2 combined with close_
>> This patch tweaks the mapping of error codes in the errno module and in
>> winsock.c, so that under mingw EWOULDBLOCK is not different from EAGAIN.
>
> Why should this be done? POSIX [1] does not require this. Portable
> applications
> have to check against both EAGAIN and EWOULDBLOCK.
But i
Eric Blake wrote:
> POSIX 200x, now ratified by IEEE but still awaiting ISO
> ratification [1], adds the EOPNOTSUPP/ENOTSUP pairing, as on Linux, but
> Bruno wanted to delay on that front [2].
>
> [1] http://www.opengroup.org/austin/mailarchives/ag/msg11759.html
Yes, I propose to delay implementi
Eric Blake wrote:
> I'm in favor of the patch
OK, that makes 2:1 for Paolo. Patch slightly modified:
- In errno.in.h: No need to test '#ifndef EWOULDBLOCK'. If mingw in the
future defines EWOULDBLOCK, we need to adjust our code.
- In winsock.c: Mapping WSAEWOULDBLOCK to EWOULDBLOCK sounds
Thanks for the feedback. The updated version attached should correct
all those points.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, loggi
> The drawback of this move is that
>
>errno = EWOULDBLOCK;
>perror ("");
>
> now prints "Resource temporarily unavailable", where before it printed
> "Operation would block". But that's like on Linux. That's the "feature"
> you get by merging two error codes into a single one.
Yes, tha
Paolo Bonzini <[EMAIL PROTECTED]> wrote:
>> What else do you propose to cover these cases, if not a global variable?
>
> If only one behavior is needed across an entire package, a dummy module
> with gl_MODULE_INDICATOR would do. Better than having fwriteerror do
> one thing and close_stdout do a
46 matches
Mail list logo