Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: delete unused feature guards #6645

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions CMake/Platforms/WindowsCache.cmake
Expand Up @@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -89,8 +89,6 @@ if(NOT UNIX)
set(HAVE_INET_ADDR 1)
set(HAVE_INET_NTOA 1)
set(HAVE_INET_NTOA_R 0)
set(HAVE_TCGETATTR 0)
set(HAVE_TCSETATTR 0)
set(HAVE_PERROR 1)
set(HAVE_CLOSESOCKET 1)
set(HAVE_SETVBUF 0)
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Expand Up @@ -1005,8 +1005,6 @@ check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Expand Up @@ -4499,7 +4499,6 @@ CURL_CHECK_FUNC_STRCMPI
CURL_CHECK_FUNC_STRDUP
CURL_CHECK_FUNC_STRERROR_R
CURL_CHECK_FUNC_STRICMP
CURL_CHECK_FUNC_STRNCASECMP
CURL_CHECK_FUNC_STRNCMPI
CURL_CHECK_FUNC_STRNICMP
CURL_CHECK_FUNC_STRSTR
Expand Down
8 changes: 1 addition & 7 deletions lib/config-os400.h
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -352,12 +352,6 @@
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H

/* Define if you have the `tcgetattr' function. */
#undef HAVE_TCGETATTR

/* Define if you have the `tcsetattr' function. */
#undef HAVE_TCSETATTR

/* Define if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H

Expand Down
3 changes: 1 addition & 2 deletions lib/config-plan9.h
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -173,7 +173,6 @@
#define HAVE_STRCASECMP 1
#define HAVE_STRDUP 1
#define HAVE_STRING_H 1
#define HAVE_STRNCASECMP 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOLL 1
Expand Down
8 changes: 1 addition & 7 deletions lib/config-riscos.h
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -329,12 +329,6 @@
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H

/* Define if you have the `tcgetattr' function. */
#define HAVE_TCGETATTR

/* Define if you have the `tcsetattr' function. */
#define HAVE_TCSETATTR

/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H

Expand Down
5 changes: 1 addition & 4 deletions lib/config-vxworks.h
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -568,9 +568,6 @@
/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */

/* Define to 1 if you have the strncasecmp function. */
#define HAVE_STRNCASECMP 1

/* Define to 1 if you have the strncmpi function. */
/* #undef HAVE_STRNCMPI */

Expand Down
9 changes: 0 additions & 9 deletions lib/config-win32.h
Expand Up @@ -258,9 +258,6 @@
/* Define if you have the stricmp function. */
#define HAVE_STRICMP 1

/* Define if you have the strncasecmp function. */
/* #define HAVE_STRNCASECMP 1 */

/* Define if you have the strnicmp function. */
#define HAVE_STRNICMP 1

Expand All @@ -273,12 +270,6 @@
#define HAVE_STRTOLL 1
#endif

/* Define if you have the tcgetattr function. */
/* #define HAVE_TCGETATTR 1 */

/* Define if you have the tcsetattr function. */
/* #define HAVE_TCSETATTR 1 */

/* Define if you have the utime function. */
#ifndef __BORLANDC__
#define HAVE_UTIME 1
Expand Down
11 changes: 1 addition & 10 deletions lib/config-win32ce.h
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -205,9 +205,6 @@
/* Define if you have the stricmp function. */
/* #define HAVE_STRICMP 1 */

/* Define if you have the strncasecmp function. */
/* #define HAVE_STRNCASECMP 1 */

/* Define if you have the strnicmp function. */
/* #define HAVE_STRNICMP 1 */

Expand All @@ -219,12 +216,6 @@
#define HAVE_STRTOLL 1
#endif

/* Define if you have the tcgetattr function. */
/* #define HAVE_TCGETATTR 1 */

/* Define if you have the tcsetattr function. */
/* #define HAVE_TCSETATTR 1 */

/* Define if you have the utime function */
#define HAVE_UTIME 1

Expand Down
3 changes: 0 additions & 3 deletions lib/curl_config.h.cmake
Expand Up @@ -659,9 +659,6 @@
/* Define to 1 if you have the `strlcpy' function. */
#cmakedefine HAVE_STRLCPY 1

/* Define to 1 if you have the strncasecmp function. */
#cmakedefine HAVE_STRNCASECMP 1

/* Define to 1 if you have the strncmpi function. */
#cmakedefine HAVE_STRNCMPI 1

Expand Down
86 changes: 1 addition & 85 deletions m4/curl-functions.m4
Expand Up @@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -6687,90 +6687,6 @@ AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [
fi
])

dnl CURL_CHECK_FUNC_STRNCASECMP
dnl -------------------------------------------------
dnl Verify if strncasecmp is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_strncasecmp, then
dnl HAVE_STRNCASECMP will be defined.

AC_DEFUN([CURL_CHECK_FUNC_STRNCASECMP], [
AC_REQUIRE([CURL_INCLUDES_STRING])dnl
#
tst_links_strncasecmp="unknown"
tst_proto_strncasecmp="unknown"
tst_compi_strncasecmp="unknown"
tst_allow_strncasecmp="unknown"
#
AC_MSG_CHECKING([if strncasecmp can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([strncasecmp])
],[
AC_MSG_RESULT([yes])
tst_links_strncasecmp="yes"
],[
AC_MSG_RESULT([no])
tst_links_strncasecmp="no"
])
#
if test "$tst_links_strncasecmp" = "yes"; then
AC_MSG_CHECKING([if strncasecmp is prototyped])
AC_EGREP_CPP([strncasecmp],[
$curl_includes_string
],[
AC_MSG_RESULT([yes])
tst_proto_strncasecmp="yes"
],[
AC_MSG_RESULT([no])
tst_proto_strncasecmp="no"
])
fi
#
if test "$tst_proto_strncasecmp" = "yes"; then
AC_MSG_CHECKING([if strncasecmp is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_string
]],[[
if(0 != strncasecmp(0, 0, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
tst_compi_strncasecmp="yes"
],[
AC_MSG_RESULT([no])
tst_compi_strncasecmp="no"
])
fi
#
if test "$tst_compi_strncasecmp" = "yes"; then
AC_MSG_CHECKING([if strncasecmp usage allowed])
if test "x$curl_disallow_strncasecmp" != "xyes"; then
AC_MSG_RESULT([yes])
tst_allow_strncasecmp="yes"
else
AC_MSG_RESULT([no])
tst_allow_strncasecmp="no"
fi
fi
#
AC_MSG_CHECKING([if strncasecmp might be used])
if test "$tst_links_strncasecmp" = "yes" &&
test "$tst_proto_strncasecmp" = "yes" &&
test "$tst_compi_strncasecmp" = "yes" &&
test "$tst_allow_strncasecmp" = "yes"; then
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_STRNCASECMP, 1,
[Define to 1 if you have the strncasecmp function.])
curl_cv_func_strncasecmp="yes"
else
AC_MSG_RESULT([no])
curl_cv_func_strncasecmp="no"
fi
])


dnl CURL_CHECK_FUNC_STRNCMPI
dnl -------------------------------------------------
Expand Down