Blame m4/string_h.m4

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