Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
13f23f79
by Raymond Toy at 2025-10-13T18:45:22-07:00
-
52ce44f1
by Raymond Toy at 2025-10-13T18:45:22-07:00
4 changed files:
- src/general-info/release-22a.md
- src/lisp/os-common.c
- tests/os.lisp
- + tests/resources/64-bit-timestamp.txt
Changes:
... | ... | @@ -24,8 +24,9 @@ public domain. |
24 | 24 | * Updated CLX from upstream to version from 2024-09-11.
|
25 | 25 | * ANSI compliance fixes:
|
26 | 26 | * Bug fixes:
|
27 | - * #387: Update CLX from upstream to version from 2024-09-11.
|
|
28 | 27 | * Gitlab tickets:
|
28 | + * #387: Update CLX from upstream to version from 2024-09-11.
|
|
29 | + * #444: `unix-stat` and friends return wrong timestamp
|
|
29 | 30 | * Other changes:
|
30 | 31 | * Improvements to the PCL implementation of CLOS:
|
31 | 32 | * Changes to building procedure:
|
... | ... | @@ -5,6 +5,11 @@ |
5 | 5 | |
6 | 6 | */
|
7 | 7 | |
8 | +#ifdef __linux__
|
|
9 | +/* Want 64-bit time_t values for stat and friends */
|
|
10 | +#define _TIME_BITS 64
|
|
11 | +#endif
|
|
12 | + |
|
8 | 13 | #include <assert.h>
|
9 | 14 | #include <errno.h>
|
10 | 15 | #include <langinfo.h>
|
... | ... | @@ -34,3 +34,19 @@ |
34 | 34 | (system:get-user-homedir-namestring "zotuserunknown")
|
35 | 35 | (assert-eql home-pathname nil)
|
36 | 36 | (assert-eql status 0)))
|
37 | + |
|
38 | +#+linux
|
|
39 | +(define-test stat.64-bit-timestamp
|
|
40 | + (:tag :issues)
|
|
41 | + (let ((test-file #.(merge-pathnames "resources/64-bit-timestamp.txt"
|
|
42 | + cl:*load-pathname*)))
|
|
43 | + (assert-true (probe-file test-file))
|
|
44 | + (multiple-value-bind (ok st-dev st-ino st-mode st-nlink st-uid st-gid st-rdev st-size
|
|
45 | + st-atime st-mtime
|
|
46 | + st-ctime st-blksize st-blocks)
|
|
47 | + (unix:unix-stat (namestring test-file))
|
|
48 | + (declare (ignore st-dev st-ino st-mode st-nlink st-uid st-gid st-rdev
|
|
49 | + st-ctime st-blksize st-blocks))
|
|
50 | + (assert-true ok)
|
|
51 | + (assert-equal st-atime 2153718000)
|
|
52 | + (assert-equal st-mtime 2153718000)))) |