From: Michael R Sweet Date: Thu, 31 Mar 2022 13:23:41 +0000 (-0400) Subject: Windows build fixes. X-Git-Tag: v2.4.2~29^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63d5b03af84c014a6f26c951fb5a9ccafe04b98e;p=thirdparty%2Fcups.git Windows build fixes. --- diff --git a/cups/cups.h b/cups/cups.h index f22fa01bff..dd0fdfed24 100644 --- a/cups/cups.h +++ b/cups/cups.h @@ -43,10 +43,10 @@ extern "C" { * Constants... */ -# define CUPS_VERSION 2.0401 +# define CUPS_VERSION 2.0402 # define CUPS_VERSION_MAJOR 2 # define CUPS_VERSION_MINOR 4 -# define CUPS_VERSION_PATCH 1 +# define CUPS_VERSION_PATCH 2 # define CUPS_BC_FD 3 /* Back-channel file descriptor for diff --git a/cups/tls-openssl.c b/cups/tls-openssl.c index b0615bfb9d..66f163280f 100644 --- a/cups/tls-openssl.c +++ b/cups/tls-openssl.c @@ -310,7 +310,7 @@ httpCopyCredentials( *credentials = cupsArrayNew(NULL, NULL); chain = SSL_get_peer_cert_chain(http->tls); - DEBUG_printf(("1httpCopyCredentials: cert=%p", cert)); + DEBUG_printf(("1httpCopyCredentials: chain=%p", chain)); if (chain) { @@ -823,7 +823,9 @@ httpSaveCredentials( if ((fp = cupsFileOpen(nfilename, "w")) == NULL) return (-1); +#ifndef _WIN32 fchmod(cupsFileNumber(fp), 0600); +#endif // !_WIN32 for (cred = (http_credential_t *)cupsArrayFirst(credentials); cred; @@ -1343,7 +1345,11 @@ http_default_path( // Pointer to library globals +#ifdef _WIN32 + if (cg->home) +#else if (cg->home && getuid()) +#endif // _WIN32 { snprintf(buffer, bufsize, "%s/.cups", cg->home); if (access(buffer, 0)) diff --git a/vcnet/config.h b/vcnet/config.h index f2bc3dd17c..8bb9212bf4 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -100,8 +100,8 @@ typedef unsigned long useconds_t; * Version of software... */ -#define CUPS_SVERSION "CUPS v2.4.1" -#define CUPS_MINIMAL "CUPS/2.4.1" +#define CUPS_SVERSION "CUPS v2.4.2" +#define CUPS_MINIMAL "CUPS/2.4.2" /* diff --git a/vcnet/cupstestppd.vcxproj b/vcnet/cupstestppd.vcxproj index 6481918261..cebce15b38 100644 --- a/vcnet/cupstestppd.vcxproj +++ b/vcnet/cupstestppd.vcxproj @@ -57,7 +57,7 @@ Disabled - ..;..\vcnet;%(AdditionalIncludeDirectories) + ..;..\vcnet;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks @@ -79,7 +79,7 @@ X64 - ..;..\vcnet;%(AdditionalIncludeDirectories) + ..;..\vcnet;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/vcnet/ippeveprinter.vcxproj b/vcnet/ippeveprinter.vcxproj index 44964bf498..1829e2d7fe 100644 --- a/vcnet/ippeveprinter.vcxproj +++ b/vcnet/ippeveprinter.vcxproj @@ -57,7 +57,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) false EnableFastChecks @@ -80,7 +80,7 @@ X64 - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreadedDLL @@ -115,7 +115,9 @@ + + \ No newline at end of file diff --git a/vcnet/ippfind.vcxproj b/vcnet/ippfind.vcxproj index 7fbd591df7..068470ab36 100644 --- a/vcnet/ippfind.vcxproj +++ b/vcnet/ippfind.vcxproj @@ -57,7 +57,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks @@ -80,7 +80,7 @@ X64 - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/vcnet/ipptool.vcxproj b/vcnet/ipptool.vcxproj index f5695f1f59..836feb3fb7 100644 --- a/vcnet/ipptool.vcxproj +++ b/vcnet/ipptool.vcxproj @@ -57,7 +57,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks @@ -79,7 +79,7 @@ X64 - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/vcnet/libcups2.vcxproj b/vcnet/libcups2.vcxproj index e390be0080..caeca42944 100644 --- a/vcnet/libcups2.vcxproj +++ b/vcnet/libcups2.vcxproj @@ -58,7 +58,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) DEBUG;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -68,7 +68,7 @@ ProgramDatabase - bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) + packages\zeroc.openssl.v143.1.1.1.1\build\native\lib\x64\Release\libssl.lib;packages\zeroc.openssl.v143.1.1.1.1\build\native\lib\x64\Release\libcrypto.lib;bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true @@ -84,7 +84,7 @@ MinSpace - ..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) DEBUG;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL @@ -92,7 +92,7 @@ ProgramDatabase - bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) + packages\zeroc.openssl.v143.1.1.1.1\build\native\lib\x64\Release\libssl.lib;packages\zeroc.openssl.v143.1.1.1.1\build\native\lib\x64\Release\libcrypto.lib;bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true diff --git a/vcnet/libcups2_native.nuspec b/vcnet/libcups2_native.nuspec index 06261da2ed..61c5f31864 100644 --- a/vcnet/libcups2_native.nuspec +++ b/vcnet/libcups2_native.nuspec @@ -3,7 +3,7 @@ libcups2_native OpenPrinting CUPS Library for VS2019+ - 2.4.1.0 + 2.4.2.0 Michael R Sweet, OpenPrinting michaelrsweet https://github.com/OpenPrinting/cups @@ -16,7 +16,7 @@ and other Unix®-like operating systems. The CUPS library provides a convenient Copyright © 2020-2022 by OpenPrinting, Copyright © 2007-2019 by Apple Inc., Copyright © 1997-2007 by Easy Software Products. http ipp native - + diff --git a/vcnet/libcups2_native.redist.nuspec b/vcnet/libcups2_native.redist.nuspec index ee4001a59f..703f92623b 100644 --- a/vcnet/libcups2_native.redist.nuspec +++ b/vcnet/libcups2_native.redist.nuspec @@ -3,7 +3,7 @@ libcups2_native.redist OpenPrinting CUPS Library for VS2019+ Redist - 2.4.1.0 + 2.4.2.0 Michael R Sweet, OpenPrinting michaelrsweet https://github.com/OpenPrinting/cups @@ -26,5 +26,6 @@ and other Unix®-like operating systems. This package provides the redistributab --> + diff --git a/vcnet/packages.config b/vcnet/packages.config index ddf68c66cd..450a90a1a7 100644 --- a/vcnet/packages.config +++ b/vcnet/packages.config @@ -1,5 +1,6 @@  + \ No newline at end of file diff --git a/vcnet/testhttp.vcxproj b/vcnet/testhttp.vcxproj index 99ffc90178..05558f3e74 100644 --- a/vcnet/testhttp.vcxproj +++ b/vcnet/testhttp.vcxproj @@ -54,7 +54,7 @@ Disabled - ..\vcnet;..;%(AdditionalIncludeDirectories) + ..\vcnet;..;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -75,7 +75,7 @@ - ..\vcnet;..;%(AdditionalIncludeDirectories) + ..\vcnet;..;packages\zeroc.openssl.v143.1.1.1.1\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreaded