configure: don't the check presence of stricmp

_stricmp a Windows thing that is present in all the CRT, even in UCRT.
The stricmp() deprecated variant doesn't seem to exist elsewhere.

In some configuration it's not possible to link with stricmp() even though
_stricmp() is available.
This commit is contained in:
Steve Lhomme 2023-02-22 17:14:09 +01:00
parent 6946b06a17
commit cedea4d018
5 changed files with 4 additions and 8 deletions

View File

@ -28,8 +28,8 @@
int strcasecmp (const char *s1, const char *s2)
{
#ifdef HAVE_STRICMP
return stricmp (s1, s2);
#ifdef _WIN32
return _stricmp (s1, s2);
#else
for (size_t i = 0;; i++)
{

View File

@ -464,9 +464,6 @@
/* Define to 1 if you have the `strdup' function. */
#mesondefine HAVE_STRDUP
/* Define to 1 if you have the `stricmp' function. */
#mesondefine HAVE_STRICMP
/* Define to 1 if you have the `strlcpy' function. */
#mesondefine HAVE_STRLCPY

View File

@ -750,7 +750,7 @@ dnl Check for system libs needed
need_libc=false
dnl Check for usual libc functions
AC_CHECK_FUNCS([accept4 dup3 fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 posix_fadvise setlocale stricmp uselocale wordexp])
AC_CHECK_FUNCS([accept4 dup3 fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 posix_fadvise setlocale uselocale wordexp])
AC_REPLACE_FUNCS([aligned_alloc asprintf atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lfind lldiv localtime_r memrchr nrand48 poll posix_memalign readv recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp vasprintf writev])
AC_REPLACE_FUNCS([gettimeofday])
AC_CHECK_FUNC(fdatasync,,

View File

@ -558,7 +558,6 @@ check_functions = [
['open_memstream', '#include <stdio.h>'],
['pipe2', '#include <unistd.h>'],
['posix_fadvise', '#include <fcntl.h>'],
['stricmp', '#include <string.h>'],
['strcoll', '#include <string.h>'],
['wordexp', '#include <wordexp.h>'],

View File

@ -753,7 +753,7 @@ static uint32_t findDeviceID(char *psz_device_name)
_snwprintf( dev_name, MAXPNAMELEN + 32, device_name_fmt,
caps.szPname, caps.wMid, caps.wPid );
char *u8 = FromWide(dev_name);
if( !stricmp(u8, psz_device_name) )
if( !_stricmp(u8, psz_device_name) )
{
free( u8 );
return i;