Raymond Toy pushed to branch issue-125-unix-stat-wrong at cmucl / cmucl
Commits:
34a975ee by Raymond Toy at 2022-08-03T13:02:19-07:00
Replace ino64-t with ino-t on linux.
Basically makes ino-t be a 64-bit int and removes the ino64-t type for
linux. Requires updating stat calls to use ino-t instead of ino64-t,
of course.
- - - - -
1 changed file:
- src/code/unix.lisp
Changes:
=====================================
src/code/unix.lisp
=====================================
@@ -53,12 +53,9 @@
(def-alien-type u-int32-t unsigned-int)
(def-alien-type ino-t
- #+netbsd u-int64-t
+ #+(or netbsd linux darwin) u-int64-t
#+alpha unsigned-int
- #-(or alpha netbsd) unsigned-long)
-
-#+linux
-(def-alien-type ino64-t u-int64-t)
+ #-(or alpha netbsd linux darwin) unsigned-long)
(def-alien-type size-t
#-(or linux alpha) long
@@ -1300,7 +1297,7 @@
#+glibc2.1
(d-ino ino-t) ; inode number of entry
#-glibc2.1
- (d-ino ino64-t) ; inode number of entry
+ (d-ino ino-t) ; inode number of entry
(d-off off-t) ; offset of next disk directory entry
(d-reclen unsigned-short) ; length of this record
(d_type unsigned-char)
@@ -1346,15 +1343,16 @@
(d-name (array char 256)))) ; name must be no longer than this
+;; unix-stat and friends
(macrolet
((call-stat (c-func-name first-arg-type first-arg)
;; Call the stat function named C-FUNC-NAME. The type of the
- ;; first arg is FIRST-ARG_TYPE and FIRST-ARG is the first arg
+ ;; first arg is FIRST-ARG-TYPE and FIRST-ARG is the first arg
;; to the stat function. fstat is different from stat and
;; lstat since it takes an fd for the first arg instead of
;; string.
`(with-alien ((dev dev-t)
- (ino ino64-t)
+ (ino ino-t)
(mode mode-t)
(nlink nlink-t)
(uid uid-t)
@@ -1372,7 +1370,7 @@
(function int
,first-arg-type
(* dev-t)
- (* ino64-t)
+ (* ino-t)
(* mode-t)
(* nlink-t)
(* uid-t)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/34a975ee5749c15840971bc…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/34a975ee5749c15840971bc…
You're receiving this email because of your account on gitlab.common-lisp.net.
Carl S. Shapiro pushed to branch issue-122-gnu-source at cmucl / cmucl
Commits:
d31ab04c by Carl S. Shapiro at 2022-06-26T21:39:23+00:00
Update src/lisp/Linux-os.c
- - - - -
1 changed file:
- src/lisp/Linux-os.c
Changes:
=====================================
src/lisp/Linux-os.c
=====================================
@@ -17,8 +17,8 @@
*
*/
-#define _GNU_SOURCE
-#include <signal.h> /* for reg_* constants in uc_mcontext.gregs */
+#define _GNU_SOURCE /* for reg_* constants in uc_mcontext.gregs */
+#include <signal.h>
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d31ab04c93ea31a452f6d5d…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d31ab04c93ea31a452f6d5d…
You're receiving this email because of your account on gitlab.common-lisp.net.
Carl S. Shapiro pushed to branch issue-122-gnu-source at cmucl / cmucl
Commits:
1c2e52ef by Carl S. Shapiro at 2022-06-26T21:28:53+00:00
Update src/lisp/Linux-os.c
- - - - -
1 changed file:
- src/lisp/Linux-os.c
Changes:
=====================================
src/lisp/Linux-os.c
=====================================
@@ -17,11 +17,8 @@
*
*/
-#if defined(__linux__)
-/* Needed to define REG_foo to get indices into the mcontext gregs. */
#define _GNU_SOURCE
-#endif
-
+#include <signal.h> /* for reg_* constants in uc_mcontext.gregs */
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/1c2e52ef5d2262a54179ad1…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/1c2e52ef5d2262a54179ad1…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-122-dynamically-allocate-altstack at cmucl / cmucl
Commits:
e6dd7ca5 by Raymond Toy at 2022-01-30T15:40:37-08:00
Only allocate altstack once.
Initialize altstack to NULL, so that we can tell if we need to
allocate space for it.
- - - - -
1 changed file:
- src/lisp/interrupt.c
Changes:
=====================================
src/lisp/interrupt.c
=====================================
@@ -406,7 +406,7 @@ interrupt_maybe_gc(HANDLER_ARGS)
\****************************************************************/
#if defined(__linux__)
-char* altstack;
+char* altstack = NULL;
#else
char altstack[SIGNAL_STACK_SIZE];
#endif
@@ -436,7 +436,14 @@ interrupt_install_low_level_handler(int signal, void handler(HANDLER_ARGS))
sigstack.ss_sp = (void *) SIGNAL_STACK_START;
#else
#if defined(__linux__)
- altstack = malloc(SIGSTKSZ);
+ /*
+ * For gcc 11.2 (clang 13.0), we need to allocate altstack
+ * dynamically. Do this here, but only if we haven't already
+ * allocated space.
+ */
+ if (altstack == NULL) {
+ altstack = malloc(SIGSTKSZ);
+ }
#endif
sigstack.ss_sp = (void *) altstack;
#endif
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/e6dd7ca518562373e4a1bf6…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/e6dd7ca518562373e4a1bf6…
You're receiving this email because of your account on gitlab.common-lisp.net.