diff src/fileio.c @ 2280:bd56d208ed22

* fileio.c (HAVE_FSYNC): Define, if appropriate. (Fwrite_region): Use HAVE_FSYNC. * s-aix3-2.h (HAVE_FSYNC): Define.
author Jim Blandy <jimb@redhat.com>
date Sat, 20 Mar 1993 19:45:17 +0000
parents 668491072928
children 1c590cd84ab3
line wrap: on
line diff
--- a/src/fileio.c	Sat Mar 20 19:30:58 1993 +0000
+++ b/src/fileio.c	Sat Mar 20 19:45:17 1993 +0000
@@ -51,6 +51,14 @@
 #include <sys/time.h>
 #endif
 
+#ifndef USG
+#ifndef VMS
+#ifndef BSD4_1
+#define HAVE_FSYNC
+#endif
+#endif
+#endif
+
 #include "lisp.h"
 #include "intervals.h"
 #include "buffer.h"
@@ -2658,16 +2666,12 @@
 
   immediate_quit = 0;
 
-#ifndef USG
-#ifndef VMS
-#ifndef BSD4_1
+#ifdef HAVE_FSYNC
   /* Note fsync appears to change the modtime on BSD4.2 (both vax and sun).
      Disk full in NFS may be reported here.  */
   if (fsync (desc) < 0)
     failure = 1, save_errno = errno;
 #endif
-#endif
-#endif
 
   /* Spurious "file has changed on disk" warnings have been 
      observed on Suns as well.