Re: memrchr speed

2008-04-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 4/26/2008 4:38 AM: | Eric Blake asked: |> Also, is anyone interested in making gnulib's memchr and strchrnul more |> efficient by copying the optimizations learned in memchr2? | | Checked in like this: | | 2008-04-26 Eric

Re: extended stdio API on DragonFly

2008-04-26 Thread Bruno Haible
There was no answer from the DragonFly BSD developers. So I'm adding the DragonFly BSD support without their system support. 2008-04-26 Bruno Haible <[EMAIL PROTECTED]> Add tentative support for DragonFly BSD. * lib/stdio-impl.h: Add macros for DragonFly BSD. * lib/fbufm

Re: xstrtol: fix test failure on mingw

2008-04-26 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Sat, Apr 26, 2008 at 06:10:56PM CEST: > > + # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr > > + # does not understand '\r'. > > + if echo solaris | tr -d '\r' | grep solais > /dev/null; then > > s/solais/solaris/ > Likewise in the other files

Re: xstrtol: fix test failure on mingw

2008-04-26 Thread Ralf Wildenhues
Hi Bruno, * Bruno Haible wrote on Sat, Apr 26, 2008 at 02:15:27PM CEST: > 2008-04-26 Bruno Haible <[EMAIL PROTECTED]> > > * tests/test-xstrtol.sh: Work around limitation of an old 'tr' program > on Solaris. > * tests/test-xstrtoimax.sh: Likewise. > * tests/test-xstrtouma

stdio-ext modules: refactoring

2008-04-26 Thread Bruno Haible
In preparation of the DragonflyBSD port, another refactoring. This should help to keep the number of #ifs limited. 2008-04-26 Bruno Haible <[EMAIL PROTECTED]> * lib/stdio-impl.h: New file. * lib/fbufmode.c: Include stdio-impl.h. (fbufmode): Use fp_, remove redundant #def

fflush: refactoring

2008-04-26 Thread Bruno Haible
In preparation of the DragonflyBSD port, this moves a few system dependent tasks to inline functions. 2008-04-26 Bruno Haible <[EMAIL PROTECTED]> * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization, restore_seek_optimization, update_fpos_cache): New functions, extract

Re: tr portability

2008-04-26 Thread Bruno Haible
Eric Blake wrote: > | Maybe the Autoconf manual should contain: please don't put /usr/ucb > | nor '.' in $PATH, and if you must, put it as late as possible. > | Dunno, I don't have a strong opinion on all of this. > > Yes, we could add that, but it won't help the fact that configure is run > by pe

Re: provide inet_?to? declarations in arpa_inet.h

2008-04-26 Thread Bruno Haible
Hi Simon, > I would also favor removing both inet_ntop.h and inet_pton.h, and use > arpa/inet.h for the declarations, as you suggested. Me too. Bruno

Re: setsockopt on mingw

2008-04-26 Thread Bruno Haible
Simon Josefsson wrote: > > # if defined _WIN32 || defined __WIN32__ > > # define setsockopt(a,b,c,d,e) rpl_setsockopt(a,b,c,d,e) > > static inline int > > rpl_setsockopt(int socket, int level, int optname, const void *optval, > >socklen_t optlen) > > { > > return (setsockopt)(soc

Re: setsockopt on mingw

2008-04-26 Thread Bruno Haible
Simon Josefsson wrote: > +# if defined _WIN32 || defined __WIN32__ This is not the right preprocessor test for mingw: It may also evaluate to true on Cygwin. But Cygwin has the right declaration of setsockopt and does not need a fix. The right #if here is #if (defined _WIN32 || defined __WIN32__)

Re: tr portability

2008-04-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 4/26/2008 6:06 AM: | Ralf Wildenhues wrote: |>>> I hear that there really do exist systems in actual use |>>> on which tr still does not honor backslash-escapes like \r and \n. |>> Which platforms, please? |> Solaris 10 /u

Re: tr portability

2008-04-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 4/26/2008 6:16 AM: | | Maybe the Autoconf manual should contain: please don't put /usr/ucb | nor '.' in $PATH, and if you must, put it as late as possible. | Dunno, I don't have a strong opinion on all of this. Yes, we

Re: tr portability

2008-04-26 Thread Ralf Wildenhues
* Bruno Haible wrote on Sat, Apr 26, 2008 at 02:06:17PM CEST: > Ralf Wildenhues wrote: > > > > I hear that there really do exist systems in actual use > > > > on which tr still does not honor backslash-escapes like \r and \n. > > > > > > Which platforms, please? > > > > Solaris 10 /usr/ucb/tr. N

Re: xstrtol: fix test failure on mingw

2008-04-26 Thread Bruno Haible
Ralf Wildenhues wrote: > > > > ! LC_ALL=C tr -d '\r' < t-xstrtoimax.tmp > t-xstrtoimax.xo > > > I hear that there really do exist systems in actual use > > > on which tr still does not honor backslash-escapes like \r and \n. > > > > Which platforms, please? (I use the similar idiom in more than 20

Re: tr portability

2008-04-26 Thread Bruno Haible
Ralf Wildenhues wrote: > > > I hear that there really do exist systems in actual use > > > on which tr still does not honor backslash-escapes like \r and \n. > > > > Which platforms, please? > > Solaris 10 /usr/ucb/tr. Not likely to be early in PATH, but hey, people > do all kinds of weird thing

Re: memchr2 speed, gcc

2008-04-26 Thread Bruno Haible
Eric Blake wrote: > it would be interesting to see your > timings by swapping the typedef to try 64-bit math with newer gcc again. For > that matter, is it worth putting a preprocessor conditional to change the > typedef according to whether the compiler appears to be a new enough version > of

Re: memchr speed

2008-04-26 Thread Bruno Haible
Eric Blake asked: > Also, is anyone interested in making gnulib's memchr and strchrnul more > efficient by copying the optimizations learned in memchr2? Checked in like this: 2008-04-26 Eric Blake <[EMAIL PROTECTED]> Bruno Haible <[EMAIL PROTECTED]> * lib/memchr.c: Includ

memchr module

2008-04-26 Thread Bruno Haible
The memchr module is broken since 2000-10-28: Instead of defining a function memchr(), it defines a function __memchr(). It should have led to link errors any time it was really used. I am fixing it like this. But we could just as well remove this module, since no such link errors were reported in

Re: memchr2 speed, gcc

2008-04-26 Thread Bruno Haible
Eric Blake wrote: > Looks good to me Applied, thanks. > except for: > > | > | ! /* Compute auxiliary longword values: > | ! repeated_one is a value which has a 1 in every byte. > | ! repeated_c1 has a c1 in every byte. > | ! repeated_c2 has a c2 in every byte. */ > | ! repeat