| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it’s not defined;
otherwise this file would not be compiled. Include limits.h,
stdalign.h, stdint.h, verify.h.
(rawmemchr): Prefer uintptr_t to unsigned long and to size_t when
it’s the better type. Verify that longword lacks padding. Use
alignof rather than sizeof when checking alignment. Simplify by
assuming C99 decl-after-statement, and by using multiplication
rather than repeated shifting and OR (modern compilers can
optimize the multiplication if needed). Avoid unnecessary casts.
Don’t assume CHAR_WIDTH is 8. Convert back and forth between void *
to suppress bogus GCC warnings about alignment. Omit a
duplicate assignment to char_ptr.
* modules/rawmemchr (Depends-on): Add stdalign, stdint, verify.
|
|
|
|
|
|
|
| |
* m4/rawmemchr.m4 (gl_FUNC_RAWMEMCHR): Call AC_CHECK_FUNCS instead of
AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_RAWMEMCHR invocations
from here...
* modules/rawmemchr (configure.ac): ... to here.
|
|
|
|
|
|
|
|
| |
* modules/rawmemchr (License): Derived from glibc, so LGPLv2+ is
okay.
Reported by Jim Meyering.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
| |
* lib/rawmemchr.valgrind: New file.
* lib/strchrnul.valgrind: Likewise.
* modules/rawmemchr (Files): Distribute new file.
* modules/strchrnul (Files): Likewise.
Suggested by Bruno Haible.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
|
* modules/string (Makefile.am): New indicator.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set it.
* lib/string.in.h (rawmemchr): Declare when appropriate.
* modules/rawmemchr: New file.
* m4/rawmemchr.m4: Likewise.
* lib/rawmemchr.c: Likewise.
* modules/rawmemchr-tests: Likewise.
* tests/test-rawmemchr.c: Likewise.
* doc/glibc-functions/rawmemchr.texi (rawmemchr): Document
module.
* modules/strchrnul (Depends-on): Add rawmemchr.
* lib/strchrnul.c (strchrnul): Optimize a corner case.
Signed-off-by: Eric Blake <ebb9@byu.net>
|