From ed6a5e97e055fe8dcf424f2b20a8f3accef86a7c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 17 Oct 2019 17:05:47 +0200 Subject: [PATCH] programs: Make all program entrypoints cdecl. Signed-off-by: Alexandre Julliard --- programs/arp/main.c | 2 +- programs/aspnet_regiis/main.c | 2 +- programs/attrib/attrib.c | 2 +- programs/cabarc/cabarc.c | 2 +- programs/cacls/cacls_main.c | 2 +- programs/cmd/wcmdmain.c | 2 +- programs/conhost/conhost.c | 2 +- programs/dism/dism.c | 2 +- programs/dpnsvr/main.c | 2 +- programs/eject/eject.c | 2 +- programs/expand/expand.c | 2 +- programs/fc/fc.c | 2 +- programs/find/find.c | 2 +- programs/findstr/main.c | 2 +- programs/fsutil/main.c | 2 +- programs/hostname/hostname.c | 2 +- programs/icacls/icacls_main.c | 2 +- programs/icinfo/icinfo.c | 2 +- programs/ipconfig/ipconfig.c | 2 +- programs/lodctr/lodctr_main.c | 2 +- programs/mofcomp/mofcomp.c | 2 +- programs/msidb/main.c | 2 +- programs/msinfo32/main.c | 2 +- programs/net/net.c | 2 +- programs/netsh/netsh.c | 2 +- programs/netstat/netstat.c | 2 +- programs/ngen/ngen_main.c | 2 +- programs/ping/ping_main.c | 2 +- programs/plugplay/main.c | 2 +- programs/powershell/main.c | 2 +- programs/presentationfontcache/main.c | 2 +- programs/reg/reg.c | 2 +- programs/regasm/main.c | 2 +- programs/regini/main.c | 2 +- programs/regsvcs/main.c | 2 +- programs/regsvr32/regsvr32.c | 2 +- programs/rpcss/rpcss_main.c | 2 +- programs/sc/sc.c | 2 +- programs/schtasks/schtasks.c | 2 +- programs/sdbinst/main.c | 2 +- programs/secedit/main.c | 2 +- programs/servicemodelreg/main.c | 2 +- programs/services/services.c | 2 +- programs/shutdown/main.c | 2 +- programs/spoolsv/main.c | 2 +- programs/start/start.c | 2 +- programs/subst/main.c | 2 +- programs/svchost/svchost.c | 2 +- programs/systeminfo/main.c | 2 +- programs/taskkill/taskkill.c | 2 +- programs/tasklist/tasklist.c | 2 +- programs/termsv/main.c | 2 +- programs/uninstaller/main.c | 2 +- programs/unlodctr/unlodctr_main.c | 2 +- programs/wevtutil/main.c | 2 +- programs/winedevice/device.c | 2 +- programs/winemsibuilder/main.c | 2 +- programs/winetest/main.c | 2 +- programs/winevdm/winevdm.c | 2 +- programs/winmgmt/main.c | 2 +- programs/wmic/main.c | 2 +- programs/wmplayer/main.c | 2 +- programs/wuauserv/main.c | 2 +- programs/wusa/main.c | 2 +- programs/xcopy/xcopy.c | 2 +- 65 files changed, 65 insertions(+), 65 deletions(-) diff --git a/programs/arp/main.c b/programs/arp/main.c index cfcff4649596..e71047e482c3 100644 --- a/programs/arp/main.c +++ b/programs/arp/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(arp); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/aspnet_regiis/main.c b/programs/aspnet_regiis/main.c index 2560ae594866..d1bf4368b8ae 100644 --- a/programs/aspnet_regiis/main.c +++ b/programs/aspnet_regiis/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(aspnet_regiis); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index 73e2f60ce821..e7fe46873761 100644 --- a/programs/attrib/attrib.c +++ b/programs/attrib/attrib.c @@ -244,7 +244,7 @@ static BOOL ATTRIB_processdirectory(const WCHAR *rootdir, const WCHAR *filespec, return found; } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { WCHAR name[MAX_PATH]; WCHAR *namepart; diff --git a/programs/cabarc/cabarc.c b/programs/cabarc/cabarc.c index 66630db0f81e..5337b1e00951 100644 --- a/programs/cabarc/cabarc.c +++ b/programs/cabarc/cabarc.c @@ -591,7 +591,7 @@ static void usage( void ) " -v More verbose output\n" ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { static const WCHAR noneW[] = {'n','o','n','e',0}; static const WCHAR mszipW[] = {'m','s','z','i','p',0}; diff --git a/programs/cacls/cacls_main.c b/programs/cacls/cacls_main.c index eebd6d0d4e4e..0c2e9d1d0170 100644 --- a/programs/cacls/cacls_main.c +++ b/programs/cacls/cacls_main.c @@ -24,7 +24,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(cacls); -int main(int argc, char** argv) +int __cdecl main(int argc, char** argv) { int i; diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 8a68c0c2df8d..5cad22b7ee45 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -2419,7 +2419,7 @@ void WCMD_free_commands(CMD_LIST *cmds) { * winmain(). */ -int wmain (int argc, WCHAR *argvW[]) +int __cdecl wmain (int argc, WCHAR *argvW[]) { int args; WCHAR *cmdLine = NULL; diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 3ef40baeb860..706cb5e9836b 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(conhost); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/dism/dism.c b/programs/dism/dism.c index 86d5d2e6a3a6..36b7653dd0ce 100644 --- a/programs/dism/dism.c +++ b/programs/dism/dism.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dism); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/dpnsvr/main.c b/programs/dpnsvr/main.c index 6041cbc002ac..cabc8a6c7009 100644 --- a/programs/dpnsvr/main.c +++ b/programs/dpnsvr/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dpnsvr); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/eject/eject.c b/programs/eject/eject.c index 09922beb1e70..0a081cfdf56f 100644 --- a/programs/eject/eject.c +++ b/programs/eject/eject.c @@ -145,7 +145,7 @@ static void parse_options( int *argc, char *argv[] ) } } -int main( int argc, char *argv[] ) +int __cdecl main( int argc, char *argv[] ) { parse_options( &argc, argv ); diff --git a/programs/expand/expand.c b/programs/expand/expand.c index cf7eb202a219..fe2b4a1c81e2 100644 --- a/programs/expand/expand.c +++ b/programs/expand/expand.c @@ -89,7 +89,7 @@ static BOOL option_equal(LPCSTR str1, LPCSTR str2) return !lstrcmpA( str1 + 1, str2 ); } -int main(int argc, char *argv[]) +int __cdecl main(int argc, char *argv[]) { int ret = 0; char infile[MAX_PATH], outfile[MAX_PATH], actual_name[MAX_PATH]; diff --git a/programs/fc/fc.c b/programs/fc/fc.c index ba3b04bda2a0..84ce886b9a26 100644 --- a/programs/fc/fc.c +++ b/programs/fc/fc.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(fc); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/find/find.c b/programs/find/find.c index 9d7aecd40219..0c8ba1fcd715 100644 --- a/programs/find/find.c +++ b/programs/find/find.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(find); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/findstr/main.c b/programs/findstr/main.c index de5de33c35d9..d25e1965f6eb 100644 --- a/programs/findstr/main.c +++ b/programs/findstr/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(findstr); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/fsutil/main.c b/programs/fsutil/main.c index 2bce87edc848..eb4e34129763 100644 --- a/programs/fsutil/main.c +++ b/programs/fsutil/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(fsutil); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/hostname/hostname.c b/programs/hostname/hostname.c index 627d182773bc..0738e718e112 100644 --- a/programs/hostname/hostname.c +++ b/programs/hostname/hostname.c @@ -118,7 +118,7 @@ static int display_computer_name(void) return 0; } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { if (argc > 1) { diff --git a/programs/icacls/icacls_main.c b/programs/icacls/icacls_main.c index 8f93a97309ea..2e225850fef4 100644 --- a/programs/icacls/icacls_main.c +++ b/programs/icacls/icacls_main.c @@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(icacls); -int main(int argc, char** argv) +int __cdecl main(int argc, char** argv) { int i; diff --git a/programs/icinfo/icinfo.c b/programs/icinfo/icinfo.c index 489e646f3d2c..cbf7c675b030 100644 --- a/programs/icinfo/icinfo.c +++ b/programs/icinfo/icinfo.c @@ -54,7 +54,7 @@ static int WINAPIV mywprintf(const WCHAR *format, ...) return res ? nOut : 0; } -int wmain(int argc, WCHAR* argv[]) +int __cdecl wmain(int argc, WCHAR* argv[]) { int i, n=0,doabout=0,doconfigure=0; diff --git a/programs/ipconfig/ipconfig.c b/programs/ipconfig/ipconfig.c index adb3f8d30188..1823d482e2a4 100644 --- a/programs/ipconfig/ipconfig.c +++ b/programs/ipconfig/ipconfig.c @@ -374,7 +374,7 @@ static void print_full_information(void) } } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { static const WCHAR slashHelp[] = {'/','?',0}; static const WCHAR slashAll[] = {'/','a','l','l',0}; diff --git a/programs/lodctr/lodctr_main.c b/programs/lodctr/lodctr_main.c index e6838736f5ae..04623753913f 100644 --- a/programs/lodctr/lodctr_main.c +++ b/programs/lodctr/lodctr_main.c @@ -19,7 +19,7 @@ #include #include -int main( int argc, char *argv[] ) +int __cdecl main( int argc, char *argv[] ) { return LoadPerfCounterTextStringsW(GetCommandLineW(), FALSE); } diff --git a/programs/mofcomp/mofcomp.c b/programs/mofcomp/mofcomp.c index f5c1e916eee8..d6034ef7843f 100644 --- a/programs/mofcomp/mofcomp.c +++ b/programs/mofcomp/mofcomp.c @@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mofcomp); -int wmain( int argc, const WCHAR *argv[] ) +int __cdecl wmain( int argc, const WCHAR *argv[] ) { WINE_FIXME("stub\n"); return 0; diff --git a/programs/msidb/main.c b/programs/msidb/main.c index 2a3458ef340a..ceca6df0fe77 100644 --- a/programs/msidb/main.c +++ b/programs/msidb/main.c @@ -615,7 +615,7 @@ static int export_tables( struct msidb_state *state ) return 1; } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { struct msidb_state state; int i, n = 1; diff --git a/programs/msinfo32/main.c b/programs/msinfo32/main.c index 17515275fce9..6c3078533017 100644 --- a/programs/msinfo32/main.c +++ b/programs/msinfo32/main.c @@ -24,7 +24,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msinfo); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; WCHAR system_info[64]; diff --git a/programs/net/net.c b/programs/net/net.c index b36436986805..ae38c3a8a6a0 100644 --- a/programs/net/net.c +++ b/programs/net/net.c @@ -294,7 +294,7 @@ static BOOL arg_is(const WCHAR* str1, const WCHAR* str2) return CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, str1, -1, str2, -1) == CSTR_EQUAL; } -int wmain(int argc, const WCHAR* argv[]) +int __cdecl wmain(int argc, const WCHAR* argv[]) { static const WCHAR helpW[]={'h','e','l','p',0}; static const WCHAR shelpW[]={'/','h','e','l','p',0}; diff --git a/programs/netsh/netsh.c b/programs/netsh/netsh.c index 1ea3ecf231cd..4e52b39741e6 100644 --- a/programs/netsh/netsh.c +++ b/programs/netsh/netsh.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(netsh); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/netstat/netstat.c b/programs/netstat/netstat.c index b3320204b4dc..563896629c9b 100644 --- a/programs/netstat/netstat.c +++ b/programs/netstat/netstat.c @@ -348,7 +348,7 @@ static NETSTATPROTOCOLS NETSTAT_get_protocol(WCHAR name[]) return PROT_UNKNOWN; } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { WSADATA wsa_data; BOOL output_stats = FALSE; diff --git a/programs/ngen/ngen_main.c b/programs/ngen/ngen_main.c index c3793409f8fc..024d8b1a7625 100644 --- a/programs/ngen/ngen_main.c +++ b/programs/ngen/ngen_main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ngen); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/ping/ping_main.c b/programs/ping/ping_main.c index 5022fe27e7c3..51246e3f5bfa 100644 --- a/programs/ping/ping_main.c +++ b/programs/ping/ping_main.c @@ -45,7 +45,7 @@ static void usage(void) " -l Length of send buffer.\n"); } -int main(int argc, char** argv) +int __cdecl main(int argc, char** argv) { unsigned int n = 4, i, w = 4000, l = 32; int res; diff --git a/programs/plugplay/main.c b/programs/plugplay/main.c index ea8e078ee740..73bf46d6f99a 100644 --- a/programs/plugplay/main.c +++ b/programs/plugplay/main.c @@ -87,7 +87,7 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv ) WINE_TRACE( "service stopped\n" ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { static const SERVICE_TABLE_ENTRYW service_table[] = { diff --git a/programs/powershell/main.c b/programs/powershell/main.c index d39cdc032e7a..eb9a64ff0ece 100644 --- a/programs/powershell/main.c +++ b/programs/powershell/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(powershell); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/presentationfontcache/main.c b/programs/presentationfontcache/main.c index de5e323b7b37..694ad792dbf1 100644 --- a/programs/presentationfontcache/main.c +++ b/programs/presentationfontcache/main.c @@ -87,7 +87,7 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv ) WINE_TRACE( "service stopped\n" ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { static const SERVICE_TABLE_ENTRYW service_table[] = { diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 987a556c869d..a1edd226ace4 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -943,7 +943,7 @@ static enum operations get_operation(const WCHAR *str, int *op_help) return REG_INVALID; } -int wmain(int argc, WCHAR *argvW[]) +int __cdecl wmain(int argc, WCHAR *argvW[]) { int i, op, op_help, ret; BOOL show_op_help = FALSE; diff --git a/programs/regasm/main.c b/programs/regasm/main.c index a3243c3f6fda..33bee57bb932 100644 --- a/programs/regasm/main.c +++ b/programs/regasm/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(regasm); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/regini/main.c b/programs/regini/main.c index a8ad6548afc4..4b9cbd8bb5bd 100644 --- a/programs/regini/main.c +++ b/programs/regini/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(regini); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/regsvcs/main.c b/programs/regsvcs/main.c index 570686d6b3cd..3a0e52172476 100644 --- a/programs/regsvcs/main.c +++ b/programs/regsvcs/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(regsvcs); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c index 77a839e475a9..4aa3f7d5c1fa 100644 --- a/programs/regsvr32/regsvr32.c +++ b/programs/regsvr32/regsvr32.c @@ -211,7 +211,7 @@ static WCHAR *parse_command_line(WCHAR *command_line) return NULL; } -int wmain(int argc, WCHAR* argv[]) +int __cdecl wmain(int argc, WCHAR* argv[]) { int i, res, ret = 0; BOOL CallRegister = TRUE; diff --git a/programs/rpcss/rpcss_main.c b/programs/rpcss/rpcss_main.c index 5899adb51163..6d24ccbc072c 100644 --- a/programs/rpcss/rpcss_main.c +++ b/programs/rpcss/rpcss_main.c @@ -148,7 +148,7 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv ) TRACE( "service stopped\n" ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { static const SERVICE_TABLE_ENTRYW service_table[] = { diff --git a/programs/sc/sc.c b/programs/sc/sc.c index 52c72673d25a..1976c38a782d 100644 --- a/programs/sc/sc.c +++ b/programs/sc/sc.c @@ -212,7 +212,7 @@ static void usage( void ) exit( 1 ); } -int wmain( int argc, const WCHAR *argv[] ) +int __cdecl wmain( int argc, const WCHAR *argv[] ) { static const WCHAR createW[] = {'c','r','e','a','t','e',0}; static const WCHAR descriptionW[] = {'d','e','s','c','r','i','p','t','i','o','n',0}; diff --git a/programs/schtasks/schtasks.c b/programs/schtasks/schtasks.c index 980093e7331a..2ffc241153dd 100644 --- a/programs/schtasks/schtasks.c +++ b/programs/schtasks/schtasks.c @@ -345,7 +345,7 @@ static int delete_command(int argc, WCHAR *argv[]) return 0; } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i, ret = 0; diff --git a/programs/sdbinst/main.c b/programs/sdbinst/main.c index ce6766092191..2fbc1fab3f7b 100644 --- a/programs/sdbinst/main.c +++ b/programs/sdbinst/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(sdbinst); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/secedit/main.c b/programs/secedit/main.c index 597db5afba5c..ea3e09a564f9 100644 --- a/programs/secedit/main.c +++ b/programs/secedit/main.c @@ -16,7 +16,7 @@ #include -int main( int argc, char *argv[] ) +int __cdecl main( int argc, char *argv[] ) { return 0; } diff --git a/programs/servicemodelreg/main.c b/programs/servicemodelreg/main.c index 8c89464d9e1e..a6b4443d9166 100644 --- a/programs/servicemodelreg/main.c +++ b/programs/servicemodelreg/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(svcmodelreg); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/services/services.c b/programs/services/services.c index 968be3533b88..d9c4e484e425 100644 --- a/programs/services/services.c +++ b/programs/services/services.c @@ -1267,7 +1267,7 @@ static void load_registry_parameters(void) RegCloseKey( key ); } -int main(int argc, char *argv[]) +int __cdecl main(int argc, char *argv[]) { static const WCHAR service_current_key_str[] = { 'S','Y','S','T','E','M','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', diff --git a/programs/shutdown/main.c b/programs/shutdown/main.c index 49f8d24f4d55..00fb508881df 100644 --- a/programs/shutdown/main.c +++ b/programs/shutdown/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shutdown); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/spoolsv/main.c b/programs/spoolsv/main.c index 169b80233b7b..8fe37f2354fe 100644 --- a/programs/spoolsv/main.c +++ b/programs/spoolsv/main.c @@ -88,7 +88,7 @@ static void WINAPI serv_main(DWORD argc, LPWSTR *argv) WINE_TRACE( "service stopped\n" ); } -int main(int argc, char **argv) +int __cdecl main(int argc, char **argv) { static const SERVICE_TABLE_ENTRYW servtbl[] = { {spoolerW, serv_main}, diff --git a/programs/start/start.c b/programs/start/start.c index 7668330c7f8d..2a2c30022c35 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -350,7 +350,7 @@ static BOOL search_path(const WCHAR *firstParam, WCHAR **full_path) return FALSE; } -int wmain (int argc, WCHAR *argv[]) +int __cdecl wmain (int argc, WCHAR *argv[]) { SHELLEXECUTEINFOW sei; DWORD creation_flags; diff --git a/programs/subst/main.c b/programs/subst/main.c index 5af524d150d8..7bcabf005b15 100644 --- a/programs/subst/main.c +++ b/programs/subst/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(subst); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/svchost/svchost.c b/programs/svchost/svchost.c index 704510407ca4..30c356169909 100644 --- a/programs/svchost/svchost.c +++ b/programs/svchost/svchost.c @@ -332,7 +332,7 @@ static BOOL LoadGroup(PWCHAR group_name) } /* Load svchost group specified on the command line via the /k option */ -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int option_index; diff --git a/programs/systeminfo/main.c b/programs/systeminfo/main.c index e7bb30e2e4fa..b633134a3938 100644 --- a/programs/systeminfo/main.c +++ b/programs/systeminfo/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(systeminfo); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/taskkill/taskkill.c b/programs/taskkill/taskkill.c index 5f1993bfca18..600bab14fde4 100644 --- a/programs/taskkill/taskkill.c +++ b/programs/taskkill/taskkill.c @@ -525,7 +525,7 @@ static BOOL process_arguments(int argc, WCHAR *argv[]) return TRUE; } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int status_code = 0; diff --git a/programs/tasklist/tasklist.c b/programs/tasklist/tasklist.c index a0efa634425a..fd03f50dae6f 100644 --- a/programs/tasklist/tasklist.c +++ b/programs/tasklist/tasklist.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(tasklist); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/termsv/main.c b/programs/termsv/main.c index de903501eb09..eb79d17f0052 100644 --- a/programs/termsv/main.c +++ b/programs/termsv/main.c @@ -87,7 +87,7 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv ) WINE_TRACE( "service stopped\n" ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { static const SERVICE_TABLE_ENTRYW service_table[] = { diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c index 5e48306a38f3..38a9e6683055 100644 --- a/programs/uninstaller/main.c +++ b/programs/uninstaller/main.c @@ -157,7 +157,7 @@ static void RemoveSpecificProgram(WCHAR *nameW) } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { LPCWSTR token = NULL; static const WCHAR helpW[] = { '-','-','h','e','l','p',0 }; diff --git a/programs/unlodctr/unlodctr_main.c b/programs/unlodctr/unlodctr_main.c index bc6a966c88f3..4eb44c1acd24 100644 --- a/programs/unlodctr/unlodctr_main.c +++ b/programs/unlodctr/unlodctr_main.c @@ -19,7 +19,7 @@ #include #include -int main( int argc, char *argv[] ) +int __cdecl main( int argc, char *argv[] ) { return UnloadPerfCounterTextStringsW(GetCommandLineW(), FALSE); } diff --git a/programs/wevtutil/main.c b/programs/wevtutil/main.c index bd95d1f6cf72..f108df0d53a3 100644 --- a/programs/wevtutil/main.c +++ b/programs/wevtutil/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wevtutil); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c index f4ebad2f2d0e..0755caaafb01 100644 --- a/programs/winedevice/device.c +++ b/programs/winedevice/device.c @@ -141,7 +141,7 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv ) CloseHandle( stop_event ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { SERVICE_TABLE_ENTRYW service_table[2]; diff --git a/programs/winemsibuilder/main.c b/programs/winemsibuilder/main.c index 71fd1fdc1c8e..e6c1a4d0f79b 100644 --- a/programs/winemsibuilder/main.c +++ b/programs/winemsibuilder/main.c @@ -254,7 +254,7 @@ static void show_usage( void ) ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { if (argc < 3 || argv[1][0] != '-') { diff --git a/programs/winetest/main.c b/programs/winetest/main.c index a6874c2d5b1e..60cb49d13995 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -1237,7 +1237,7 @@ usage (void) " -x DIR Extract tests to DIR (default: .\\wct) and exit\n"); } -int main( int argc, char *argv[] ) +int __cdecl main( int argc, char *argv[] ) { BOOL (WINAPI *pIsWow64Process)(HANDLE hProcess, PBOOL Wow64Process); char *logname = NULL, *outdir = NULL; diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c index bde85a74a6a6..4852e5fc728c 100644 --- a/programs/winevdm/winevdm.c +++ b/programs/winevdm/winevdm.c @@ -486,7 +486,7 @@ static void usage(void) /*********************************************************************** * main */ -int main( int argc, char *argv[] ) +int __cdecl main( int argc, char *argv[] ) { DWORD count; HINSTANCE16 instance; diff --git a/programs/winmgmt/main.c b/programs/winmgmt/main.c index 283f26e0f255..8b262d00f3b6 100644 --- a/programs/winmgmt/main.c +++ b/programs/winmgmt/main.c @@ -87,7 +87,7 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv ) TRACE( "service stopped\n" ); } -int wmain( int argc, WCHAR *argv[] ) +int __cdecl wmain( int argc, WCHAR *argv[] ) { static const SERVICE_TABLE_ENTRYW service_table[] = { diff --git a/programs/wmic/main.c b/programs/wmic/main.c index e20b1f8c1073..f31a69a42419 100644 --- a/programs/wmic/main.c +++ b/programs/wmic/main.c @@ -265,7 +265,7 @@ static int query_prop( const WCHAR *class, const WCHAR *propname ) return ret; } -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { static const WCHAR getW[] = {'g','e','t',0}; static const WCHAR quitW[] = {'q','u','i','t',0}; diff --git a/programs/wmplayer/main.c b/programs/wmplayer/main.c index 899835f41a07..2ab2d28ae28d 100644 --- a/programs/wmplayer/main.c +++ b/programs/wmplayer/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmplayer); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/wuauserv/main.c b/programs/wuauserv/main.c index 31df299e90e5..8b3601311124 100644 --- a/programs/wuauserv/main.c +++ b/programs/wuauserv/main.c @@ -89,7 +89,7 @@ static void WINAPI serv_main(DWORD argc, LPWSTR *argv) WINE_TRACE( "service stopped\n" ); } -int main(int argc, char **argv) +int __cdecl main(int argc, char **argv) { static const SERVICE_TABLE_ENTRYW servtbl[] = { diff --git a/programs/wusa/main.c b/programs/wusa/main.c index aa7a38fe1787..c3e3dfd38ceb 100644 --- a/programs/wusa/main.c +++ b/programs/wusa/main.c @@ -20,7 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wusa); -int wmain(int argc, WCHAR *argv[]) +int __cdecl wmain(int argc, WCHAR *argv[]) { int i; diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c index 0d31d7c7d911..f50bb7791c2b 100644 --- a/programs/xcopy/xcopy.c +++ b/programs/xcopy/xcopy.c @@ -1087,7 +1087,7 @@ static int XCOPY_ProcessDestParm(WCHAR *supplieddestination, WCHAR *stem, WCHAR Processes the args, and drives the actual copying ========================================================================= */ -int wmain (int argc, WCHAR *argvW[]) +int __cdecl wmain (int argc, WCHAR *argvW[]) { int rc = 0; WCHAR suppliedsource[MAX_PATH] = {0}; /* As supplied on the cmd line */