[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] strnlen patch to assume C89 or better
From: |
Bruno Haible |
Subject: |
[Bug-gnulib] strnlen patch to assume C89 or better |
Date: |
Wed, 10 Sep 2003 16:24:43 +0200 |
User-agent: |
KMail/1.5 |
May I commit this patch?
* lib/strnlen.c: Include <string.h> unconditionally. Assume it
declares memchr().
* m4/strnlen.m4 (gl_PREREQ_STRNLEN): Remove <string.h> related checks.
*** lib/strnlen.c 9 Jul 2003 22:48:53 -0000 1.9
--- lib/strnlen.c 10 Sep 2003 13:47:01 -0000
***************
*** 21,41 ****
#endif
#undef strnlen
! #if HAVE_STRING_H
! # if !STDC_HEADERS && HAVE_MEMORY_H
! # include <memory.h>
! # endif
! # include <string.h>
! #else
! # include <strings.h>
! #endif
!
! #ifndef HAVE_DECL_MEMCHR
! "this configure-time declaration test was not run"
! #endif
! #if !HAVE_DECL_MEMCHR
! char *memchr ();
! #endif
#undef __strnlen
#undef strnlen
--- 21,27 ----
#endif
#undef strnlen
! #include <string.h>
#undef __strnlen
#undef strnlen
*** m4/strnlen.m4 31 Jan 2003 15:47:03 -0000 1.4
--- m4/strnlen.m4 10 Sep 2003 13:47:02 -0000
***************
*** 1,4 ****
! # strnlen.m4 serial 2
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
--- 1,4 ----
! # strnlen.m4 serial 3
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
***************
*** 24,32 ****
])
# Prerequisites of lib/strnlen.c.
! AC_DEFUN([gl_PREREQ_STRNLEN], [
! AC_REQUIRE([AC_HEADER_STDC])
! AC_CHECK_HEADERS_ONCE(memory.h string.h)
! AC_CHECK_DECLS(memchr)
! ])
--- 24,28 ----
])
# Prerequisites of lib/strnlen.c.
! AC_DEFUN([gl_PREREQ_STRNLEN], [:])
- [Bug-gnulib] strnlen patch to assume C89 or better,
Bruno Haible <=