diff --git a/dlls/winecrt0/crt0_private.h b/dlls/winecrt0/crt0_private.h index d4dbea33895..6ecc5054ee1 100644 --- a/dlls/winecrt0/crt0_private.h +++ b/dlls/winecrt0/crt0_private.h @@ -29,4 +29,6 @@ extern void _init(int argc, char **argv, char **envp ); extern void _fini(void); #endif +extern int __wine_spec_init_state; + #endif /* __WINE_CRT0_PRIVATE_H__ */ diff --git a/dlls/winecrt0/dll_entry.c b/dlls/winecrt0/dll_entry.c index e3be639d534..fada80d6432 100644 --- a/dlls/winecrt0/dll_entry.c +++ b/dlls/winecrt0/dll_entry.c @@ -24,8 +24,6 @@ #include "wine/library.h" #include "crt0_private.h" -int __wine_spec_init_state; - extern BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ); BOOL WINAPI __wine_spec_dll_entry( HINSTANCE inst, DWORD reason, LPVOID reserved ) diff --git a/dlls/winecrt0/exe_entry.c b/dlls/winecrt0/exe_entry.c index df26bfa3a72..05c12731ffd 100644 --- a/dlls/winecrt0/exe_entry.c +++ b/dlls/winecrt0/exe_entry.c @@ -25,8 +25,6 @@ #include "wine/library.h" #include "crt0_private.h" -int __wine_spec_init_state; - extern int main( int argc, char *argv[] ); DWORD WINAPI __wine_spec_exe_entry( PEB *peb ) diff --git a/dlls/winecrt0/exe_wentry.c b/dlls/winecrt0/exe_wentry.c index b79045a557b..05359b88909 100644 --- a/dlls/winecrt0/exe_wentry.c +++ b/dlls/winecrt0/exe_wentry.c @@ -25,8 +25,6 @@ #include "wine/library.h" #include "crt0_private.h" -int __wine_spec_init_state; - extern int wmain( int argc, WCHAR *argv[] ); DWORD WINAPI __wine_spec_exe_wentry( PEB *peb ) diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 56f9883c5bb..a5e3fd47825 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -489,7 +489,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec ) /* Output the entry point function */ - fprintf( outfile, "int __wine_spec_init_state;\n" ); + fprintf( outfile, "int __wine_spec_init_state = 0;\n" ); fprintf( outfile, "extern void %s();\n\n", spec->init_func ); /* Output the NT header */