diff options
| author | Paul Eggert | 2013-01-19 10:58:40 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-01-19 10:58:40 -0800 |
| commit | 3a955a1f8617ae65709772863a4cb8bb9ec73de7 (patch) | |
| tree | 7543c597dd872c9f41ac759d8f61dd8d17f182ea /src/ChangeLog | |
| parent | 20de6ab6a5567351df9f28d74052bad04877ef08 (diff) | |
| download | emacs-3a955a1f8617ae65709772863a4cb8bb9ec73de7.tar.gz emacs-3a955a1f8617ae65709772863a4cb8bb9ec73de7.zip | |
* fileio.c: Use O_APPEND to append.
This corresponds better to the natural interpretation of "append",
and avoids the need to open the output file twice, or to invoke
lseek when APPEND is neither nil nor a number.
This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
(Fwrite_region): Simplify. Use O_APPEND instead of opening the
file possibly twice, and lseeking to its end; this avoids the
need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC
at the same time: the combination is never needed and apparently
it doesn't work with DOS_NT.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 57b36782697..c66963738bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,16 @@ | |||
| 1 | 2013-01-19 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2013-01-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * fileio.c: Use O_APPEND to append. | ||
| 4 | This corresponds better to the natural interpretation of "append", | ||
| 5 | and avoids the need to open the output file twice, or to invoke | ||
| 6 | lseek when APPEND is neither nil nor a number. | ||
| 7 | This relies on POSIX 1003.1-1988 or later, which is OK nowadays. | ||
| 8 | (Fwrite_region): Simplify. Use O_APPEND instead of opening the | ||
| 9 | file possibly twice, and lseeking to its end; this avoids the | ||
| 10 | need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC | ||
| 11 | at the same time: the combination is never needed and apparently | ||
| 12 | it doesn't work with DOS_NT. | ||
| 13 | |||
| 3 | Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149). | 14 | Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149). |
| 4 | * fileio.c (Fwrite_region): Use O_BINARY in checking code, too. | 15 | * fileio.c (Fwrite_region): Use O_BINARY in checking code, too. |
| 5 | 16 | ||