]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix build issues, add missing files.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Oct 2018 19:31:09 +0000 (15:31 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Oct 2018 19:31:09 +0000 (15:31 -0400)
15 files changed:
cups/string-private.h
cups/tls-sspi.c
cups/versioning.h
vcnet/config.h
vcnet/cupstestppd.vcxproj.user [new file with mode: 0644]
vcnet/ippfind.vcxproj.user [new file with mode: 0644]
vcnet/ippserver.vcxproj.user [new file with mode: 0644]
vcnet/ipptool.vcxproj.user [new file with mode: 0644]
vcnet/libcups2.vcxproj
vcnet/libcups2.vcxproj.filters
vcnet/libcups2.vcxproj.user [new file with mode: 0644]
vcnet/packages.config [new file with mode: 0644]
vcnet/regex.vcxproj.user [new file with mode: 0644]
vcnet/testfile.vcxproj.user [new file with mode: 0644]
vcnet/testhttp.vcxproj.user [new file with mode: 0644]

index 300da93765e690925a4c47a14125e5fdea2f12a0..e1ae603a51e5d9bed01f0f29a18c43286de76935 100644 (file)
@@ -15,6 +15,7 @@
  * Include necessary headers...
  */
 
+#  include "config.h"
 #  include <stdio.h>
 #  include <stdlib.h>
 #  include <stdarg.h>
@@ -23,7 +24,6 @@
 #  include <locale.h>
 #  include <time.h>
 
-#  include "config.h"
 #  include <cups/versioning.h>
 
 #  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
index 5e2ec55b8fc1d361182800d190e51b12dc699aaf..91c8961f280d9c62cd6b82e1e0b3788468325615 100644 (file)
@@ -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;
index 1ee7b78c49cdc547d05f1ebc6dda4fbde271af72..eb7a9164a97e75c0e708d862f38b29cfaf7acee3 100644 (file)
@@ -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)
index bf7a4cd725e313eb89834c3f87c933559771e06f..d7b62d65e1a9c3850f5cda8561a1052e60799911 100644 (file)
@@ -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.
 
 
 /*
- * 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 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file
diff --git a/vcnet/ippfind.vcxproj.user b/vcnet/ippfind.vcxproj.user
new file mode 100644 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file
diff --git a/vcnet/ippserver.vcxproj.user b/vcnet/ippserver.vcxproj.user
new file mode 100644 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file
diff --git a/vcnet/ipptool.vcxproj.user b/vcnet/ipptool.vcxproj.user
new file mode 100644 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file
index e7ff067ce2c4a1369c6c91ca72e1c6ec08d88d64..cb656618d02299ff616d0123b81e24fcb4590203 100644 (file)
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <PlatformToolset>v141</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <PlatformToolset>v141</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <PlatformToolset>v141</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <PlatformToolset>v141</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
     </ClCompile>
     <Link>
       <AdditionalOptions>/NODEFAULTLIB:libcmt %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)libcups2.dll</OutputFile>
       <ModuleDefinitionFile>..\cups\libcups2.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)libcups2.dll</OutputFile>
       <ModuleDefinitionFile>..\cups\libcups2.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </ClCompile>
     <Link>
       <AdditionalOptions>/NODEFAULTLIB:libcmt %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)libcups2.dll</OutputFile>
       <ModuleDefinitionFile>..\cups\libcups2.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;advapi32.lib;zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)libcups2.dll</OutputFile>
       <ModuleDefinitionFile>..\cups\libcups2.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -218,7 +218,6 @@ xcopy /I/Y "$(TargetPath)"
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="..\cups\backend.c" />
     <ClCompile Include="..\cups\debug.c" />
     <ClCompile Include="..\cups\dest-job.c" />
     <ClCompile Include="..\cups\dest-localization.c" />
@@ -350,7 +349,6 @@ xcopy /I/Y "$(TargetPath)"
     <ClCompile Include="..\cups\raster-stream.c" />
     <ClCompile Include="..\cups\raster-stubs.c" />
     <ClCompile Include="..\cups\request.c" />
-    <ClCompile Include="..\cups\snmp.c" />
     <ClCompile Include="..\cups\snprintf.c">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -392,11 +390,12 @@ xcopy /I/Y "$(TargetPath)"
   </ItemGroup>
   <ItemGroup>
     <None Include="..\cups\libcups2.def" />
+    <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\cups\adminutil.h" />
+    <ClInclude Include="..\cups\array-private.h" />
     <ClInclude Include="..\cups\array.h" />
-    <ClInclude Include="..\cups\backend.h" />
     <ClInclude Include="..\cups\cups-private.h" />
     <ClInclude Include="..\cups\cups.h" />
     <ClInclude Include="..\cups\debug-private.h" />
@@ -406,21 +405,21 @@ xcopy /I/Y "$(TargetPath)"
     <ClInclude Include="..\cups\globals.h" />
     <ClInclude Include="..\cups\http-private.h" />
     <ClInclude Include="..\cups\http.h" />
-    <ClInclude Include="..\cups\i18n.h" />
     <ClInclude Include="..\cups\ipp-private.h" />
     <ClInclude Include="..\cups\ipp.h" />
+    <ClInclude Include="..\cups\language-private.h" />
     <ClInclude Include="..\cups\language.h" />
-    <ClInclude Include="..\cups\md5-apple.h" />
-    <ClInclude Include="..\cups\md5.h" />
-    <ClInclude Include="..\cups\normalize.h" />
+    <ClInclude Include="..\cups\md5-private.h" />
     <ClInclude Include="..\cups\ppd-private.h" />
     <ClInclude Include="..\cups\ppd.h" />
     <ClInclude Include="..\cups\pwg-private.h" />
+    <ClInclude Include="..\cups\pwg.h" />
     <ClInclude Include="..\cups\raster-private.h" />
     <ClInclude Include="..\cups\raster.h" />
     <ClInclude Include="..\cups\string-private.h" />
     <ClInclude Include="..\cups\thread-private.h" />
     <ClInclude Include="..\cups\transcode.h" />
+    <ClInclude Include="..\cups\versioning.h" />
     <ClInclude Include="config.h" />
   </ItemGroup>
   <ItemGroup>
@@ -431,5 +430,14 @@ xcopy /I/Y "$(TargetPath)"
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
+    <Import Project="packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
+    <Import Project="packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
   </ImportGroup>
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>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}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets'))" />
+    <Error Condition="!Exists('packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets'))" />
+  </Target>
 </Project>
\ No newline at end of file
index 1fc2c56a4cfc9f91b66e31a973b34a9e310b2c43..43c138beee885e507a33d42e488c768d52014971 100644 (file)
@@ -24,9 +24,6 @@
     <ClCompile Include="..\cups\auth.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\cups\backend.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\cups\debug.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\cups\request.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\cups\snmp.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\cups\snprintf.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <None Include="..\cups\libcups2.def">
       <Filter>Source Files</Filter>
     </None>
+    <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\cups\adminutil.h">
     <ClInclude Include="..\cups\array.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\cups\backend.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="config.h">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="..\cups\http.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\cups\i18n.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\cups\ipp-private.h">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="..\cups\language.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\cups\md5-apple.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\cups\md5.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\cups\normalize.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\cups\ppd-private.h">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="..\cups\raster-private.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\cups\array-private.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\cups\versioning.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\cups\language-private.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\cups\md5-private.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\cups\pwg.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/vcnet/libcups2.vcxproj.user b/vcnet/libcups2.vcxproj.user
new file mode 100644 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file
diff --git a/vcnet/packages.config b/vcnet/packages.config
new file mode 100644 (file)
index 0000000..b3de1da
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="grpc.dependencies.zlib" version="1.2.8.10" targetFramework="native" />
+  <package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="native" />
+</packages>
\ No newline at end of file
diff --git a/vcnet/regex.vcxproj.user b/vcnet/regex.vcxproj.user
new file mode 100644 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file
diff --git a/vcnet/testfile.vcxproj.user b/vcnet/testfile.vcxproj.user
new file mode 100644 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file
diff --git a/vcnet/testhttp.vcxproj.user b/vcnet/testhttp.vcxproj.user
new file mode 100644 (file)
index 0000000..be25078
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>
\ No newline at end of file