diff options
| author | Paul Eggert | 2013-07-16 21:37:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-16 21:37:27 -0700 |
| commit | b648c16370ca72e3b68678db41b29e62accb708c (patch) | |
| tree | a6d5dad9e4b7beb95c1957e56ca1498df93766e2 /src/doc.c | |
| parent | b1dc4084264128eb303198f8b5cb6d70ee3b3034 (diff) | |
| download | emacs-b648c16370ca72e3b68678db41b29e62accb708c.tar.gz emacs-b648c16370ca72e3b68678db41b29e62accb708c.zip | |
A few more minor file errno-reporting bugs.
* callproc.c (Fcall_process):
* doc.c (Fsnarf_documentation):
* fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
* process.c (set_socket_option):
Don't let a constructor trash errno.
* doc.c: Include <errno.h>.
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | 23 | ||
| 24 | #include <errno.h> | ||
| 24 | #include <sys/types.h> | 25 | #include <sys/types.h> |
| 25 | #include <sys/file.h> /* Must be after sys/types.h for USG. */ | 26 | #include <sys/file.h> /* Must be after sys/types.h for USG. */ |
| 26 | #include <fcntl.h> | 27 | #include <fcntl.h> |
| @@ -609,7 +610,11 @@ the same file name is found in the `doc-directory'. */) | |||
| 609 | 610 | ||
| 610 | fd = emacs_open (name, O_RDONLY, 0); | 611 | fd = emacs_open (name, O_RDONLY, 0); |
| 611 | if (fd < 0) | 612 | if (fd < 0) |
| 612 | report_file_error ("Opening doc string file", build_string (name)); | 613 | { |
| 614 | int open_errno = errno; | ||
| 615 | report_file_errno ("Opening doc string file", build_string (name), | ||
| 616 | open_errno); | ||
| 617 | } | ||
| 613 | Vdoc_file_name = filename; | 618 | Vdoc_file_name = filename; |
| 614 | filled = 0; | 619 | filled = 0; |
| 615 | pos = 0; | 620 | pos = 0; |