comparison 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
comparison
equal deleted inserted replaced
2279:012b04efa234 2280:bd56d208ed22
47 47
48 #define err_str(a) ((a) < sys_nerr ? sys_errlist[a] : "unknown error") 48 #define err_str(a) ((a) < sys_nerr ? sys_errlist[a] : "unknown error")
49 49
50 #ifdef APOLLO 50 #ifdef APOLLO
51 #include <sys/time.h> 51 #include <sys/time.h>
52 #endif
53
54 #ifndef USG
55 #ifndef VMS
56 #ifndef BSD4_1
57 #define HAVE_FSYNC
58 #endif
59 #endif
52 #endif 60 #endif
53 61
54 #include "lisp.h" 62 #include "lisp.h"
55 #include "intervals.h" 63 #include "intervals.h"
56 #include "buffer.h" 64 #include "buffer.h"
2656 } 2664 }
2657 } 2665 }
2658 2666
2659 immediate_quit = 0; 2667 immediate_quit = 0;
2660 2668
2661 #ifndef USG 2669 #ifdef HAVE_FSYNC
2662 #ifndef VMS
2663 #ifndef BSD4_1
2664 /* Note fsync appears to change the modtime on BSD4.2 (both vax and sun). 2670 /* Note fsync appears to change the modtime on BSD4.2 (both vax and sun).
2665 Disk full in NFS may be reported here. */ 2671 Disk full in NFS may be reported here. */
2666 if (fsync (desc) < 0) 2672 if (fsync (desc) < 0)
2667 failure = 1, save_errno = errno; 2673 failure = 1, save_errno = errno;
2668 #endif
2669 #endif
2670 #endif 2674 #endif
2671 2675
2672 /* Spurious "file has changed on disk" warnings have been 2676 /* Spurious "file has changed on disk" warnings have been
2673 observed on Suns as well. 2677 observed on Suns as well.
2674 It seems that `close' can change the modtime, under nfs. 2678 It seems that `close' can change the modtime, under nfs.