pipe-safer.c fixes

2006-08-11 Thread Paul Eggert
The latest change to pipe-safer.c doesn't work on GNU or Unix platforms, since it misspelled an identifier. (Yet another waste of my time due to mingw -- mingw changes really should get checked on a GNU/Linux box before review/checkin) Also I noticed a file descriptor leak. I installed this.

Re: [bug-gnulib] poll(2) emulation doesn't work well on a file descriptor

2006-08-11 Thread Bruno Haible
Daiki Ueno wrote: > When I tried a tiny program which uses gnulib's poll(2) emulation on > MacOS X 10.4, I found a bug. gnulib's poll(2) uses recv(2) with > MSG_PEEK to support POLLHUP. However, recv(2) is only applicable to a > socket, not to a file descriptor. Thanks for reporting this. > Tho

Re: importing regex changes from libc

2006-08-11 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > How about this? Paul, do you want to handle pushing it back upstream to > glibc? Sure, I'll add it to my long list of changes to push back upstream. :-) Thanks for the bug report and patch. I like the following a bit better, since it more closely matc

Re: [bug-gnulib] snprintf fixes in gnulib

2006-08-11 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > This is not needed. vasnprintf already does this check. But my next bug report was going to be for vasnprintf, since vasnprintf should not do the INT_MAX check. vasnprintf's API does not suffer from the INT_MAX limit, and there's no need to inflict this

Re: importing regex changes from libc

2006-08-11 Thread Eric Blake
Eric Blake byu.net> writes: > > This is broken on cygwin, where wchar_t is 2 bytes but wint_t is 4 bytes. How about this? Paul, do you want to handle pushing it back upstream to glibc? 2006-08-11 Eric Blake <[EMAIL PROTECTED]> * regex_internal.c (re_string_skip_chars): Avoid overfl

poll(2) emulation doesn't work well on a file descriptor

2006-08-11 Thread Daiki Ueno
Hi, When I tried a tiny program which uses gnulib's poll(2) emulation on MacOS X 10.4, I found a bug. gnulib's poll(2) uses recv(2) with MSG_PEEK to support POLLHUP. However, recv(2) is only applicable to a socket, not to a file descriptor. Though I don't know how to fix it, I think it can be b

Re: importing regex changes from libc

2006-08-11 Thread Eric Blake
Paul Eggert CS.UCLA.EDU> writes: > --- lib/regex_internal.c 10 Apr 2006 06:43:33 - 1.20 > +++ lib/regex_internal.c 10 Aug 2006 20:05:48 - > -488,7 +488,7 re_string_skip_chars (re_string_t *pstr, >mbstate_t prev_st; >Idx rawbuf_idx; >size_t mbclen; > -

Re: [bug-gnulib] wcwidth on OSF/1

2006-08-11 Thread Paul Eggert
Eric Blake-1 <[EMAIL PROTECTED]> writes: > Why don't we instead add a new module, wchar, which provides a replacement > using the same techniques as we do with stdint.m4. Sounds reasonable to me.

Re: [bug-gnulib] sync from gnulib to coreutils

2006-08-11 Thread Eric Blake-1
> > (*) I added to gnulib a file users.txt listing the uses of gnulib that > I found so far. > Nice list. I sorted it, and added tar. -- Eric Blake -- View this message in context: http://www.nabble.com/Re%3A-sync-from-gnulib-to-coreutils-tf2086545.html#a5765268 Sent from the Gnulib

Re: [bug-gnulib] wcwidth on OSF/1

2006-08-11 Thread Eric Blake-1
> Confirmed. Thanks, Albert! I wasn't aware that this was the same bug > that we work around in so many other places. > > I'm adding the fix below to gnulib. No need any more for -I/usr/include > or option -nodtk. Why don't we instead add a new module, wchar, which provides a replacement using

Re: snprintf fixes in gnulib

2006-08-11 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > Simon, ok to apply this? Fine by me. (Except that I find unified diff's easier to read...) Thanks, Simon

Re: [bug-gnulib] snprintf fixes in gnulib

2006-08-11 Thread Bruno Haible
Paul Eggert wrote: > I've added him (Bruno, if you object I'll remove you :-). It's fine, I don't object :-), since snprintf is related to vasnprintf. Bruno

Re: [bug-gnulib] snprintf fixes in gnulib

2006-08-11 Thread Bruno Haible
Paul Eggert wrote: > The first thing I noticed was this comment about two size_t variables: > > if (len > size - 1) /* equivalent to: (size > 0 && len >= size) */ > > The comment is not correct if size_t promotes to int This is a border case; you can fix it by adding a cast: if (len >

Re: [bug-gnulib] sync from gnulib to coreutils

2006-08-11 Thread Bruno Haible
Paul Eggert wrote: > This burned another hour of my time. I suppose I should bump the > priority of getting bootstrapping to work with coreutils. The bidirectional merge between gettext and gnulib after gettext-0.15 took me 5 hours. Then I switched to using gnulib-tool. The number of files mainta

Re: [bug-gnulib] wcwidth on OSF/1

2006-08-11 Thread Bruno Haible
Albert Chin wrote: > > > cc: Error: /usr/include.dtk/wchar.h, line 87: Ill-formed parameter type > > > list. (parmtyplist) > > > __VA_LIST__ __arg); > > > ^ > > > configure:14834: $? = 1 > > The fix is to #include before . Confirmed. Thanks, Albert! I wasn't aware