[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/build/uClibc/test/stdio/64bit.c b/ap/build/uClibc/test/stdio/64bit.c
new file mode 100644
index 0000000..9b94dd8
--- /dev/null
+++ b/ap/build/uClibc/test/stdio/64bit.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+int main(void)
+{
+ unsigned long long val = -1;
+ void *ptr = (void *)-1;
+ printf("%p\n", ptr);
+
+ sscanf("123456789", "%Lx", &val);
+ printf("val = %Lx\n", val);
+ return 0;
+}
diff --git a/ap/build/uClibc/test/stdio/Makefile b/ap/build/uClibc/test/stdio/Makefile
new file mode 100644
index 0000000..a5d662a
--- /dev/null
+++ b/ap/build/uClibc/test/stdio/Makefile
@@ -0,0 +1,7 @@
+# uClibc stdio tests
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+top_builddir=../../
+include ../Rules.mak
+-include Makefile.in
+include ../Test.mak
diff --git a/ap/build/uClibc/test/stdio/Makefile.in b/ap/build/uClibc/test/stdio/Makefile.in
new file mode 100644
index 0000000..0bfbd13
--- /dev/null
+++ b/ap/build/uClibc/test/stdio/Makefile.in
@@ -0,0 +1,4 @@
+# uClibc stdio tests
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+DODIFF_64bit := 1
diff --git a/ap/build/uClibc/test/stdio/fclose-loop.c b/ap/build/uClibc/test/stdio/fclose-loop.c
new file mode 100644
index 0000000..fc0cc42
--- /dev/null
+++ b/ap/build/uClibc/test/stdio/fclose-loop.c
@@ -0,0 +1,21 @@
+/* From: Denis Vlasenko <vda.linux@googlemail.com>
+ * With certain combination of .config options fclose() does not
+ * remove FILE* pointer from _stdio_openlist. As a result, subsequent
+ * fopen() may allocate new FILE structure exactly in place of one
+ * freed by previous fclose(), which then makes _stdio_openlist
+ * circularlt looped. The following program will enter infinite loop
+ * trying to walk _stdio_openlist in exit():
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ FILE* fp;
+ fp = fopen("/dev/null", "r");
+ fclose(fp);
+ fp = fopen("/dev/zero", "r");
+ fclose(fp);
+ return 0;
+}