[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/string/tst-svc.c b/ap/libc/glibc/glibc-2.22/string/tst-svc.c
new file mode 100644
index 0000000..1ee5342
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/string/tst-svc.c
@@ -0,0 +1,45 @@
+/* Test for strverscmp() */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#define  MAX_STRINGS      256
+#define  MAX_LINE_SIZE    32
+
+static int
+compare (const void *p1, const void *p2)
+{
+  return strverscmp (*((char **) p1), *((char **) p2));
+}
+
+int
+main (int argc, char *argv[])
+{
+  char line[MAX_LINE_SIZE + 1];
+  char *str[MAX_STRINGS];
+  int  count = 0;
+  int  i, n;
+
+  while (count < MAX_STRINGS && fgets (line, MAX_LINE_SIZE, stdin) != NULL)
+    {
+      n = strlen (line) - 1;
+
+      if (line[n] == '\n')
+        line[n] = '\0';
+
+      str[count] = strdup (line);
+
+      if (str[count] == NULL)
+        exit (EXIT_FAILURE);
+
+      ++count;
+    }
+
+  qsort (str, count, sizeof (char *), compare);
+
+  for (i = 0; i < count; ++i)
+    puts (str[i]);
+
+  return EXIT_SUCCESS;
+}