Blame m4/string_h.m4

Packit Service a2489d
# Configure a GNU-like replacement for <string.h>.
Packit Service a2489d
Packit Service a2489d
# Copyright (C) 2007-2018 Free Software Foundation, Inc.
Packit Service a2489d
# This file is free software; the Free Software Foundation
Packit Service a2489d
# gives unlimited permission to copy and/or distribute it,
Packit Service a2489d
# with or without modifications, as long as this notice is preserved.
Packit Service a2489d
Packit Service a2489d
# serial 22
Packit Service a2489d
Packit Service a2489d
# Written by Paul Eggert.
Packit Service a2489d
Packit Service a2489d
AC_DEFUN([gl_HEADER_STRING_H],
Packit Service a2489d
[
Packit Service a2489d
  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
Packit Service a2489d
  dnl once only, before all statements that occur in other macros.
Packit Service a2489d
  AC_REQUIRE([gl_HEADER_STRING_H_BODY])
Packit Service a2489d
])
Packit Service a2489d
Packit Service a2489d
AC_DEFUN([gl_HEADER_STRING_H_BODY],
Packit Service a2489d
[
Packit Service a2489d
  AC_REQUIRE([AC_C_RESTRICT])
Packit Service a2489d
  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
Packit Service a2489d
  gl_NEXT_HEADERS([string.h])
Packit Service a2489d
Packit Service a2489d
  dnl Check for declarations of anything we want to poison if the
Packit Service a2489d
  dnl corresponding gnulib module is not in use, and which is not
Packit Service a2489d
  dnl guaranteed by C89.
Packit Service a2489d
  gl_WARN_ON_USE_PREPARE([[#include <string.h>
Packit Service a2489d
    ]],
Packit Service a2489d
    [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
Packit Service a2489d
     strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
Packit Service a2489d
     strerror_r strsignal strverscmp])
Packit Service a2489d
])
Packit Service a2489d
Packit Service a2489d
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
Packit Service a2489d
[
Packit Service a2489d
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
Packit Service a2489d
  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
Packit Service a2489d
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
Packit Service a2489d
  dnl Define it also as a C macro, for the benefit of the unit tests.
Packit Service a2489d
  gl_MODULE_INDICATOR_FOR_TESTS([$1])
Packit Service a2489d
])
Packit Service a2489d
Packit Service a2489d
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
Packit Service a2489d
[
Packit Service a2489d
  GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
Packit Service a2489d
  GNULIB_FFSL=0;        AC_SUBST([GNULIB_FFSL])
Packit Service a2489d
  GNULIB_FFSLL=0;       AC_SUBST([GNULIB_FFSLL])
Packit Service a2489d
  GNULIB_MEMCHR=0;      AC_SUBST([GNULIB_MEMCHR])
Packit Service a2489d
  GNULIB_MEMMEM=0;      AC_SUBST([GNULIB_MEMMEM])
Packit Service a2489d
  GNULIB_MEMPCPY=0;     AC_SUBST([GNULIB_MEMPCPY])
Packit Service a2489d
  GNULIB_MEMRCHR=0;     AC_SUBST([GNULIB_MEMRCHR])
Packit Service a2489d
  GNULIB_RAWMEMCHR=0;   AC_SUBST([GNULIB_RAWMEMCHR])
Packit Service a2489d
  GNULIB_STPCPY=0;      AC_SUBST([GNULIB_STPCPY])
Packit Service a2489d
  GNULIB_STPNCPY=0;     AC_SUBST([GNULIB_STPNCPY])
Packit Service a2489d
  GNULIB_STRCHRNUL=0;   AC_SUBST([GNULIB_STRCHRNUL])
Packit Service a2489d
  GNULIB_STRDUP=0;      AC_SUBST([GNULIB_STRDUP])
Packit Service a2489d
  GNULIB_STRNCAT=0;     AC_SUBST([GNULIB_STRNCAT])
Packit Service a2489d
  GNULIB_STRNDUP=0;     AC_SUBST([GNULIB_STRNDUP])
Packit Service a2489d
  GNULIB_STRNLEN=0;     AC_SUBST([GNULIB_STRNLEN])
Packit Service a2489d
  GNULIB_STRPBRK=0;     AC_SUBST([GNULIB_STRPBRK])
Packit Service a2489d
  GNULIB_STRSEP=0;      AC_SUBST([GNULIB_STRSEP])
Packit Service a2489d
  GNULIB_STRSTR=0;      AC_SUBST([GNULIB_STRSTR])
Packit Service a2489d
  GNULIB_STRCASESTR=0;  AC_SUBST([GNULIB_STRCASESTR])
Packit Service a2489d
  GNULIB_STRTOK_R=0;    AC_SUBST([GNULIB_STRTOK_R])
Packit Service a2489d
  GNULIB_MBSLEN=0;      AC_SUBST([GNULIB_MBSLEN])
Packit Service a2489d
  GNULIB_MBSNLEN=0;     AC_SUBST([GNULIB_MBSNLEN])
Packit Service a2489d
  GNULIB_MBSCHR=0;      AC_SUBST([GNULIB_MBSCHR])
Packit Service a2489d
  GNULIB_MBSRCHR=0;     AC_SUBST([GNULIB_MBSRCHR])
Packit Service a2489d
  GNULIB_MBSSTR=0;      AC_SUBST([GNULIB_MBSSTR])
Packit Service a2489d
  GNULIB_MBSCASECMP=0;  AC_SUBST([GNULIB_MBSCASECMP])
Packit Service a2489d
  GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
Packit Service a2489d
  GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
Packit Service a2489d
  GNULIB_MBSCASESTR=0;  AC_SUBST([GNULIB_MBSCASESTR])
Packit Service a2489d
  GNULIB_MBSCSPN=0;     AC_SUBST([GNULIB_MBSCSPN])
Packit Service a2489d
  GNULIB_MBSPBRK=0;     AC_SUBST([GNULIB_MBSPBRK])
Packit Service a2489d
  GNULIB_MBSSPN=0;      AC_SUBST([GNULIB_MBSSPN])
Packit Service a2489d
  GNULIB_MBSSEP=0;      AC_SUBST([GNULIB_MBSSEP])
Packit Service a2489d
  GNULIB_MBSTOK_R=0;    AC_SUBST([GNULIB_MBSTOK_R])
Packit Service a2489d
  GNULIB_STRERROR=0;    AC_SUBST([GNULIB_STRERROR])
Packit Service a2489d
  GNULIB_STRERROR_R=0;  AC_SUBST([GNULIB_STRERROR_R])
Packit Service a2489d
  GNULIB_STRSIGNAL=0;   AC_SUBST([GNULIB_STRSIGNAL])
Packit Service a2489d
  GNULIB_STRVERSCMP=0;  AC_SUBST([GNULIB_STRVERSCMP])
Packit Service a2489d
  HAVE_MBSLEN=0;        AC_SUBST([HAVE_MBSLEN])
Packit Service a2489d
  dnl Assume proper GNU behavior unless another module says otherwise.
Packit Service a2489d
  HAVE_EXPLICIT_BZERO=1;        AC_SUBST([HAVE_EXPLICIT_BZERO])
Packit Service a2489d
  HAVE_FFSL=1;                  AC_SUBST([HAVE_FFSL])
Packit Service a2489d
  HAVE_FFSLL=1;                 AC_SUBST([HAVE_FFSLL])
Packit Service a2489d
  HAVE_MEMCHR=1;                AC_SUBST([HAVE_MEMCHR])
Packit Service a2489d
  HAVE_DECL_MEMMEM=1;           AC_SUBST([HAVE_DECL_MEMMEM])
Packit Service a2489d
  HAVE_MEMPCPY=1;               AC_SUBST([HAVE_MEMPCPY])
Packit Service a2489d
  HAVE_DECL_MEMRCHR=1;          AC_SUBST([HAVE_DECL_MEMRCHR])
Packit Service a2489d
  HAVE_RAWMEMCHR=1;             AC_SUBST([HAVE_RAWMEMCHR])
Packit Service a2489d
  HAVE_STPCPY=1;                AC_SUBST([HAVE_STPCPY])
Packit Service a2489d
  HAVE_STPNCPY=1;               AC_SUBST([HAVE_STPNCPY])
Packit Service a2489d
  HAVE_STRCHRNUL=1;             AC_SUBST([HAVE_STRCHRNUL])
Packit Service a2489d
  HAVE_DECL_STRDUP=1;           AC_SUBST([HAVE_DECL_STRDUP])
Packit Service a2489d
  HAVE_DECL_STRNDUP=1;          AC_SUBST([HAVE_DECL_STRNDUP])
Packit Service a2489d
  HAVE_DECL_STRNLEN=1;          AC_SUBST([HAVE_DECL_STRNLEN])
Packit Service a2489d
  HAVE_STRPBRK=1;               AC_SUBST([HAVE_STRPBRK])
Packit Service a2489d
  HAVE_STRSEP=1;                AC_SUBST([HAVE_STRSEP])
Packit Service a2489d
  HAVE_STRCASESTR=1;            AC_SUBST([HAVE_STRCASESTR])
Packit Service a2489d
  HAVE_DECL_STRTOK_R=1;         AC_SUBST([HAVE_DECL_STRTOK_R])
Packit Service a2489d
  HAVE_DECL_STRERROR_R=1;       AC_SUBST([HAVE_DECL_STRERROR_R])
Packit Service a2489d
  HAVE_DECL_STRSIGNAL=1;        AC_SUBST([HAVE_DECL_STRSIGNAL])
Packit Service a2489d
  HAVE_STRVERSCMP=1;            AC_SUBST([HAVE_STRVERSCMP])
Packit Service a2489d
  REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
Packit Service a2489d
  REPLACE_MEMMEM=0;             AC_SUBST([REPLACE_MEMMEM])
Packit Service a2489d
  REPLACE_STPNCPY=0;            AC_SUBST([REPLACE_STPNCPY])
Packit Service a2489d
  REPLACE_STRCHRNUL=0;          AC_SUBST([REPLACE_STRCHRNUL])
Packit Service a2489d
  REPLACE_STRDUP=0;             AC_SUBST([REPLACE_STRDUP])
Packit Service a2489d
  REPLACE_STRNCAT=0;            AC_SUBST([REPLACE_STRNCAT])
Packit Service a2489d
  REPLACE_STRNDUP=0;            AC_SUBST([REPLACE_STRNDUP])
Packit Service a2489d
  REPLACE_STRNLEN=0;            AC_SUBST([REPLACE_STRNLEN])
Packit Service a2489d
  REPLACE_STRSTR=0;             AC_SUBST([REPLACE_STRSTR])
Packit Service a2489d
  REPLACE_STRCASESTR=0;         AC_SUBST([REPLACE_STRCASESTR])
Packit Service a2489d
  REPLACE_STRTOK_R=0;           AC_SUBST([REPLACE_STRTOK_R])
Packit Service a2489d
  REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
Packit Service a2489d
  REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
Packit Service a2489d
  REPLACE_STRSIGNAL=0;          AC_SUBST([REPLACE_STRSIGNAL])
Packit Service a2489d
  UNDEFINE_STRTOK_R=0;          AC_SUBST([UNDEFINE_STRTOK_R])
Packit Service a2489d
])