summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 6a60186a84f..89ae89e1613 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <limits.h>
#include <fcntl.h>
-#include <stdio.h>
+#include "sysstdio.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -55,7 +55,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef WINDOWSNT
#define NOMINMAX 1
#include <windows.h>
-#include <fcntl.h>
#include <sys/file.h>
#include "w32.h"
#endif /* not WINDOWSNT */
@@ -63,7 +62,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef MSDOS
#include "msdos.h"
#include <sys/param.h>
-#include <fcntl.h>
#endif
#ifdef DOS_NT
@@ -148,7 +146,7 @@ static Lisp_Object Qdelete_directory;
#ifdef WINDOWSNT
#endif
-Lisp_Object Qfile_error;
+Lisp_Object Qfile_error, Qfile_notify_error;
static Lisp_Object Qfile_already_exists, Qfile_date_error;
static Lisp_Object Qexcl;
Lisp_Object Qfile_name_history;
@@ -4764,7 +4762,7 @@ This calls `write-region-annotate-functions' at the start, and
struct stat st;
EMACS_TIME modtime;
ptrdiff_t count = SPECPDL_INDEX ();
- int count1;
+ ptrdiff_t count1;
Lisp_Object handler;
Lisp_Object visit_file;
Lisp_Object annotations;
@@ -5620,7 +5618,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
UNGCPRO;
}
- stream = fopen (SSDATA (listfile), "w");
+ stream = emacs_fopen (SSDATA (listfile), "w");
}
record_unwind_protect (do_auto_save_unwind,
@@ -5887,6 +5885,7 @@ syms_of_fileio (void)
DEFSYM (Qfile_error, "file-error");
DEFSYM (Qfile_already_exists, "file-already-exists");
DEFSYM (Qfile_date_error, "file-date-error");
+ DEFSYM (Qfile_notify_error, "file-notify-error");
DEFSYM (Qexcl, "excl");
DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
@@ -5925,6 +5924,11 @@ of file names regardless of the current language environment. */);
Fput (Qfile_date_error, Qerror_message,
build_pure_c_string ("Cannot set file date"));
+ Fput (Qfile_notify_error, Qerror_conditions,
+ Fpurecopy (list3 (Qfile_notify_error, Qfile_error, Qerror)));
+ Fput (Qfile_notify_error, Qerror_message,
+ build_pure_c_string ("File notification error"));
+
DEFVAR_LISP ("file-name-handler-alist", Vfile_name_handler_alist,
doc: /* Alist of elements (REGEXP . HANDLER) for file names handled specially.
If a file name matches REGEXP, all I/O on that file is done by calling