From b2f01c86f388284405fa28405fe97898fe158c02 Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Sun, 2 Sep 2007 03:06:27 +0000 Subject: [PATCH] 1.0.9.27: Fix large file support for MIPS. --- make-config.sh | 6 ++++-- src/code/unix.lisp | 4 ++-- src/runtime/Config.mips-linux | 8 ++++++++ src/runtime/wrap.c | 2 +- version.lisp-expr | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/make-config.sh b/make-config.sh index 50d1714eb..bacc7971a 100644 --- a/make-config.sh +++ b/make-config.sh @@ -166,9 +166,11 @@ case "$sbcl_os" in # If you add other platforms here, don't forget to edit # src/runtime/Config.foo-linux too. - if [ $sbcl_arch = "x86" ]; then + case "$sbcl_arch" in + x86 | mips) printf ' :largefile' >> $ltf - fi + ;; + esac if [ $sbcl_arch = "x86-64" ]; then link_or_copy Config.x86_64-linux Config diff --git a/src/code/unix.lisp b/src/code/unix.lisp index 7021ce4a1..d8473d137 100644 --- a/src/code/unix.lisp +++ b/src/code/unix.lisp @@ -660,7 +660,7 @@ SYSCALL-FORM. Repeat evaluation of SYSCALL-FORM if it is interrupted." (struct wrapped_stat (st-dev #!-(or mips largefile) unsigned-int #!+mips unsigned-long - #!+largefile dev-t) + #!+largefile #!-mips dev-t) (st-ino ino-t) (st-mode mode-t) (st-nlink nlink-t) @@ -668,7 +668,7 @@ SYSCALL-FORM. Repeat evaluation of SYSCALL-FORM if it is interrupted." (st-gid gid-t) (st-rdev #!-(or mips largefile) unsigned-int #!+mips unsigned-long - #!+largefile dev-t) + #!+largefile #!-mips dev-t) (st-size #!-(or darwin mips largefile) unsigned-int #!+(or darwin mips largefile) off-t) #!+(and darwin) diff --git a/src/runtime/Config.mips-linux b/src/runtime/Config.mips-linux index 1356ec7f4..9f32f3cc5 100644 --- a/src/runtime/Config.mips-linux +++ b/src/runtime/Config.mips-linux @@ -18,6 +18,14 @@ ARCH_SRC = mips-arch.c OS_SRC = linux-os.c mips-linux-os.c OS_LIBS = -ldl +ifdef LISP_FEATURE_LARGEFILE + CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +endif + +ifdef LISP_FEATURE_SB_THREAD + OS_LIBS += -lpthread +endif + GC_SRC = cheneygc.c # Nothing to do for after-grovel-headers. diff --git a/src/runtime/wrap.c b/src/runtime/wrap.c index 1fad2d79f..376beaf64 100644 --- a/src/runtime/wrap.c +++ b/src/runtime/wrap.c @@ -167,7 +167,7 @@ wrapped_readlink(char *path) * * Some motivated spark fixed MIPS. -- ths, 2005-10-06 */ -#if defined (LISP_FEATURE_LARGEFILE) +#if defined(LISP_FEATURE_LARGEFILE) && !defined(LISP_FEATURE_MIPS) typedef dev_t ffi_dev_t; typedef off_t ffi_off_t; #elif defined(LISP_FEATURE_MIPS) diff --git a/version.lisp-expr b/version.lisp-expr index c32fc9194..5bfc8fa98 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.9.26" +"1.0.9.27"