From d3a97696d785af4fd1c00254b3b26150d915f921 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 16 Oct 2018 15:31:09 -0400 Subject: [PATCH] Fix build issues, add missing files. --- cups/string-private.h | 4 ++-- cups/tls-sspi.c | 12 +++++++---- cups/versioning.h | 4 +++- vcnet/config.h | 10 ++++----- vcnet/cupstestppd.vcxproj.user | 4 ++++ vcnet/ippfind.vcxproj.user | 4 ++++ vcnet/ippserver.vcxproj.user | 4 ++++ vcnet/ipptool.vcxproj.user | 4 ++++ vcnet/libcups2.vcxproj | 38 ++++++++++++++++++++-------------- vcnet/libcups2.vcxproj.filters | 37 ++++++++++++++------------------- vcnet/libcups2.vcxproj.user | 4 ++++ vcnet/packages.config | 5 +++++ vcnet/regex.vcxproj.user | 4 ++++ vcnet/testfile.vcxproj.user | 4 ++++ vcnet/testhttp.vcxproj.user | 4 ++++ 15 files changed, 94 insertions(+), 48 deletions(-) create mode 100644 vcnet/cupstestppd.vcxproj.user create mode 100644 vcnet/ippfind.vcxproj.user create mode 100644 vcnet/ippserver.vcxproj.user create mode 100644 vcnet/ipptool.vcxproj.user create mode 100644 vcnet/libcups2.vcxproj.user create mode 100644 vcnet/packages.config create mode 100644 vcnet/regex.vcxproj.user create mode 100644 vcnet/testfile.vcxproj.user create mode 100644 vcnet/testhttp.vcxproj.user diff --git a/cups/string-private.h b/cups/string-private.h index 300da9376..e1ae603a5 100644 --- a/cups/string-private.h +++ b/cups/string-private.h @@ -15,6 +15,7 @@ * Include necessary headers... */ +# include "config.h" # include # include # include @@ -23,7 +24,6 @@ # include # include -# include "config.h" # include # ifdef HAVE_STRING_H @@ -148,7 +148,7 @@ extern int _cups_toupper(int ch); * Prototypes... */ -extern ssize_t _cups_safe_vsnprintf(char *, size_t, const char *, va_list) _CUPS_PRIVATE; +extern ssize_t _cups_safe_vsnprintf(char *buffer, size_t bufsize, const char *format, va_list args) _CUPS_PRIVATE; extern void _cups_strcpy(char *dst, const char *src) _CUPS_PRIVATE; # ifndef HAVE_STRDUP diff --git a/cups/tls-sspi.c b/cups/tls-sspi.c index 5e2ec55b8..91c8961f2 100644 --- a/cups/tls-sspi.c +++ b/cups/tls-sspi.c @@ -1761,18 +1761,22 @@ http_sspi_find_credentials( #ifdef SP_PROT_TLS1_2_SERVER if (http->mode == _HTTP_MODE_SERVER) { - if (tls_options & _HTTP_TLS_DENY_TLS10) + if (tls_min_version > _HTTP_TLS_1_1) + SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_SERVER; + else if (tls_min_version > _HTTP_TLS_1_0) SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_1_SERVER; - else if (tls_options & _HTTP_TLS_ALLOW_SSL3) + else if (tls_min_version == _HTTP_TLS_SSL3) SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_0_SERVER | SP_PROT_SSL3_SERVER; else SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_0_SERVER; } else { - if (tls_options & _HTTP_TLS_DENY_TLS10) + if (tls_min_version > _HTTP_TLS_1_1) + SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT; + else if (tls_min_version > _HTTP_TLS_1_0) SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_1_CLIENT; - else if (tls_options & _HTTP_TLS_ALLOW_SSL3) + else if (tls_min_version == _HTTP_TLS_SSL3) SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_0_CLIENT | SP_PROT_SSL3_CLIENT; else SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_0_CLIENT; diff --git a/cups/versioning.h b/cups/versioning.h index 1ee7b78c4..eb7a9164a 100644 --- a/cups/versioning.h +++ b/cups/versioning.h @@ -65,6 +65,8 @@ /* GCC 4.5 or higher */ # define _CUPS_HAS_DEPRECATED_WITH_MESSAGE # endif /* __GNUC__ >= 5 */ +# elif defined(_WIN32) +# define __attribute__(...) # endif /* __has_extension */ @@ -77,7 +79,7 @@ # define _CUPS_INTERNAL __attribute__ ((visibility("hidden"))) # define _CUPS_PRIVATE __attribute__ ((visibility("default"))) # define _CUPS_PUBLIC __attribute__ ((visibility("default"))) -# elif defined(_WIN32) && defined(LIBCUPS2_EXPORTS) +# elif defined(_WIN32) && defined(LIBCUPS2_EXPORTS) && 0 # define _CUPS_INTERNAL # define _CUPS_PRIVATE __declspec(dllexport) # define _CUPS_PUBLIC __declspec(dllexport) diff --git a/vcnet/config.h b/vcnet/config.h index bf7a4cd72..d7b62d65e 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -1,7 +1,7 @@ /* * Configuration file for CUPS on Windows. * - * Copyright 2007-2017 by Apple Inc. + * Copyright 2007-2018 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * Licensed under Apache License v2.0. See the file "LICENSE" for more information. @@ -48,12 +48,12 @@ /* - * Map the POSIX strcasecmp() and strncasecmp() functions to the Win32 stricmp() - * and strnicmp() functions... + * Map the POSIX strcasecmp() and strncasecmp() functions to the Win32 _stricmp() + * and _strnicmp() functions... */ -#define strcasecmp stricmp -#define strncasecmp strnicmp +#define strcasecmp _stricmp +#define strncasecmp _strnicmp /* diff --git a/vcnet/cupstestppd.vcxproj.user b/vcnet/cupstestppd.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/cupstestppd.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcnet/ippfind.vcxproj.user b/vcnet/ippfind.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/ippfind.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcnet/ippserver.vcxproj.user b/vcnet/ippserver.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/ippserver.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcnet/ipptool.vcxproj.user b/vcnet/ipptool.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/ipptool.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcnet/libcups2.vcxproj b/vcnet/libcups2.vcxproj index e7ff067ce..cb656618d 100644 --- a/vcnet/libcups2.vcxproj +++ b/vcnet/libcups2.vcxproj @@ -28,22 +28,22 @@ DynamicLibrary v141 - MultiByte + Unicode DynamicLibrary v141 - MultiByte + Unicode DynamicLibrary v141 - MultiByte + Unicode DynamicLibrary v141 - MultiByte + Unicode @@ -103,7 +103,7 @@ /NODEFAULTLIB:libcmt %(AdditionalOptions) - ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies) + ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true @@ -132,7 +132,7 @@ ProgramDatabase - ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies) + ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true @@ -154,7 +154,7 @@ /NODEFAULTLIB:libcmt %(AdditionalOptions) - ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies) + ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true @@ -185,7 +185,7 @@ ProgramDatabase - ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies) + ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true @@ -218,7 +218,6 @@ xcopy /I/Y "$(TargetPath)" WIN32;%(PreprocessorDefinitions) WIN32;%(PreprocessorDefinitions) - @@ -350,7 +349,6 @@ xcopy /I/Y "$(TargetPath)" - WIN32;%(PreprocessorDefinitions) WIN32;%(PreprocessorDefinitions) @@ -392,11 +390,12 @@ xcopy /I/Y "$(TargetPath)" + + - @@ -406,21 +405,21 @@ xcopy /I/Y "$(TargetPath)" - + - - - + + + @@ -431,5 +430,14 @@ xcopy /I/Y "$(TargetPath)" + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/vcnet/libcups2.vcxproj.filters b/vcnet/libcups2.vcxproj.filters index 1fc2c56a4..43c138bee 100644 --- a/vcnet/libcups2.vcxproj.filters +++ b/vcnet/libcups2.vcxproj.filters @@ -24,9 +24,6 @@ Source Files - - Source Files - Source Files @@ -108,9 +105,6 @@ Source Files - - Source Files - Source Files @@ -182,6 +176,7 @@ Source Files + @@ -190,9 +185,6 @@ Header Files - - Header Files - Header Files @@ -223,9 +215,6 @@ Header Files - - Header Files - Header Files @@ -235,15 +224,6 @@ Header Files - - Header Files - - - Header Files - - - Header Files - Header Files @@ -268,5 +248,20 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + \ No newline at end of file diff --git a/vcnet/libcups2.vcxproj.user b/vcnet/libcups2.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/libcups2.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcnet/packages.config b/vcnet/packages.config new file mode 100644 index 000000000..b3de1dad0 --- /dev/null +++ b/vcnet/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/vcnet/regex.vcxproj.user b/vcnet/regex.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/regex.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcnet/testfile.vcxproj.user b/vcnet/testfile.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/testfile.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcnet/testhttp.vcxproj.user b/vcnet/testhttp.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/vcnet/testhttp.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file -- 2.39.2