[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:03:35 UTC 2012


The following commit has been merged in the wheezy branch:
commit 9972b782988e63d90c866e5cf05454ccc5fe1dfd
Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Thu May 10 22:43:26 2012 +0200

    winegcc: Try harder to find out whether the compiler is from gcc family.
    (cherry picked from commit b21da1d7018be09cd33c87bea06890447784666b)

diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 7d03119..318c86a 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -395,10 +395,10 @@ static char *get_lib_dir( struct options *opts )
 static void compile(struct options* opts, const char* lang)
 {
     strarray* comp_args = strarray_alloc();
-    unsigned int j;
+    unsigned int i, j;
     int gcc_defs = 0;
-    char* gcc;
-    char* gpp;
+    strarray* gcc;
+    strarray* gpp;
 
     strarray_addall(comp_args, get_translator(opts));
     switch(opts->processor)
@@ -409,16 +409,19 @@ static void compile(struct options* opts, const char* lang)
 	/* mixing different C and C++ compilers isn't supported in configure anyway */
 	case proc_cc:
 	case proc_cxx:
-            gcc = build_tool_name(opts, "gcc", CC);
-            gpp = build_tool_name(opts, "g++", CXX);
+            gcc = strarray_fromstring(build_tool_name(opts, "gcc", CC), " ");
+            gpp = strarray_fromstring(build_tool_name(opts, "g++", CXX), " ");
             for ( j = 0; !gcc_defs && j < comp_args->size; j++ )
             {
                 const char *cc = comp_args->base[j];
 
-                gcc_defs = strendswith(cc, gcc) || strendswith(cc, gpp);
+                for (i = 0; !gcc_defs && i < gcc->size; i++)
+                    gcc_defs = gcc->base[i][0] != '-' && strendswith(cc, gcc->base[i]);
+                for (i = 0; !gcc_defs && i < gpp->size; i++)
+                    gcc_defs = gpp->base[i][0] != '-' && strendswith(cc, gpp->base[i]);
             }
-            free(gcc);
-            free(gpp);
+            strarray_free(gcc);
+            strarray_free(gpp);
             break;
     }
 

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list