]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix data types on Windows 588/head
authorRose <83477269+AtariDreams@users.noreply.github.com>
Wed, 18 Jan 2023 22:32:21 +0000 (17:32 -0500)
committerRose <83477269+AtariDreams@users.noreply.github.com>
Thu, 19 Jan 2023 15:53:47 +0000 (10:53 -0500)
cups/usersys.c

index 0c6f94f078ba664b27c18c47b8fee9a68d72f4aa..21352bbe465523eb51d67b319424b15d6c46a4e6 100644 (file)
@@ -593,7 +593,6 @@ cupsSetUserAgent(const char *user_agent)/* I - User-Agent string or @code NULL@
   * Gather Windows version information for the User-Agent string...
   */
 
-  typedef LONG NTSTATUS, *PNTSTATUS;
   typedef NTSTATUS(WINAPI * RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
 
   RtlGetVersionPtr RtlGetVersionInternal = (RtlGetVersionPtr)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlGetVersion");
@@ -632,9 +631,9 @@ cupsSetUserAgent(const char *user_agent)/* I - User-Agent string or @code NULL@
   }
 
   if (cg->uatokens == _CUPS_UATOKENS_OS)
-    snprintf(cg->user_agent, sizeof(cg->user_agent), CUPS_MINIMAL " (Windows %u.%u) IPP/2.0", version.dwMajorVersion, version.dwMinorVersion);
+    snprintf(cg->user_agent, sizeof(cg->user_agent), CUPS_MINIMAL " (Windows %lu.%lu) IPP/2.0", version.dwMajorVersion, version.dwMinorVersion);
   else
-    snprintf(cg->user_agent, sizeof(cg->user_agent), CUPS_MINIMAL " (Windows %u.%u; %s) IPP/2.0", version.dwMajorVersion, version.dwMinorVersion, machine);
+    snprintf(cg->user_agent, sizeof(cg->user_agent), CUPS_MINIMAL " (Windows %lu.%lu; %s) IPP/2.0", version.dwMajorVersion, version.dwMinorVersion, machine);
 
 #elif defined(__APPLE__)
  /*