Re: [bug-gnulib] AIX tests failures

2006-05-30 Thread Albert Chin
On Tue, May 30, 2006 at 10:27:48PM +0200, Bruno Haible wrote: > Ralf Wildenhues wrote: > > > Hmm? My results for AIX 5.1 differ: On AIX 5.1.0.0 I get > > > > > > checking whether strndup is declared... yes > > > checking for working strndup... no > > > checking whether strnlen is declared... yes >

Re: [bug-gnulib] AIX tests failures

2006-05-30 Thread Albert Chin
On Tue, May 30, 2006 at 09:48:24PM +0200, Ralf Wildenhues wrote: > * Bruno Haible wrote on Tue, May 30, 2006 at 09:29:37PM CEST: > > Ralf Wildenhues wrote: > > > Tested on AIX 4.3.3, 5.1, 5.2 (first has strnlen and strndup broken, > > > second has strnlen fixed, last has both fixed) > > > > Hmm? M

Re: [bug-gnulib] strfile: new module

2006-05-30 Thread Bruce Korb
On 5/30/06, Bruno Haible <[EMAIL PROTECTED]> wrote: > +tmp = realloc (out, pos + BUFSIZ); Quadratic runtime behaviour: if you don't have particular luck with the realloc() implementation, for large files, this loop will spend most of its time in realloc(), copying memory around. Since I w

Re: [bug-gnulib] AIX tests failures

2006-05-30 Thread Bruno Haible
Ralf Wildenhues wrote: > > Hmm? My results for AIX 5.1 differ: On AIX 5.1.0.0 I get > > > > checking whether strndup is declared... yes > > checking for working strndup... no > > checking whether strnlen is declared... yes > > checking for working strnlen... no > > (lslpp -L). The one I tested on

Re: [bug-gnulib] strfile: new module

2006-05-30 Thread Bruno Haible
Simon Josefsson wrote: > This is used in GnuTLS, and I need it in Shishi now, so I thought that > it should be a module. What do you think? I agree it's common enough that we can use it in gnulib. > Possibly, there should be a xstrfile too, that uses xrealloc... Yes. > Index: modules/strfile

Re: [bug-gnulib] AIX tests failures

2006-05-30 Thread Ralf Wildenhues
* Bruno Haible wrote on Tue, May 30, 2006 at 09:29:37PM CEST: > Ralf Wildenhues wrote: > > Tested on AIX 4.3.3, 5.1, 5.2 (first has strnlen and strndup broken, > > second has strnlen fixed, last has both fixed) > > Hmm? My results for AIX 5.1 differ: On AIX 5.1.0.0 I get > > checking whether strn

Re: [bug-gnulib] Re: AIX tests failures

2006-05-30 Thread Ralf Wildenhues
Hi Bruno, * Bruno Haible wrote on Tue, May 30, 2006 at 09:11:04PM CEST: > > I added your patch to gnulib, with 4 modifications: Thanks for applying, your modifications are all good. > > + test $gl_cv_func_strndup = no && > > + if test $gl_cv_func_strndup = no; then > > Was this intended redu

Re: [bug-gnulib] AIX tests failures

2006-05-30 Thread Bruno Haible
Ralf Wildenhues wrote: > Tested on AIX 4.3.3, 5.1, 5.2 (first has strnlen and strndup broken, > second has strnlen fixed, last has both fixed) Hmm? My results for AIX 5.1 differ: On AIX 5.1.0.0 I get checking whether strndup is declared... yes checking for working strndup... no checking whether s

Re: [bug-gnulib] Re: AIX tests failures

2006-05-30 Thread Bruno Haible
Ralf Wildenhues wrote: > Not sure if I have much motivation for fighting this into glibc, but > here you go. I'm unsure if conditionalizing away the #undef __strndup > is wrong for some system. > > Tested on AIX 4.3.3, 5.1, 5.2 (first has strnlen and strndup broken, > second has strnlen fixed, las

Re: [bug-gnulib] Handling null pointers to printf

2006-05-30 Thread Bruno Haible
Bruce Korb wrote: > sometimes, I do want the seg fault. So, how about selectable behavior? If you want to always get a SEGV when the user passes a NULL argument, you will have to arrange that through your code. POSIX doesn't guarantee you a SEGV here. 90% of your users, at least, will be on glib