From c111a49f248d9f972c34bdc1e89f44c57c59a651 Mon Sep 17 00:00:00 2001 From: William Orr Date: Wed, 17 Aug 2016 22:31:20 -0700 Subject: [PATCH] Check for strsep(3) strsep(3) is defined in nbcompat/string.h if nbcompat is installed, guarded by a if !HAVE_STRSEP block. On platforms where strsep(3) itself is a macro, rather than just shadow the definition, this leads to a compiler error at configure time. --- config.h.in | 3 +++ configure | 2 +- configure.ac | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.h.in b/config.h.in index 9469c54..ea4c688 100644 --- a/config.h.in +++ b/config.h.in @@ -129,6 +129,9 @@ /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR +/* Define to 1 if you have the `strsep' function. */ +#undef HAVE_STRSEP + /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR diff --git a/configure b/configure index 5345ca9..491b1b0 100755 --- a/configure +++ b/configure @@ -4307,7 +4307,7 @@ if test "${with_pkginstall+set}" = set; then : fi -for ac_func in dup2 getcwd localeconv memmove memset mkdir putenv regcomp rmdir setenv strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr strstr strtol freopen tcgetpgrp +for ac_func in dup2 getcwd localeconv memmove memset mkdir putenv regcomp rmdir setenv strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr strstr strtol freopen tcgetpgrp strsep do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --git a/configure.ac b/configure.ac index db1e615..80995d3 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,7 @@ AC_ARG_WITH(pkginstall, , ) -AC_CHECK_FUNCS([dup2 getcwd localeconv memmove memset mkdir putenv regcomp rmdir setenv strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr strstr strtol freopen tcgetpgrp]) +AC_CHECK_FUNCS([dup2 getcwd localeconv memmove memset mkdir putenv regcomp rmdir setenv strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr strstr strtol freopen tcgetpgrp strsep]) AC_CHECK_FUNC([pthread_create],, AC_CHECK_LIB(pthread, pthread_create,,