Merge "Consistently say va_arg rather than __va_arg."
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 0811621..a9bb124 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -102,12 +102,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);
+}