Re: new modules vdprintf, vdprintf-posix

2009-01-17 Thread Bruno Haible
Eric Blake wrote: > > +This function is missing on some platforms: > > +..., Cygwin, mingw, Interix 3.5. > > Cygwin 1.5.x lacks [v]dprintf, but cygwin 1.7.0 provides them. So, feel free to update the documentation files. Bruno

Re: working with "good enough" functions

2009-01-17 Thread Mike Frysinger
On Saturday 17 January 2009 15:34:39 Bruno Haible wrote: > Mike Frysinger and Simon Josefsson wrote: > > >> If this happens often enough, perhaps gnulib should have a > > >> printf-posix-no-fp module that does what you want? > > > > > > i would certainly use it, but if i'm the only one expressing i

Re: new modules vdprintf, vdprintf-posix

2009-01-17 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 1/17/2009 6:48 PM: > Among the new functions in POSIX:2008 is vdprintf(), which does formatted > output to a file descriptor. These two modules implement it. > > +Portability problems fixed by either Gnulib module @code{vd

Re: [PATCH 4/4] gnulib-tool: faster string handling for Posix shells.

2009-01-17 Thread Bruno Haible
Ralf Wildenhues wrote: > > +# func_remove_prefix var prefix > > +# removes the given prefix from the value of the shell variable var. > > +# var should be the name of a shell variable. > > +# Its value should not contain a newline and not start or end with > > whitespace. > > +# prefix should not

Re: c-strtod threading and documentation problems

2009-01-17 Thread Bruno Haible
Hi, Michael Gold wrote: > I was planning to use the c-strtod module in a library, but noticed some > problems when looking at its implementation. > ... > This is > not threadsafe because setlocale affects all threads in a program (and > also because setlocale doesn't seem to be threadsafe on all p

new modules dprintf, dprintf-posix

2009-01-17 Thread Bruno Haible
dprintf is similar to vdprintf. Implemented like this: 2009-01-17 Bruno Haible New modules 'dprintf', 'dprintf-posix'. * lib/stdio.in.h (dprintf): New declaration. * lib/dprintf.c: New file. * m4/dprintf.m4: New file. * m4/dprintf-posix.m4: New file.

new modules vdprintf, vdprintf-posix

2009-01-17 Thread Bruno Haible
Among the new functions in POSIX:2008 is vdprintf(), which does formatted output to a file descriptor. These two modules implement it. 2009-01-17 Bruno Haible New modules 'vdprintf', 'vdprintf-posix'. * lib/stdio.in.h (vdprintf): New declaration. * lib/vdprintf.c: New

Re: working with "good enough" functions

2009-01-17 Thread Bruno Haible
Mike Frysinger and Simon Josefsson wrote: > >> If this happens often enough, perhaps gnulib should have a > >> printf-posix-no-fp module that does what you want? > > > > i would certainly use it, but if i'm the only one expressing interest thus > > far, then maybe it isnt a hot issue. > > I see t

Re: mem*/strr*/etc... obsolete warnings

2009-01-17 Thread Bruno Haible
Mike Frysinger wrote on 2009-01-04: > a bunch of modules were labeled as obsolete recently, but no information was > included explaining why. They were marked obsolete because the problems that they fix don't occur any more on the platform that are reasonable porting targets now. In other words,

test-fopen on mingw

2009-01-17 Thread Bruno Haible
On mingw, test-fopen fails, because fopen ("nonexist.ent/", "w") actually creates a regular file. The fix is to define FOPEN_TRAILING_SLASH_BUG also on mingw. This should do it. 2009-01-17 Bruno Haible Fix replacement of fopen on mingw. * m4/fopen.m4 (gl_FUNC_FOPEN): Define FO

compilation error in fopen.c

2009-01-17 Thread Bruno Haible
fopen.c uses 'struct stat' without including . Whee... Leads to a compilation error on HP-UX 11.00. 2009-01-17 Bruno Haible Fix compilation error on HP-UX 11.00, present since 2008-09-24. * lib/fopen.c: Include and . --- lib/fopen.c.orig2009-01-17 17:11:23.0 +010

Re: Austin group ruling on ungetc vs. fflush

2009-01-17 Thread Bruno Haible
And this, finally, makes the test-fflush2.sh test failure on mingw go away. 2009-01-17 Bruno Haible Avoid test-fflush2.sh failure on mingw. * tests/test-fflush2.c: Include binary-io.h. (main): Put standard input into binary mode. * modules/fflush-tests (Depends-

Re: Austin group ruling on ungetc vs. fflush

2009-01-17 Thread Bruno Haible
Eric Blake wrote: > > If you remove this special-casing, one of the tests in the testsuite fails. > > Namely when the first fseek after fflush attempts to position beyond end of > > file. That's something that lseek() does not support, but we are forced to > > used lseek() in this situation, by POS

Re: [bug #25294] assertion failure on dangling symlink to //

2009-01-17 Thread James Youngman
On Sun, Jan 11, 2009 at 10:38 PM, Eric Blake wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to Jim Meyering on 1/11/2009 3:06 PM: >> I tried your "find -L dir-containing-loop" example >> on ext3, tmpfs, and xfs, and it appears d_type is always DT_LNK, > > Is there any file

Re: MINT

2009-01-17 Thread Alan Hourihane
On Sat, 2009-01-17 at 13:55 +, Alan Hourihane wrote: > On Sat, 2009-01-17 at 13:50 +, Alan Hourihane wrote: > > On Thu, 2009-01-15 at 21:47 +0100, Bruno Haible wrote: > > > Hello, > > > > > > Alan Hourihane wrote: > > > > On platforms that don't have them yet, and because gnulib doesn't >

Re: MINT

2009-01-17 Thread Alan Hourihane
On Sat, 2009-01-17 at 13:50 +, Alan Hourihane wrote: > On Thu, 2009-01-15 at 21:47 +0100, Bruno Haible wrote: > > Hello, > > > > Alan Hourihane wrote: > > > On platforms that don't have them yet, and because gnulib doesn't > > > support them (or use them currently) we need to change line 53 in

Re: Austin group ruling on ungetc vs. fflush

2009-01-17 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 1/17/2009 6:45 AM: > If you remove this special-casing, one of the tests in the testsuite fails. > Namely when the first fseek after fflush attempts to position beyond end of > file. That's something that lseek() does not s

Re: MINT

2009-01-17 Thread Alan Hourihane
On Thu, 2009-01-15 at 21:47 +0100, Bruno Haible wrote: > Hello, > > Alan Hourihane wrote: > > On platforms that don't have them yet, and because gnulib doesn't > > support them (or use them currently) we need to change line 53 in > > gai_strerror.c from > > > > #ifdef __USE_GNU > > > > to just..

Re: Austin group ruling on ungetc vs. fflush

2009-01-17 Thread Bruno Haible
Hi Eric, > In general, a big thanks for tackling this. Have you filed a glibc bug > report on this? Done here: > > - off_t pos = lseek (fileno (fp), offset, whence); > > + /* We get here when an fflush() call immediately preceded t

Re: Austin group ruling on ungetc vs. fflush

2009-01-17 Thread Bruno Haible
Hi Eric, > > "The value of the file-position indicator for the stream after > > reading or discarding all pushed-back bytes shall be the same > > as it was before the bytes were pushed back." > > ! 3) Here we are discarding all pushed-back bytes. > > ! >

Re: #ifndef _GL_WCHAR_H in lib/wchar.in.h

2009-01-17 Thread Bruno Haible
> > $ cd gllib > > $ cc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -E getdate.c | \ > > grep mbstate_t | head -2 > > extern size_t rpl_wcrtomb (char *s, wchar_t wc, mbstate_t *ps); > > typedef charmbstate_t; > > Thanks for reporting this. Can you send me the complete output of > "

relocatable-prog: add support for stripping executables

2009-01-17 Thread Bruno Haible
relocatable-prog may install one or two executables per program being installed, depending on the system. Therefore stripping of these executables is best done inside install-reloc. This implements it. Attention! This is an incompatible change. Users of this module must add a line RELOCATABLE_

relocatable: remove *.dSYM

2009-01-17 Thread Bruno Haible
The native C compiler on MacOS X 10.5 leaves a *.dSYM directory for every executable that it creates. Such a directory in unwelcome in $(bindir). This removes it. 2009-01-17 Bruno Haible * build-aux/install-reloc: Remove debugging information left over by C compiler on MacOS X

relocatable: update for MacOS X 10.4

2009-01-17 Thread Bruno Haible
The function _NSGetExecutablePath was declared as int _NSGetExecutablePath (char *buf, unsigned long *bufsize); in MacOS X 10.3, but is declared as int _NSGetExecutablePath (char *buf, uint32_t *bufsize); in MacOS X 10.4 and newer. This leads to a warning in progreloc.c, indicating a bug when c