libs/wine: Always build preloading code, make it easier to activate on activate on non-Linux platforms.

Gerald Pfeifer gerald at pfeifer.com
Sun Jan 15 11:16:23 CST 2012


This also removes one compiler warning about use_preloader being
unused in preloader_exec on non-Linux platforms.

Gerald

---
 libs/wine/config.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libs/wine/config.c b/libs/wine/config.c
index fdd4700..d614825 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -456,7 +456,6 @@ const char *wine_get_build_id(void)
 /* exec a binary using the preloader if requested; helper for wine_exec_wine_binary */
 static void preloader_exec( char **argv, int use_preloader )
 {
-#ifdef linux
     if (use_preloader)
     {
         static const char preloader[] = "wine-preloader";
@@ -483,7 +482,6 @@ static void preloader_exec( char **argv, int use_preloader )
         free( new_argv );
         free( full_name );
     }
-#endif
     execv( argv[0], argv );
 }
 
@@ -494,7 +492,12 @@ void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
     int use_preloader;
 
     if (!name) name = argv0_name;  /* no name means default loader */
+
+#ifdef linux
     use_preloader = !strendswith( name, "wineserver" );
+#else
+    use_preloader = 0;
+#endif
 
     if ((ptr = strrchr( name, '/' )))
     {
-- 
1.7.7.3



More information about the wine-patches mailing list