Re: memchr.c and memrchr.c portability fixes

2004-07-29 Thread Paul Eggert
Andreas Schwab <[EMAIL PROTECTED]> writes: > on m68k-linux alignof(type) will always be at most 2, but you > get better performance with a 4-byte aligned pointer. Thanks for mentioning that. I installed this further patch. (I used alignof because md5.c uses it, but with md5.c the performance tr

Re: memchr.c and memrchr.c portability fixes

2004-07-29 Thread Andreas Schwab
Paul Eggert <[EMAIL PROTECTED]> writes: >/* Handle the first few characters by reading one character at a time. > Do this until CHAR_PTR is aligned on a longword boundary. */ >for (char_ptr = (const unsigned char *) s; > - n > 0 && ((unsigned long int) char_ptr > -

memchr.c and memrchr.c portability fixes

2004-07-28 Thread Paul Eggert
I installed these patches, to remove the assumption that sizeof (long) must be either 4 or 8, and also to remove the assumption that a pointer must be castable to an integer in a useful way. 2004-07-28 Paul Eggert <[EMAIL PROTECTED]> * lib/memchr.c: Include , not and . (LONG_MA