summaryrefslogtreecommitdiffstats
path: root/gl/m4/strnlen.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/strnlen.m4')
-rw-r--r--gl/m4/strnlen.m418
1 files changed, 11 insertions, 7 deletions
diff --git a/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4
index 0213a8a..d8307ed 100644
--- a/gl/m4/strnlen.m4
+++ b/gl/m4/strnlen.m4
@@ -1,5 +1,5 @@
1# strnlen.m4 serial 6 1# strnlen.m4 serial 9
2dnl Copyright (C) 2002-2003, 2005, 2006 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -7,11 +7,17 @@ dnl with or without modifications, as long as this notice is preserved.
7AC_DEFUN([gl_FUNC_STRNLEN], 7AC_DEFUN([gl_FUNC_STRNLEN],
8[ 8[
9 dnl Persuade glibc <string.h> to declare strnlen(). 9 dnl Persuade glibc <string.h> to declare strnlen().
10 AC_REQUIRE([AC_GNU_SOURCE]) 10 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
11
12 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
13 AC_CHECK_DECLS_ONCE([strnlen])
14 if test $ac_cv_have_decl_strnlen = no; then
15 HAVE_DECL_STRNLEN=0
16 fi
11 17
12 AC_FUNC_STRNLEN 18 AC_FUNC_STRNLEN
13 if test $ac_cv_func_strnlen_working = no; then 19 if test $ac_cv_func_strnlen_working = no; then
14 # This is necessary because automake-1.6.1 doens't understand 20 # This is necessary because automake-1.6.1 doesn't understand
15 # that the above use of AC_FUNC_STRNLEN means we may have to use 21 # that the above use of AC_FUNC_STRNLEN means we may have to use
16 # lib/strnlen.c. 22 # lib/strnlen.c.
17 #AC_LIBOBJ(strnlen) 23 #AC_LIBOBJ(strnlen)
@@ -22,6 +28,4 @@ AC_DEFUN([gl_FUNC_STRNLEN],
22]) 28])
23 29
24# Prerequisites of lib/strnlen.c. 30# Prerequisites of lib/strnlen.c.
25AC_DEFUN([gl_PREREQ_STRNLEN], [ 31AC_DEFUN([gl_PREREQ_STRNLEN], [:])
26 AC_CHECK_DECLS_ONCE(strnlen)
27])