support haiku's compat deps in the testcase parser
authorMichael Schroeder <mls@suse.de>
Mon, 1 Jul 2013 16:14:41 +0000 (18:14 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 1 Jul 2013 16:14:41 +0000 (18:14 +0200)
ext/testcase.c

index ceebb8e..8cb9b9c 100644 (file)
@@ -340,13 +340,18 @@ testcase_str2dep(Pool *pool, char *s)
   for (;;s++)
     {  
       if (*s == '<')
-        flags |= REL_LT;
+       flags |= REL_LT;
       else if (*s == '=')
-        flags |= REL_EQ;
+       flags |= REL_EQ;
       else if (*s == '>')
-        flags |= REL_GT;
+       flags |= REL_GT;
       else
-        break;
+       break;
+    }
+  if (!flags && *s == 'c' && !strcmp(s, "compat >="))
+    {
+      flags = REL_COMPAT;
+      s += 9;
     }
   if (!flags)
     return id;