set(HAVE_BOOL_T "${HAVE_STDBOOL_H}")
set(HAVE_STRTOLL 1)
set(HAVE_BASENAME 1)
- set(HAVE_STRCASECMP 1)
set(HAVE_FTRUNCATE 1)
set(HAVE_SYS_PARAM_H 1)
set(HAVE_SYS_TIME_H 1)
set(HAVE_OPENDIR 1)
else()
set(HAVE_LIBGEN_H 0)
- set(HAVE_STRCASECMP 0)
set(HAVE_FTRUNCATE 0)
set(HAVE_SYS_PARAM_H 0)
set(HAVE_SYS_TIME_H 0)
set(HAVE_SOCKET 1)
set(HAVE_SELECT 1)
set(HAVE_STRDUP 1)
-set(HAVE_STRICMP 1)
-set(HAVE_STRCMPI 1)
set(HAVE_MEMRCHR 0)
set(HAVE_CLOSESOCKET 1)
set(HAVE_SIGSETJMP 0)
check_symbol_exists("select" "${CURL_INCLUDES}" HAVE_SELECT) # proto/bsdsocket.h sys/select.h sys/socket.h
check_symbol_exists("strdup" "string.h" HAVE_STRDUP)
check_symbol_exists("strtok_r" "string.h" HAVE_STRTOK_R)
-check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
-check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
-check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
check_symbol_exists("memrchr" "string.h" HAVE_MEMRCHR)
check_symbol_exists("alarm" "unistd.h" HAVE_ALARM)
check_symbol_exists("fcntl" "fcntl.h" HAVE_FCNTL)
check_function_exists("setmode" HAVE_SETMODE)
check_function_exists("setrlimit" HAVE_SETRLIMIT)
+if(NOT WIN32)
+ check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
+ check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
+ check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
+endif()
+
if(WIN32 OR CYGWIN)
check_function_exists("_setmode" HAVE__SETMODE)
endif()
CURL_CHECK_FUNC_SIGSETJMP
CURL_CHECK_FUNC_SOCKET
CURL_CHECK_FUNC_SOCKETPAIR
-CURL_CHECK_FUNC_STRCASECMP
-CURL_CHECK_FUNC_STRCMPI
CURL_CHECK_FUNC_STRDUP
CURL_CHECK_FUNC_STRERROR_R
-CURL_CHECK_FUNC_STRICMP
CURL_CHECK_FUNC_STRTOK_R
CURL_CHECK_FUNC_STRTOLL
utimes \
])
+if test "$curl_cv_native_windows" != 'yes'; then
+ CURL_CHECK_FUNC_STRCASECMP
+ CURL_CHECK_FUNC_STRCMPI
+ CURL_CHECK_FUNC_STRICMP
+fi
+
if test "$curl_cv_native_windows" = 'yes' -o "$curl_cv_cygwin" = 'yes'; then
AC_CHECK_FUNCS([_setmode])
fi
/* Define if you have the socket function. */
#define HAVE_SOCKET 1
-/* Define if you have the strcasecmp function. */
-#if defined(__MINGW32__)
-#define HAVE_STRCASECMP 1
-#endif
-
/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
-/* Define if you have the stricmp function. */
-#define HAVE_STRICMP 1
-
/* Define if you have the strtoll function. */
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
#define HAVE_STRTOLL 1
/* Define if you have the socket function. */
#define HAVE_SOCKET 1
-/* Define if you have the strcasecmp function. */
-/* #define HAVE_STRCASECMP 1 */
-
/* Define if you have the strdup function. */
/* #define HAVE_STRDUP 1 */
-/* Define if you have the stricmp function. */
-/* #define HAVE_STRICMP 1 */
-
/* Define if you have the strtoll function. */
#if defined(__MINGW32__)
#define HAVE_STRTOLL 1
# include "tool_strdup.h"
#endif
+#if defined(_WIN32)
+# define CURL_STRICMP(p1, p2) _stricmp(p1, p2)
+#elif defined(HAVE_STRCASECMP)
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
+# define CURL_STRICMP(p1, p2) strcasecmp(p1, p2)
+#elif defined(HAVE_STRCMPI)
+# define CURL_STRICMP(p1, p2) strcmpi(p1, p2)
+#elif defined(HAVE_STRICMP)
+# define CURL_STRICMP(p1, p2) stricmp(p1, p2)
+#else
+# define CURL_STRICMP(p1, p2) strcmp(p1, p2)
+#endif
+
#if defined(_WIN32)
/* set in win32_init() */
extern LARGE_INTEGER tool_freq;
***************************************************************************/
#include "tool_setup.h"
-#if defined(HAVE_STRCASECMP) && defined(HAVE_STRINGS_H)
-#include <strings.h>
-#endif
-
#include "tool_util.h"
#include "curlx.h"
return p2 ? -1 : 0;
if(!p2)
return 1;
-#ifdef HAVE_STRCASECMP
- return strcasecmp(p1, p2);
-#elif defined(HAVE_STRCMPI)
- return strcmpi(p1, p2);
-#elif defined(HAVE_STRICMP)
- return stricmp(p1, p2);
-#else
- return strcmp(p1, p2);
-#endif
+ return CURL_STRICMP(p1, p2);
}
/* Indirect version to use as qsort callback. */