Eric Pouech : sc: Enable compilation with long types.

Alexandre Julliard julliard at winehq.org
Mon Feb 7 15:56:04 CST 2022


Module: wine
Branch: master
Commit: 70d4f9b0c65fb7787b7952bc78bc26383e6e3319
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=70d4f9b0c65fb7787b7952bc78bc26383e6e3319

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Mon Feb  7 08:39:37 2022 +0100

sc: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/sc/Makefile.in |  1 -
 programs/sc/sc.c        | 22 +++++++++++-----------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/programs/sc/Makefile.in b/programs/sc/Makefile.in
index 8d6c4ca4e1b..4ee6b86bdc7 100644
--- a/programs/sc/Makefile.in
+++ b/programs/sc/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = sc.exe
 IMPORTS   = advapi32
 
diff --git a/programs/sc/sc.c b/programs/sc/sc.c
index 02b476957d6..6cf27d93ac2 100644
--- a/programs/sc/sc.c
+++ b/programs/sc/sc.c
@@ -220,7 +220,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             CloseServiceHandle( service );
             ret = TRUE;
         }
-        else WINE_TRACE("failed to create service %u\n", GetLastError());
+        else WINE_TRACE("failed to create service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"description" ))
     {
@@ -230,10 +230,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             SERVICE_DESCRIPTIONW sd;
             sd.lpDescription = argc > 3 ? (WCHAR *)argv[3] : NULL;
             ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_DESCRIPTION, &sd );
-            if (!ret) WINE_TRACE("failed to set service description %u\n", GetLastError());
+            if (!ret) WINE_TRACE("failed to set service description %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %u\n", GetLastError());
+        else WINE_TRACE("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"failure" ))
     {
@@ -244,14 +244,14 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             if (parse_failure_params( argc - 3, argv + 3, &sfa ))
             {
                 ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_FAILURE_ACTIONS, &sfa );
-                if (!ret) WINE_TRACE("failed to set service failure actions %u\n", GetLastError());
+                if (!ret) WINE_TRACE("failed to set service failure actions %lu\n", GetLastError());
                 HeapFree( GetProcessHeap(), 0, sfa.lpsaActions );
             }
             else
                 WINE_WARN("failed to parse failure parameters\n");
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %u\n", GetLastError());
+        else WINE_TRACE("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"delete" ))
     {
@@ -259,10 +259,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
         if (service)
         {
             ret = DeleteService( service );
-            if (!ret) WINE_TRACE("failed to delete service %u\n", GetLastError());
+            if (!ret) WINE_TRACE("failed to delete service %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %u\n", GetLastError());
+        else WINE_TRACE("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"start" ))
     {
@@ -270,10 +270,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
         if (service)
         {
             ret = StartServiceW( service, argc - 3, argv + 3 );
-            if (!ret) WINE_TRACE("failed to start service %u\n", GetLastError());
+            if (!ret) WINE_TRACE("failed to start service %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %u\n", GetLastError());
+        else WINE_TRACE("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"stop" ))
     {
@@ -281,10 +281,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
         if (service)
         {
             ret = ControlService( service, SERVICE_CONTROL_STOP, &status );
-            if (!ret) WINE_TRACE("failed to stop service %u\n", GetLastError());
+            if (!ret) WINE_TRACE("failed to stop service %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %u\n", GetLastError());
+        else WINE_TRACE("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"sdset" ))
     {




More information about the wine-cvs mailing list