[Git][cmucl/cmucl][issue-444-stat-with-64-bit-time-t] 2 commits: Revert "Fix #444: Use 64-bit time_t value for stat and friends"

Raymond Toy pushed to branch issue-444-stat-with-64-bit-time-t at cmucl / cmucl Commits: 885d88eb by Raymond Toy at 2025-10-10T07:37:55-07:00 Revert "Fix #444: Use 64-bit time_t value for stat and friends" This reverts commit 428fc80d1279cd005abca4480bf8cd990e7e7027. - - - - - 145605a0 by Raymond Toy at 2025-10-10T07:39:17-07:00 Revert previous change and use Madhu's solution Madhu provided this patch to fix the issue he was encountering with probe-file that was calling unix-stat which was failing for him. (I don't have that problem for whatever reason.) This changes `time-t` to be an `int64-t` type and adds `-D_TIME_BITS=64` to the compilation flags on Linux. I initially had issues with this patch, but it was fixed by removing all the build directories. - - - - - 3 changed files: - src/code/unix.lisp - src/lisp/Config.x86_linux - src/lisp/os-common.c Changes: ===================================== src/code/unix.lisp ===================================== @@ -69,7 +69,7 @@ (def-alien-type time-t #-(or bsd linux alpha) unsigned-long - #+linux long + #+linux int64-t #+(and bsd (not netbsd)) long #+(and bsd netbsd) int64-t #+alpha unsigned-int) @@ -136,8 +136,8 @@ (def-alien-type nil (struct timeval - (tv-sec #-linux time-t #+linux int) ; seconds - (tv-usec int))) ; and microseconds + (tv-sec time-t) ; seconds + (tv-usec long))) ; and microseconds #+(or linux BSD) (def-alien-type nil @@ -1721,12 +1721,6 @@ (void-syscall ("symlink" c-string c-string) (%name->file name1) (%name->file name2))) -(def-alien-type nil - (struct timeval - (tv-sec time-t) ; seconds - (tv-usec #-linux int - #+linux time-t))) ; and microseconds - (def-alien-type nil (struct timezone (tz-minuteswest int) ; minutes west of Greenwich ===================================== src/lisp/Config.x86_linux ===================================== @@ -4,7 +4,7 @@ include Config.x86_common CFLAGS += $(COPT) CPPFLAGS += -m32 CFLAGS += -rdynamic -march=pentium4 -mfpmath=sse -mtune=generic -CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 UNDEFSYMPATTERN = -Xlinker -u -Xlinker & ASSEM_SRC += linux-stubs.S ===================================== src/lisp/os-common.c ===================================== @@ -5,11 +5,6 @@ */ -#ifdef __linux__ -/* Want 64-bit time_t values for stat and friends */ -#define _TIME_BITS 64 -#endif - #include <assert.h> #include <errno.h> #include <langinfo.h> View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/428fc80d1279cd005abca44... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/428fc80d1279cd005abca44... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)