Branch
Hash :
b2bf05b1
Author :
Date :
2025-02-16T22:32:33
strncasecmp_l: New module. * lib/strings.in.h (strncasecmp_l): New declaration. * lib/strncasecmp_l.c: New file, based on lib/strncasecmp.c. * m4/strncasecmp_l.m4: New file. * m4/strings_h.m4 (gl_STRINGS_H): Test for strncasecmp_l. (gl_STRINGS_H_REQUIRE_DEFAULTS): Initialize GNULIB_STRNCASECMP_L. (gl_STRINGS_H_DEFAULTS): Initialize HAVE_STRNCASECMP_L, REPLACE_STRNCASECMP_L. * modules/strings-h (Makefile.am): Substitute GNULIB_STRNCASECMP_L, HAVE_STRNCASECMP_L, REPLACE_STRNCASECMP_L. * modules/strncasecmp_l: New file. * tests/test-strings-h-c++.cc: Check declaration of strncasecmp_l. * doc/posix-functions/strncasecmp_l.texi: Mention the new module and the macOS, Solaris, Cygwin bugs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
/* Test of <strings.h> substitute in C++ mode.
Copyright (C) 2010-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2017. */
#define GNULIB_NAMESPACE gnulib
#include <config.h>
#include <strings.h>
#include "signature.h"
#if GNULIB_TEST_FFS
SIGNATURE_CHECK (GNULIB_NAMESPACE::ffs, int, (int));
#endif
#if GNULIB_TEST_STRCASECMP_L
SIGNATURE_CHECK (GNULIB_NAMESPACE::strcasecmp_l, int,
(const char *, const char *, locale_t));
#endif
#if GNULIB_TEST_STRNCASECMP_L
SIGNATURE_CHECK (GNULIB_NAMESPACE::strncasecmp_l, int,
(const char *, const char *, size_t, locale_t));
#endif
int
main ()
{
}