diff options
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/gnulib-cache.m4 | 3 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 6 | ||||
-rw-r--r-- | gl/m4/strsep.m4 | 25 |
3 files changed, 33 insertions, 1 deletions
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 97b1849b..f23cb519 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl --no-vc-files base64 crypto/sha1 dirname floorf fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex timegm vasprintf vsnprintf +# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl --no-vc-files base64 crypto/sha1 dirname floorf fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex strsep timegm vasprintf vsnprintf # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) @@ -32,6 +32,7 @@ gl_MODULES([ gettext mountlist regex + strsep timegm vasprintf vsnprintf diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index f4031cc7..73e63654 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -106,6 +106,7 @@ AC_DEFUN([gl_EARLY], # Code from module string: # Code from module strndup: # Code from module strnlen: + # Code from module strsep: # Code from module strstr-simple: # Code from module sys_socket: # Code from module sys_stat: @@ -327,6 +328,9 @@ AC_DEFUN([gl_INIT], # Code from module strnlen: gl_FUNC_STRNLEN gl_STRING_MODULE_INDICATOR([strnlen]) + # Code from module strsep: + gl_FUNC_STRSEP + gl_STRING_MODULE_INDICATOR([strsep]) # Code from module strstr-simple: gl_FUNC_STRSTR_SIMPLE gl_STRING_MODULE_INDICATOR([strstr]) @@ -634,6 +638,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/stripslash.c lib/strndup.c lib/strnlen.c + lib/strsep.c lib/strstr.c lib/sys_socket.in.h lib/sys_stat.in.h @@ -762,6 +767,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/string_h.m4 m4/strndup.m4 m4/strnlen.m4 + m4/strsep.m4 m4/strstr.m4 m4/sys_socket_h.m4 m4/sys_stat_h.m4 diff --git a/gl/m4/strsep.m4 b/gl/m4/strsep.m4 new file mode 100644 index 00000000..fb4d396b --- /dev/null +++ b/gl/m4/strsep.m4 @@ -0,0 +1,25 @@ +# strsep.m4 serial 9 +dnl Copyright (C) 2002, 2003, 2004, 2007, 2009, 2010 Free Software Foundation, +dnl 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], +[ + dnl Persuade glibc <string.h> 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. +AC_DEFUN([gl_PREREQ_STRSEP], [:]) |