X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstrndup.m4;h=a1f82743f31811db96c7c8090210f9a8f4799880;hb=da8054d48dc22e1c051db54049e005d51a006e69;hp=969e3191a40fbec0ea2f6319d9ff5b560660308f;hpb=5ad9e4b03ed0569378cbb2f29b0c3283f1bbd9c5;p=gnulib.git diff --git a/m4/strndup.m4 b/m4/strndup.m4 index 969e3191a..a1f82743f 100644 --- a/m4/strndup.m4 +++ b/m4/strndup.m4 @@ -1,5 +1,5 @@ -# strndup.m4 serial 19 -dnl Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. +# strndup.m4 serial 21 +dnl Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -24,8 +24,12 @@ AC_DEFUN([gl_FUNC_STRNDUP], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include ]], [[ -#ifndef HAVE_DECL_STRNDUP - extern char *strndup (const char *, size_t); +#if !HAVE_DECL_STRNDUP + extern + #ifdef __cplusplus + "C" + #endif + char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15);