;;;; -*- coding: utf-8; -*-
changes in sbcl-0.9.11 relative to sbcl-0.9.10:
- * new port: SBCL now works on x86/Darwin, including MacOS X 10.4.5
- on Intel.
+ * new platform: experimental support for SBCL x86/Darwin, including
+ MacOS X 10.4.5 on Intel.
* new feature: Unicode character names are now known to the system
(through CHAR-NAME and NAME-CHAR).
+ * minor incompatible change: the contrib modules SB-POSIX and
+ SB-BSD-SOCKETS no longer depend on stub C libraries; the intent of
+ this change is to make it easier to distribute
+ location-independent binaries.
* bug fix: as implied by AMOP, standardized classes no longer have
slots named by external symbols of public packages. (reported by
Pascal Costanza)
+++ /dev/null
-#include <netdb.h>
-
-int get_h_errno()
-{
- return h_errno;
-}
+++ /dev/null
-/* create a .o file with undefined references to all the C stuff we need
- * that cmucl hasn't already fouind for us. Not needed on Linux/i386
- * because it has dynamic loading anyway
- */
-
-void likewecare() {
- getprotobyname();
-}
-
(defpackage #:sb-bsd-sockets-system (:use #:asdf #:sb-grovel #:cl))
(in-package #:sb-bsd-sockets-system)
-;;; we also have a shared library with some .o files in it
-
-(defclass unix-dso (module) ())
-(defun unix-name (pathname)
- (namestring
- (typecase pathname
- (logical-pathname (translate-logical-pathname pathname))
- (t pathname))))
-
-(defmethod asdf::input-files ((operation compile-op) (dso unix-dso))
- (mapcar #'component-pathname (module-components dso)))
-
-(defmethod output-files ((operation compile-op) (dso unix-dso))
- (let ((dir (component-pathname dso)))
- (list
- (make-pathname :type "so"
- :name (car (last (pathname-directory dir)))
- :directory (butlast (pathname-directory dir))
- :defaults dir))))
-
-
-(defmethod perform :after ((operation compile-op) (dso unix-dso))
- (let ((dso-name (unix-name (car (output-files operation dso)))))
- (unless (zerop
- (run-shell-command
- "gcc ~A -o ~S ~{~S ~}"
- (concatenate 'string
- (sb-ext:posix-getenv "EXTRA_LDFLAGS")
- " "
- #+sunos "-shared -lresolv -lsocket -lnsl"
- #+darwin "-bundle"
- #-(or darwin sunos) "-shared")
- dso-name
- (mapcar #'unix-name
- (mapcan (lambda (c)
- (output-files operation c))
- (module-components dso)))))
- (error 'operation-error :operation operation :component dso))))
-
-;;; if this goes into the standard asdf, it could reasonably be extended
-;;; to allow cflags to be set somehow
-(defmethod output-files ((op compile-op) (c c-source-file))
- (list
- (make-pathname :type "o" :defaults
- (component-pathname c))))
-(defmethod perform ((op compile-op) (c c-source-file))
- (unless
- (= 0 (run-shell-command "gcc ~A -o ~S -c ~S"
- (concatenate 'string
- (sb-ext:posix-getenv "EXTRA_CFLAGS")
- " "
- "-fPIC")
- (unix-name (car (output-files op c)))
- (unix-name (component-pathname c))))
- (error 'operation-error :operation op :component c)))
-
-(defmethod perform ((operation load-op) (c c-source-file))
- t)
-
-(defmethod perform ((o load-op) (c unix-dso))
- (let ((co (make-instance 'compile-op)))
- (let ((filename (car (output-files co c))))
- #+cmu (ext:load-foreign filename)
- #+sbcl (sb-alien:load-shared-object filename))))
-
(defsystem sb-bsd-sockets
:version "0.58"
:depends-on (sb-grovel)
#+sb-building-contrib "SYS:CONTRIB;SB-BSD-SOCKETS;"
:components ((:file "defpackage")
(:file "split" :depends-on ("defpackage"))
- (:unix-dso "alien"
- :components ((:c-source-file "undefs")
- (:c-source-file "get-h-errno")))
(:file "malloc" :depends-on ("defpackage"))
(sb-grovel:grovel-constants-file
"constants"
(:file "sockopt" :depends-on ("sockets"))
(:file "inet" :depends-on ("sockets" "split" "constants" ))
(:file "local" :depends-on ("sockets" "split" "constants" ))
- (:file "name-service" :depends-on ("sockets" "constants" "alien"))
+ (:file "name-service" :depends-on ("sockets" "constants"))
(:file "misc" :depends-on ("sockets" "constants"))
(:static-file "NEWS")
+++ /dev/null
-/*
- * stat-macros.c
- *
- * Inspired mostly by section 4.3 and 4.21 of APUE
- *
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-int s_isreg(mode_t mode)
-{
- return S_ISREG(mode);
-}
-
-
-int s_isdir(mode_t mode)
-{
- return S_ISDIR(mode);
-}
-
-
-int s_ischr(mode_t mode)
-{
- return S_ISCHR(mode);
-}
-
-
-int s_isblk(mode_t mode)
-{
- return S_ISBLK(mode);
-}
-
-
-int s_isfifo(mode_t mode)
-{
- return S_ISFIFO(mode);
-}
-
-
-int s_islnk(mode_t mode)
-{
-#ifdef S_ISLNK
- return S_ISLNK(mode);
-#else
- return ((mode & S_IFMT) == S_IFLNK);
-#endif
-}
-
-
-int s_issock(mode_t mode)
-{
-#ifdef S_ISSOCK
- return S_ISSOCK(mode);
-#else
- return ((mode & S_IFMT) == S_IFSOCK);
-#endif
-}
-
-
+++ /dev/null
-#include <sys/types.h>
-#include <sys/wait.h>
-
-int wifexited(int status) {
- return WIFEXITED(status);
-}
-
-int wexitstatus(int status) {
- return WEXITSTATUS(status);
-}
-
-int wifsignaled(int status) {
- return WIFSIGNALED(status);
-}
-
-int wtermsig(int status) {
- return WTERMSIG(status);
-}
-
-int wifstopped(int status) {
- return WIFSTOPPED(status);
-}
-
-int wstopsig(int status) {
- return WSTOPSIG(status);
-}
-
-/* FIXME: POSIX also defines WIFCONTINUED, but that appears not to
- exist on at least Linux... */
(defpackage #:sb-posix-system (:use #:asdf #:cl #:sb-grovel))
(in-package #:sb-posix-system)
-
-;;; we also have a shared library with some .o files in it
-;;;
-;;; FIXME: we share this with SB-BSD-SOCKETS. This should either (a)
-;;; be part of ASDF itself, or (b) be in a shared file that we can
-;;; LOAD at this point.
-(defclass unix-dso (module) ())
-(defun unix-name (pathname)
- (namestring
- (typecase pathname
- (logical-pathname (translate-logical-pathname pathname))
- (t pathname))))
-
-(defmethod asdf::input-files ((operation compile-op) (dso unix-dso))
- (mapcar #'component-pathname (module-components dso)))
-
-(defmethod output-files ((operation compile-op) (dso unix-dso))
- (let ((dir (component-pathname dso)))
- (list
- (make-pathname :type "so"
- :name (car (last (pathname-directory dir)))
- :directory (butlast (pathname-directory dir))
- :defaults dir))))
-
-
-(defmethod perform :after ((operation compile-op) (dso unix-dso))
- (let ((dso-name (unix-name (car (output-files operation dso)))))
- (unless (zerop
- (run-shell-command
- "gcc ~A -o ~S ~{~S ~}"
- (concatenate 'string
- (sb-ext:posix-getenv "EXTRA_LDFLAGS")
- " "
- #+sunos "-shared -lresolv -lsocket -lnsl"
- #+darwin "-bundle"
- #-(or darwin sunos) "-shared")
- dso-name
- (mapcar #'unix-name
- (mapcan (lambda (c)
- (output-files operation c))
- (module-components dso)))))
- (error 'operation-error :operation operation :component dso))))
-
-;;; if this goes into the standard asdf, it could reasonably be extended
-;;; to allow cflags to be set somehow
-(defmethod output-files ((op compile-op) (c c-source-file))
- (list
- (make-pathname :type "o" :defaults
- (component-pathname c))))
-(defmethod perform ((op compile-op) (c c-source-file))
- (unless
- (= 0 (run-shell-command "gcc ~A -o ~S -c ~S"
- (concatenate
- 'string
- (sb-ext:posix-getenv "EXTRA_CFLAGS")
- " "
- "-fPIC")
- (unix-name (car (output-files op c)))
- (unix-name (component-pathname c))))
- (error 'operation-error :operation op :component c)))
-
-(defmethod perform ((operation load-op) (c c-source-file))
- t)
-
-(defmethod perform ((o load-op) (c unix-dso))
- (let ((co (make-instance 'compile-op)))
- (let ((filename (car (output-files co c))))
- #+cmu (ext:load-foreign filename)
- #+sbcl (sb-alien:load-shared-object filename))))
-
(defsystem sb-posix
:depends-on (sb-grovel)
#+sb-building-contrib :pathname
#+sb-building-contrib "SYS:CONTRIB;SB-POSIX;"
:components ((:file "defpackage")
(:file "designator" :depends-on ("defpackage"))
- (:unix-dso "alien"
- :components ((:c-source-file "stat-macros")
- (:c-source-file "waitpid-macros")))
(:file "macros" :depends-on ("designator"))
(sb-grovel:grovel-constants-file
"constants"
:package :sb-posix :depends-on ("defpackage"))
- (:file "interface" :depends-on ("constants" "macros" "designator" "alien"))))
+ (:file "interface" :depends-on ("constants" "macros" "designator"))))
(defsystem sb-posix-tests
:depends-on (sb-rt)
/*
* wrappers around low-level operations to provide a simpler interface
- * to the operations that Lisp needs
+ * to the operations that Lisp (and some contributed modules) needs.
*
* The functions in this file are typically called directly from Lisp.
* Thus, when their signature changes, they don't need updates in a .h
#include <unistd.h>
#ifndef LISP_FEATURE_WIN32
#include <pwd.h>
+#include <sys/wait.h>
+#include <netdb.h>
#endif
#include <stdio.h>
return 0;
}
#endif
+
+
+/* We will need to define these things or their equivalents for Win32
+ eventually, but for now let's get it working for everyone else. */
+#ifndef LISP_FEATURE_WIN32
+/* From SB-BSD-SOCKETS, to get h_errno */
+int get_h_errno()
+{
+ return h_errno;
+}
+
+/* From SB-POSIX, wait-macros */
+int wifexited(int status) {
+ return WIFEXITED(status);
+}
+int wexitstatus(int status) {
+ return WEXITSTATUS(status);
+}
+int wifsignaled(int status) {
+ return WIFSIGNALED(status);
+}
+int wtermsig(int status) {
+ return WTERMSIG(status);
+}
+int wifstopped(int status) {
+ return WIFSTOPPED(status);
+}
+int wstopsig(int status) {
+ return WSTOPSIG(status);
+}
+
+/* FIXME: POSIX also defines WIFCONTINUED, but that appears not to
+ exist on at least Linux... */
+
+/* From SB-POSIX, stat-macros */
+int s_isreg(mode_t mode)
+{
+ return S_ISREG(mode);
+}
+int s_isdir(mode_t mode)
+{
+ return S_ISDIR(mode);
+}
+int s_ischr(mode_t mode)
+{
+ return S_ISCHR(mode);
+}
+int s_isblk(mode_t mode)
+{
+ return S_ISBLK(mode);
+}
+int s_isfifo(mode_t mode)
+{
+ return S_ISFIFO(mode);
+}
+int s_islnk(mode_t mode)
+{
+#ifdef S_ISLNK
+ return S_ISLNK(mode);
+#else
+ return ((mode & S_IFMT) == S_IFLNK);
+#endif
+}
+int s_issock(mode_t mode)
+{
+#ifdef S_ISSOCK
+ return S_ISSOCK(mode);
+#else
+ return ((mode & S_IFMT) == S_IFSOCK);
+#endif
+}
+#endif /* !LISP_FEATURE_WIN32 */
;;; 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".)
-"0.9.10.19"
+"0.9.10.20"