'("-D_LARGEFILE_SOURCE"
"-D_LARGEFILE64_SOURCE"
"-D_FILE_OFFSET_BITS=64")
- #+(and x86-64 darwin)
- '("-arch" "x86_64")
+ #+(and x86-64 darwin inode64)
+ '("-arch" "x86_64"
+ "-mmacosx-version-min=10.5"
+ "-D_DARWIN_USE_64_BIT_INODE")
+ #+(and x86-64 darwin (not inode64))
+ '("-arch" "x86_64"
+ "-mmacosx-version-min=10.4")
#+(and x86 darwin)
- '("-arch" "i386")
+ '("-arch" "i386"
+ "-mmacosx-version-min=10.4")
#+(and x86-64 sunos) '("-m64")
(list "-o"
(namestring tmp-a-dot-out)
(defmacro define-stat-call (name arg designator-fun type)
;; FIXME: this isn't the documented way of doing this, surely?
- (let ((lisp-name (lisp-for-c-symbol name)))
+ (let ((lisp-name (lisp-for-c-symbol name))
+ (real-name #+inode64 (format nil "~A$INODE64" name)
+ #-inode64 name))
`(progn
(export ',lisp-name :sb-posix)
(declaim (inline ,lisp-name))
(declare (type (or null stat) stat))
(with-alien-stat a-stat ()
(let ((r (alien-funcall
- (extern-alien ,(real-c-name (list name :options :largefile)) ,type)
+ (extern-alien ,(real-c-name (list real-name :options :largefile)) ,type)
(,designator-fun ,arg)
a-stat)))
(when (minusp r)
result)))
#.sb-posix::eacces)
\f
-#-darwin
(deftest stat.1
(let* ((stat (sb-posix:stat *test-directory*))
(mode (sb-posix::stat-mode stat)))
(logand mode (logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec)))
#.(logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec))
-#-(or darwin win32)
+#-win32
(deftest stat.2
(let* ((stat (sb-posix:stat "/"))
(mode (sb-posix::stat-mode stat)))
(< (- atime unix-now) 10))
t)
-#-(or darwin win32)
+#-win32
(deftest stat.4
(let* ((stat (sb-posix:stat (make-pathname :directory '(:absolute :up))))
(mode (sb-posix::stat-mode stat)))
(sb-posix:s-isreg mode))
nil)
-#-darwin
(deftest stat-mode.2
(with-stat-mode (mode *test-directory*)
(sb-posix:s-isdir mode))
(sb-posix:s-issock mode))
nil)
-#-(or win32 darwin)
+#-win32
(deftest stat-mode.7
(let ((link-pathname (make-pathname :name "stat-mode.7"
:defaults *test-directory*)))
(ignore-errors (sb-posix:unlink link-pathname))))
t)
-#-darwin
(deftest stat-mode.8
(let ((pathname (make-pathname :name "stat-mode.8"
:defaults *test-directory*)))
t)
-#-(or darwin win32)
+#-win32
(deftest time.1
(plusp (sb-posix:time))
t)
-#-(or darwin win32)
+#-win32
(deftest utimes.1
(let ((file (merge-pathnames #p"utimes.1" *test-directory*))
(atime (random (1- (expt 2 31))))
printf ":%s" "$sbcl_arch" >> $ltf
echo //setting up OS-dependent information
+
+# Under Darwin x86-64, guess whether Darwin 9+ or below.
+if [ "$sbcl_os" = "darwin" ] && [ "$sbcl_arch" = "x86-64" ]; then
+ darwin_version=`uname -r`
+ darwin_version_major=${DARWIN_VERSION_MAJOR:-${darwin_version%%.*}}
+ if (( 8 < $darwin_version_major )); then
+ ver9_or_above="9+"
+ printf ' :inode64' >> $ltf
+ fi
+fi
+
original_dir=`pwd`
cd ./src/runtime/
rm -f Config target-arch-os.h target-arch.h target-os.h target-lispregs.h
fi
link_or_copy $sbcl_arch-darwin-os.h target-arch-os.h
link_or_copy bsd-os.h target-os.h
- link_or_copy Config.$sbcl_arch-darwin Config
+ link_or_copy Config.$sbcl_arch-darwin$ver9_or_above Config
;;
sunos)
printf ' :unix' >> $ltf
--- /dev/null
+# -*- makefile -*- for the C-level run-time support for SBCL
+
+# This software is part of the SBCL system. See the README file for
+# more information.
+#
+# This software is derived from the CMU CL system, which was
+# written at Carnegie Mellon University and released into the
+# public domain. The software is in the public domain and is
+# provided with absolutely no warranty. See the COPYING and CREDITS
+# files for more information.
+
+CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.5 -D_DARWIN_USE_64_BIT_INODE
+LINKFLAGS += -mmacosx-version-min=10.5
+OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c darwin-dlshim.c darwin-langinfo.c
+OS_LIBS = -lSystem -lc -ldl
+ifdef LISP_FEATURE_SB_THREAD
+ OS_LIBS += -lpthread
+endif
+
+ASSEM_SRC = x86-64-assem.S ldso-stubs.S
+ARCH_SRC = x86-64-arch.c
+
+LINKFLAGS += -arch x86_64 -dynamic -twolevel_namespace -bind_at_load -pagezero_size 0x100000
+
+CFLAGS += -arch x86_64 -fno-omit-frame-pointer -pagezero_size 0x100000
+
+GC_SRC = gencgc.c
+
+# Nothing to do for after-grovel-headers.
+.PHONY: after-grovel-headers
+after-grovel-headers:
"fork"
"free"
"fstat"
+ #!+inode64 "fstat$INODE64"
"fsync"
"ftruncate"
"getcwd"
"log1p"
"lseek"
"lstat"
+ #!+inode64 "lstat$INODE64"
"malloc"
"memmove"
"mkdir"
"sinh"
"socket"
"stat"
+ #!+inode64 "stat$INODE64"
"strerror"
"strlen"
"symlink"
;;; 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.34.8"
+"1.0.34.9"