summaryrefslogtreecommitdiff
path: root/m4/strndup.m4
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-07-13 11:43:40 -0600
committerEric Blake <eblake@redhat.com>2012-07-13 11:46:07 -0600
commit4f96d96883807d8bbffc4695e5a05e96a87c4342 (patch)
treee4467f406aefef099c95e4ebce1ca7585a923fdc /m4/strndup.m4
parentf344d84d02922ae77f6ec46ebce3bed95dc0f02c (diff)
downloadgnulib-4f96d96883807d8bbffc4695e5a05e96a87c4342.tar.gz
strndup: fix m4 usage error
Autoconf guarantees that AC_CHECK_DECLS_ONCE always defines the corresponding HAVE_DECL_*, so checking #ifndef HAVE_DECL_* is bogus. https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html * m4/strndup.m4 (gl_FUNC_STRNDUP): HAVE_DECL_STRNDUP is always defined, to either 0 or 1. Reported by Karel Zak. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'm4/strndup.m4')
-rw-r--r--m4/strndup.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/strndup.m4 b/m4/strndup.m4
index bdde5fe1d2..cef68892a8 100644
--- a/m4/strndup.m4
+++ b/m4/strndup.m4
@@ -1,4 +1,4 @@
-# strndup.m4 serial 20
+# strndup.m4 serial 21
dnl Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_STRNDUP],
[AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <string.h>
#include <stdlib.h>]], [[
-#ifndef HAVE_DECL_STRNDUP
+#if !HAVE_DECL_STRNDUP
extern
#ifdef __cplusplus
"C"