|
23 | 23 | /* This test suite verifies that write/read/write/read sequence can be
|
24 | 24 | * successfully executed on the Stream objects.
|
25 | 25 | *
|
26 |
| - * A qute from `man 3 fdopen`: |
| 26 | + * A qute from C99 standard, paragraph 7.19.5.3, point 6: |
27 | 27 | *
|
28 |
| - * Reads and writes may be intermixed on read/write streams in any order. Note |
29 |
| - * that ANSI C requires that a file positioning function intervene between |
30 |
| - * output and input, unless an input operation encounters end-of-file. (If |
31 |
| - * this condition is not met, then a read is allowed to return the result |
32 |
| - * of writes other than the most recent.) Therefore it is good practice (and |
33 |
| - * indeed sometimes necessary under Linux) to put an fseek(3) or fgetpos(3) |
34 |
| - * operation between write and read operations on such a stream. This operation |
35 |
| - * may be an apparent no-op (as in fseek(..., 0L, SEEK_CUR) called for its |
36 |
| - * synchronizing side effect). |
| 28 | + * When a file is opened with update mode ('+' as the second or third character in the |
| 29 | + * above list of mode argument values), both input and output may be performed on the |
| 30 | + * associated stream. However, output shall not be directly followed by input without an |
| 31 | + * intervening call to the fflush function or to a file positioning function (fseek, |
| 32 | + * fsetpos, or rewind), and input shall not be directly followed by output without an |
| 33 | + * intervening call to a file positioning function, unless the input operation encounters end- |
| 34 | + * of-file. |
37 | 35 | */
|
38 | 36 |
|
39 | 37 | using utest::v1::Case;
|
|
0 commit comments