+2004-10-05 Bruno Haible <bruno@clisp.org>
+
+ * strsep.h: Don't declare strsep() if HAVE_STRSEP.
+
2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
* xalloc.h (xmemdup): Renamed from xclone. All uses changed.
#ifndef GNULIB_STRSEP_H_
#define GNULIB_STRSEP_H_
+#if HAVE_STRSEP
+
/*
- * Get strsep, if available.
+ * Get strsep() declaration.
*/
#include <string.h>
+#else
+
/* Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
If one is found, it is overwritten with a NUL, and *STRINGP is advanced
to point to the next char after it. Otherwise, *STRINGP is set to NULL.
extern char *strsep (char **stringp, const char *delim);
+#endif
+
#endif /* GNULIB_STRSEP_H_ */
+2004-10-05 Bruno Haible <bruno@clisp.org>
+
+ * strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
+ for the declaration of strsep.
+
2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
* xalloc.m4 (gl_PREREQ_XSTRDUP): Remove. All uses removed.
-# strsep.m4 serial 1
+# strsep.m4 serial 2
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
AC_DEFUN([gl_FUNC_STRSEP],
[
+ dnl Persuade glibc <string.h> to declare strsep().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
AC_REPLACE_FUNCS(strsep)
- AC_CHECK_DECLS_ONCE(strsep)
gl_PREREQ_STRSEP
])