* modules/memchr (Depends-on): Remove intprops.
* modules/memrchr (Depends-on): Likewise.
* modules/memchr2 (Depends-on): Likewise.
* lib/memchr.c (__memchr): Hand-inline the TYPE_MAXIMUM check.
* lib/memrchr.c (__memrchr): Likewise.
* lib/memrchr2.c (memchr2): Likewise.
Reported by Simon Josefsson.
Signed-off-by: Eric Blake <ebb9@byu.net>
+2008-04-28 Eric Blake <ebb9@byu.net>
+
+ Remove intprops dependency.
+ * modules/memchr (Depends-on): Remove intprops.
+ * modules/memrchr (Depends-on): Likewise.
+ * modules/memchr2 (Depends-on): Likewise.
+ * lib/memchr.c (__memchr): Hand-inline the TYPE_MAXIMUM check.
+ * lib/memrchr.c (__memrchr): Likewise.
+ * lib/memrchr2.c (memchr2): Likewise.
+ Reported by Simon Josefsson.
+
2008-04-28 Simon Josefsson <simon@josefsson.org>
* m4/sys_socket_h.m4: Move AC_REQUIRE([AC_C_INLINE]) to top.
* tests/test-memchr.c; New file, based on tests/test-memchr2.c.
2008-04-26 Eric Blake <ebb9@byu.net>
- Bruno Haible <bruno@clisp.org>
+ Bruno Haible <bruno@clisp.org>
* lib/memchr.c: Include intprops.h.
(__memchr): Optimize parallel detection of matching bytes. Rename local
# define BP_SYM(sym) sym
#endif
-#include "intprops.h"
-
#undef __memchr
#ifdef _LIBC
# undef memchr
performance. On 64-bit hardware, unsigned long is generally 64
bits already. Change this typedef to experiment with
performance. */
- typedef unsigned long longword;
+ typedef unsigned long int longword;
const unsigned char *char_ptr;
const longword *longword_ptr;
repeated_one = 0x01010101;
repeated_c = c | (c << 8);
repeated_c |= repeated_c << 16;
- if (0xffffffffU < TYPE_MAXIMUM (longword))
+ if (0xffffffffU < (longword) -1)
{
repeated_one |= repeated_one << 31 << 1;
repeated_c |= repeated_c << 31 << 1;
#include <stdint.h>
#include <string.h>
-#include "intprops.h"
-
/* Return the first address of either C1 or C2 (treated as unsigned
char) that occurs within N bytes of the memory region S. If
neither byte appears, return NULL. */
performance. On 64-bit hardware, unsigned long is generally 64
bits already. Change this typedef to experiment with
performance. */
- typedef unsigned long longword;
+ typedef unsigned long int longword;
const unsigned char *char_ptr;
const longword *longword_ptr;
repeated_c2 = c2 | (c2 << 8);
repeated_c1 |= repeated_c1 << 16;
repeated_c2 |= repeated_c2 << 16;
- if (0xffffffffU < TYPE_MAXIMUM (longword))
+ if (0xffffffffU < (longword) -1)
{
repeated_one |= repeated_one << 31 << 1;
repeated_c1 |= repeated_c1 << 31 << 1;
#include <string.h>
#include <limits.h>
-#include "intprops.h"
-
#undef __memrchr
#ifdef _LIBC
# undef memrchr
performance. On 64-bit hardware, unsigned long is generally 64
bits already. Change this typedef to experiment with
performance. */
- typedef unsigned long longword;
+ typedef unsigned long int longword;
const unsigned char *char_ptr;
const longword *longword_ptr;
repeated_one = 0x01010101;
repeated_c = c | (c << 8);
repeated_c |= repeated_c << 16;
- if (0xffffffffU < TYPE_MAXIMUM (longword))
+ if (0xffffffffU < (longword) -1)
{
repeated_one |= repeated_one << 31 << 1;
repeated_c |= repeated_c << 31 << 1;
m4/memchr.m4
Depends-on:
-intprops
configure.ac:
gl_FUNC_MEMCHR
lib/memchr2.c
Depends-on:
-intprops
stdint
memchr
Depends-on:
extensions
-intprops
string
configure.ac: