Clean up some <stdio.h> constants.

And actually test an assertion rather than just state it in a comment.

Bug: N/A
Test: ran tests
Change-Id: I07699483aca4aac4e089d8b99123cb5bde9b3c63
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index b103990..72f83fb 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -105,12 +105,11 @@
  * stdio can provide without attempting to allocate further resources
  * (which could fail).  Do not use this for anything.
  */
+#define FOPEN_MAX 20
+#define FILENAME_MAX 4096
 
-#define	FOPEN_MAX	20	/* must be <= OPEN_MAX <sys/syslimits.h> */
-#define	FILENAME_MAX	1024	/* must be <= PATH_MAX <sys/syslimits.h> */
-
-#define	L_tmpnam	1024	/* XXX must be == PATH_MAX */
-#define	TMP_MAX		308915776
+#define L_tmpnam 4096
+#define TMP_MAX 308915776
 
 /*
  * Functions defined in ANSI C standard.
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index dac7056..1bb97a3 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -1918,3 +1918,8 @@
   ASSERT_EQ(0, fclose(fp));
   AssertFileIs(tf.filename, "0123456789xxx");
 }
+
+TEST(STDIO_TEST, constants) {
+  ASSERT_LE(FILENAME_MAX, PATH_MAX);
+  ASSERT_EQ(L_tmpnam, PATH_MAX);
+}