From: Viktor Szakats Date: Sun, 12 Jan 2025 10:57:24 +0000 (+0100) Subject: config: drop unused code and variables X-Git-Tag: curl-8_12_0~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=231f868a4d24689b18080ecf54813151ae71665b;p=thirdparty%2Fcurl.git config: drop unused code and variables - cmake, config-*: drop unused `PACKAGE*`, `VERSION` variables. - config-win32: indentation - config-win32ce: drop mingw-specific code. This header is not used with MinGW. - config-win32ce: `_WIN64` is never true for Windows CE, drop. Closes #15978 --- diff --git a/lib/config-os400.h b/lib/config-os400.h index 556e83765d..0bbbc514dd 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -30,11 +30,6 @@ #pragma enum(int) -#undef PACKAGE - -/* Version number of this archive. */ -#undef VERSION - /* Define cpu-machine-OS */ #ifndef CURL_OS #define CURL_OS "OS/400" @@ -199,9 +194,6 @@ /* Define if you have the header file. */ #define HAVE_UNISTD_H -/* Name of package */ -#undef PACKAGE - /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 diff --git a/lib/config-plan9.h b/lib/config-plan9.h index 699291a1ed..8763d1e929 100644 --- a/lib/config-plan9.h +++ b/lib/config-plan9.h @@ -35,13 +35,6 @@ #ifndef CURL_OS #define CURL_OS "plan9" #endif -#define PACKAGE "curl" -#define PACKAGE_NAME "curl" -#define PACKAGE_BUGREPORT "a suitable mailing list: https://curl.se/mail/" -#define PACKAGE_STRING "curl -" -#define PACKAGE_TARNAME "curl" -#define PACKAGE_VERSION "-" -#define VERSION "0.0.0" /* TODO */ #define STDC_HEADERS 1 diff --git a/lib/config-riscos.h b/lib/config-riscos.h index 28c3bdfb06..65ca53e222 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -28,12 +28,6 @@ /* Hand crafted config file for RISC OS */ /* ================================================================ */ -/* Name of this package! */ -#undef PACKAGE - -/* Version number of this archive. */ -#undef VERSION - /* Define cpu-machine-OS */ #ifndef CURL_OS #define CURL_OS "ARM-RISC OS" @@ -180,9 +174,6 @@ /* Define if you have the header file. */ #define HAVE_UNISTD_H -/* Name of package */ -#undef PACKAGE - /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 diff --git a/lib/config-win32.h b/lib/config-win32.h index e5066befa1..236182f87e 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -337,10 +337,10 @@ /* VS2008 default target settings and minimum build target check. */ #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_MSC_VER <= 1600) # ifndef _WIN32_WINNT -# define _WIN32_WINNT VS2008_DEF_TARGET +# define _WIN32_WINNT VS2008_DEF_TARGET # endif # ifndef WINVER -# define WINVER VS2008_DEF_TARGET +# define WINVER VS2008_DEF_TARGET # endif # if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET) # error VS2008 does not support Windows build targets prior to Windows 2000 @@ -350,10 +350,10 @@ /* VS2012 default target settings and minimum build target check. */ #if defined(_MSC_VER) && (_MSC_VER >= 1700) # ifndef _WIN32_WINNT -# define _WIN32_WINNT VS2012_DEF_TARGET +# define _WIN32_WINNT VS2012_DEF_TARGET # endif # ifndef WINVER -# define WINVER VS2012_DEF_TARGET +# define WINVER VS2012_DEF_TARGET # endif # if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET) # if defined(_USING_V110_SDK71_) @@ -473,9 +473,6 @@ Vista #endif #endif -/* Name of package */ -#define PACKAGE "curl" - /* If you want to build curl with the built-in manual */ #define USE_MANUAL 1 diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index b01c2187f2..6012ceb511 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -78,9 +78,7 @@ /* #define HAVE_TERMIOS_H 1 */ /* Define if you have the header file. */ -#if defined(__MINGW32__) -#define HAVE_UNISTD_H 1 -#endif +/* #define HAVE_UNISTD_H 1 */ /* ---------------------------------------------------------------- */ /* OTHER HEADER INFO */ @@ -118,9 +116,7 @@ /* #define HAVE_STRDUP 1 */ /* Define if you have the strtoll function. */ -#if defined(__MINGW32__) -#define HAVE_STRTOLL 1 -#endif +/* #define HAVE_STRTOLL 1 */ /* Define if you have the utime function. */ #define HAVE_UTIME 1 @@ -172,11 +168,7 @@ #define in_addr_t unsigned long /* Define if ssize_t is not an available 'typedefed' type. */ -#if defined(_WIN64) -#define ssize_t __int64 -#else #define ssize_t int -#endif /* ---------------------------------------------------------------- */ /* TYPE SIZES */ @@ -192,11 +184,7 @@ #define SIZEOF_LONG 4 /* Define to the size of `size_t', as computed by sizeof. */ -#if defined(_WIN64) -# define SIZEOF_SIZE_T 8 -#else -# define SIZEOF_SIZE_T 4 -#endif +#define SIZEOF_SIZE_T 4 /* ---------------------------------------------------------------- */ /* STRUCT RELATED */ @@ -250,9 +238,6 @@ #define CURL_OS "i386-pc-win32ce" #endif -/* Name of package */ -#define PACKAGE "curl" - /* ---------------------------------------------------------------- */ /* Windows CE */ /* ---------------------------------------------------------------- */ diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 778e073370..b631878ea2 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -631,24 +631,6 @@ /* cpu-machine-OS */ #cmakedefine CURL_OS ${CURL_OS} -/* Name of package */ -#cmakedefine PACKAGE ${PACKAGE} - -/* Define to the address where bug reports for this package should be sent. */ -#cmakedefine PACKAGE_BUGREPORT ${PACKAGE_BUGREPORT} - -/* Define to the full name of this package. */ -#cmakedefine PACKAGE_NAME ${PACKAGE_NAME} - -/* Define to the full name and version of this package. */ -#cmakedefine PACKAGE_STRING ${PACKAGE_STRING} - -/* Define to the one symbol short name of this package. */ -#cmakedefine PACKAGE_TARNAME ${PACKAGE_TARNAME} - -/* Define to the version of this package. */ -#cmakedefine PACKAGE_VERSION ${PACKAGE_VERSION} - /* Note: SIZEOF_* variables are fetched with CMake through check_type_size(). As per CMake documentation on CheckTypeSize, C preprocessor code is @@ -797,9 +779,6 @@ ${SIZEOF_TIME_T_CODE} /* enable multiple SSL backends */ #cmakedefine CURL_WITH_MULTI_SSL 1 -/* Version number of package */ -#cmakedefine VERSION ${VERSION} - /* Number of bits in a file offset, on hosts where this is settable. */ #cmakedefine _FILE_OFFSET_BITS ${_FILE_OFFSET_BITS}