changes relative to sbcl-1.0.46:
* enhancement: --script muffles style-warnings and compiler notes. (lp#677779)
* enhancement: redefinition warnings for macros from different files. (lp#434657)
+ * enhancement: better MACHINE-VERSION on Darwin x86 and x86-64. (lp#668332)
* bug fix: SB-DEBUG:BACKTRACE-AS-LIST guards against potentially leaking
stack-allocated values out of their dynamic-extent. (lp#310175)
* bug fix: attempts to use SB-SPROF for wallclock profiling on threaded
(newp (* t))
(newlen sb!unix:size-t))
+#!+darwin
+(define-alien-routine ("sysctlbyname" %sysctlbyname) int
+ (name c-string)
+ (oldp (* t))
+ (oldlenp (* sb!unix:size-t))
+ (newp (* t))
+ (newlen sb!unix:size-t))
+
(defun sysctl (type &rest name)
#!+sb-doc
"Retrieves an integer or string value with the given name."
(free-alien result)
(sb!unix::newcharstar-string result)))))))))
+#!+darwin
+(defun sysctlbyname (type name)
+ #!+sb-doc
+ "Retrieves an integer or string value with the given name."
+ (with-alien ((result-len sb!unix:size-t))
+ (ecase type
+ (:int
+ (with-alien ((result int))
+ (setf result-len (alien-size int :bytes))
+ (unless (minusp (%sysctlbyname name (addr result)
+ (addr result-len) nil 0))
+ result)))
+ (:str
+ (unless (minusp (%sysctlbyname name nil (addr result-len) nil 0))
+ (with-alien ((result (* char) (make-alien char result-len)))
+ (if (minusp (%sysctlbyname name result (addr result-len) nil 0))
+ (free-alien result)
+ (sb!unix::newcharstar-string result))))))))
+
(defun software-type ()
#!+sb-doc
"Return a string describing the supporting software."
;;; support for CL:MACHINE-VERSION defined OAOO elsewhere
(defun get-machine-version ()
- ;; FIXME: on Darwin we would prefer machdep.cpu.brand_string -- but I can't
- ;; seem to grab it using sysctl() -- but the shell tool finds it. When
- ;; someone has the time, check out how Darwin shell sysctl does it.
- (sysctl :str ctl-hw hw-model))
+ (or #!+darwin (sysctlbyname :str "machdep.cpu.brand_string")
+ (sysctl :str ctl-hw hw-model)))
;;; 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.46.5"
+"1.0.46.6"