Just forward Stricmp() in wx/string.h to wxCRT_StricmpA().
Don't redo the tests already done in wx/wxcrtbase.h in wx/string.h too, especially as they were not done correctly there (they didn't take into account the case of MinGW in strict ANSI mode). Just call wxCRT_StricmpA(). This also allows us to get rid of HAVE_STRCASECMP_IN_STRING[S]_H tests in configure. Closes #15349. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
83
configure
vendored
83
configure
vendored
@@ -19934,89 +19934,6 @@ $as_echo "$as_me: WARNING: Building DLLs requires OMF mode, enabled" >&2;}
|
||||
wxUSE_OMF=yes
|
||||
enable_omf=yes
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp() in string.h" >&5
|
||||
$as_echo_n "checking for strcasecmp() in string.h... " >&6; }
|
||||
if ${ac_cv_string_strcasecmp+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
strcasecmp("foo", "bar");
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_string_strcasecmp=yes
|
||||
else
|
||||
ac_cv_string_strcasecmp=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_string_strcasecmp" >&5
|
||||
$as_echo "$ac_cv_string_strcasecmp" >&6; }
|
||||
|
||||
if test x"$ac_cv_string_strcasecmp" = "xyes"; then
|
||||
$as_echo "#define HAVE_STRCASECMP_IN_STRING_H 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp() in strings.h" >&5
|
||||
$as_echo_n "checking for strcasecmp() in strings.h... " >&6; }
|
||||
if ${ac_cv_strings_strcasecmp+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <strings.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
strcasecmp("foo", "bar");
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_strings_strcasecmp=yes
|
||||
else
|
||||
ac_cv_strings_strcasecmp=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_strings_strcasecmp" >&5
|
||||
$as_echo "$ac_cv_strings_strcasecmp" >&6; }
|
||||
|
||||
if test x"$ac_cv_strings_strcasecmp" = "xyes"; then
|
||||
$as_echo "#define HAVE_STRCASECMP_IN_STRINGS_H 1" >>confdefs.h
|
||||
|
||||
else
|
||||
as_fn_error $? "No case-insensitive string comparison function found." "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Reference in New Issue
Block a user