Mercurial > hg > xemacs-beta
comparison src/fileio.c @ 347:7c94d56991e1 r21-1-3
Import from CVS: tag r21-1-3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:53:48 +0200 |
parents | 512e409c26a2 |
children | 4711e16a8e49 |
comparison
equal
deleted
inserted
replaced
346:dd0986ffd2cf | 347:7c94d56991e1 |
---|---|
3335 failure = 1; | 3335 failure = 1; |
3336 save_errno = errno; | 3336 save_errno = errno; |
3337 } | 3337 } |
3338 #endif /* HAVE_FSYNC */ | 3338 #endif /* HAVE_FSYNC */ |
3339 | 3339 |
3340 /* Spurious "file has changed on disk" warnings have been | 3340 /* |
3341 observed on Suns as well. | 3341 * On VMS and APOLLO, must do the stat after the close |
3342 It seems that `close' can change the modtime, under nfs. | 3342 * since closing changes the modtime. |
3343 | 3343 * |
3344 (This has supposedly been fixed in Sunos 4, | 3344 * Spurious "file has changed on disk" warnings have been |
3345 but who knows about all the other machines with NFS?) */ | 3345 * observed on Suns as well. It seems that `close' can change |
3346 /* On VMS and APOLLO, must do the stat after the close | 3346 * the modtime, under nfs. (This has supposedly been fixed in |
3347 since closing changes the modtime. */ | 3347 * Sunos 4, but who knows about all the other machines with |
3348 /* As it does on Windows too - kkm */ | 3348 * NFS?) |
3349 #if !defined (WINDOWSNT) /* !defined (VMS) && !defined (APOLLO) */ | 3349 * |
3350 fstat (desc, &st); | 3350 * This is reported to happen under Windows also. |
3351 #endif | 3351 * |
3352 * So we don't do the stat here. It is done after the | |
3353 * descriptor is closed. | |
3354 */ | |
3352 | 3355 |
3353 /* NFS can report a write failure now. */ | 3356 /* NFS can report a write failure now. */ |
3354 if (close (desc) < 0) | 3357 if (close (desc) < 0) |
3355 { | 3358 { |
3356 failure = 1; | 3359 failure = 1; |
3362 as necessary). */ | 3365 as necessary). */ |
3363 XCAR (desc_locative) = Qnil; | 3366 XCAR (desc_locative) = Qnil; |
3364 unbind_to (speccount, Qnil); | 3367 unbind_to (speccount, Qnil); |
3365 } | 3368 } |
3366 | 3369 |
3367 #if defined (WINDOWSNT) /* defined (VMS) || defined (APOLLO) */ | 3370 /* |
3371 * stat the file after the file is closed to avoid having the | |
3372 * modtime change on us when the file is closed. | |
3373 */ | |
3368 stat ((char *) XSTRING_DATA (fn), &st); | 3374 stat ((char *) XSTRING_DATA (fn), &st); |
3369 #endif | |
3370 | 3375 |
3371 #ifdef CLASH_DETECTION | 3376 #ifdef CLASH_DETECTION |
3372 if (!auto_saving) | 3377 if (!auto_saving) |
3373 unlock_file (lockname); | 3378 unlock_file (lockname); |
3374 #endif /* CLASH_DETECTION */ | 3379 #endif /* CLASH_DETECTION */ |