[Feature][T106]ZXW P56U09 code
Only Configure: Yes
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: No
Doc Update: No
Change-Id: I3cbd8b420271eb20c2b40ebe5c78f83059cd42f3
diff --git a/ap/libc/glibc/glibc-2.23/stdio-common/scanf9.c b/ap/libc/glibc/glibc-2.23/stdio-common/scanf9.c
new file mode 100644
index 0000000..7aca354
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/stdio-common/scanf9.c
@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main (void)
+{
+ int matches;
+ char str[10];
+
+ str[0] = '\0';
+ matches = -9;
+ matches = sscanf ("x ]", "%[^] ]", str);
+ printf ("Matches = %d, string str = \"%s\".\n", matches, str);
+ printf ("str should be \"x\".\n");
+
+ if (strcmp (str, "x"))
+ abort ();
+
+ str[0] = '\0';
+ matches = -9;
+ matches = sscanf (" ] x", "%[] ]", str);
+ printf ("Matches = %d, string str = \"%s\".\n", matches, str);
+ printf ("str should be \" ] \".\n");
+
+ if (strcmp (str, " ] "))
+ abort ();
+
+ return 0;
+}