aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-06-12 22:18:27 -0700
committerPaul Eggert2011-06-12 22:18:27 -0700
commite5533da60e29f1cbbd7f909023f2c256bd76464c (patch)
tree205177cea9a8e75fa0c972b970637f8dd01b70e5
parent9910e595e7142801eb2bbf13ca37d4d10f57f25b (diff)
downloademacs-e5533da60e29f1cbbd7f909023f2c256bd76464c.tar.gz
emacs-e5533da60e29f1cbbd7f909023f2c256bd76464c.zip
* lread.c (Fload): Don't compare a possibly-garbage time_t value.
-rw-r--r--src/ChangeLog2
-rw-r--r--src/lread.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 973f9c1b2a6..a9d47ebca16 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12011-06-13 Paul Eggert <eggert@cs.ucla.edu> 12011-06-13 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
4
3 GLYPH_CODE_FACE returns EMACS_INT, not int. 5 GLYPH_CODE_FACE returns EMACS_INT, not int.
4 * dispextern.h (merge_faces): 6 * dispextern.h (merge_faces):
5 * xfaces.c (merge_faces): 7 * xfaces.c (merge_faces):
diff --git a/src/lread.c b/src/lread.c
index 0426cd4d548..b789457b223 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1203,10 +1203,13 @@ Return t if the file exists and loads successfully. */)
1203#ifdef DOS_NT 1203#ifdef DOS_NT
1204 fmode = "rb"; 1204 fmode = "rb";
1205#endif /* DOS_NT */ 1205#endif /* DOS_NT */
1206 stat (SSDATA (efound), &s1); 1206 result = stat (SSDATA (efound), &s1);
1207 SSET (efound, SBYTES (efound) - 1, 0); 1207 if (result == 0)
1208 result = stat (SSDATA (efound), &s2); 1208 {
1209 SSET (efound, SBYTES (efound) - 1, 'c'); 1209 SSET (efound, SBYTES (efound) - 1, 0);
1210 result = stat (SSDATA (efound), &s2);
1211 SSET (efound, SBYTES (efound) - 1, 'c');
1212 }
1210 1213
1211 if (result == 0 && s1.st_mtime < s2.st_mtime) 1214 if (result == 0 && s1.st_mtime < s2.st_mtime)
1212 { 1215 {