X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fstrsep.m4;h=887d6889e761874bc713bf3254f1586e5953c70b;hb=0963898828c9a6b76a2cf959f34b4e758fc4e265;hp=430a25805fa4df160ca1131ddf9e9cb28523270d;hpb=68f96cd3ccba2a204c40260321a8832f2eb97092;p=gnulib.git diff --git a/m4/strsep.m4 b/m4/strsep.m4 index 430a25805..887d6889e 100644 --- a/m4/strsep.m4 +++ b/m4/strsep.m4 @@ -1,16 +1,23 @@ -# strsep.m4 serial 1 -dnl Copyright (C) 2002, 2003, 2004 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 -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. +# strsep.m4 serial 9 +dnl Copyright (C) 2002, 2003, 2004, 2007, 2009 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. AC_DEFUN([gl_FUNC_STRSEP], [ - AC_REPLACE_FUNCS(strsep) - AC_CHECK_DECLS_ONCE(strsep) - gl_PREREQ_STRSEP + dnl Persuade glibc to declare strsep(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl The strsep() declaration in lib/string.in.h uses 'restrict'. + AC_REQUIRE([AC_C_RESTRICT]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REPLACE_FUNCS([strsep]) + if test $ac_cv_func_strsep = no; then + HAVE_STRSEP=0 + gl_PREREQ_STRSEP + fi ]) # Prerequisites of lib/strsep.c.