Merge "Clean up some <stdio.h> constants." am: 7f86f1dd15
am: 84136f4be7
Change-Id: I9b12b7be23eac57adccfedec7d4490d1c9134156
This commit is contained in:
commit
a67457ed3c
2 changed files with 9 additions and 5 deletions
|
@ -105,12 +105,11 @@ extern FILE __sF[] __REMOVED_IN(23);
|
|||
* 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.
|
||||
|
|
|
@ -1918,3 +1918,8 @@ TEST(STDIO_TEST, freopen_append_mode_and_ftell) {
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue