First, create a project folder to hold the files you are
- going to create. When your project is complete, the folder will
- contain a nibfile that defines the user interface, and
- a Lisp source file that defines the behavior of the
- application. Those two files are really all there is to a Lisp
- application, though not all applications are as simple as this
- currency converter. For more complex applications it makes sense
- to split your UI into several nibfiles, and to split your
- implementation into several source files. The basic principle
- remains the same, however: nibfiles define your user interface,
- and Lisp files define your application's behavior.
Create a folder somewhere convenient, and name it
- "currency-converter". Next we will use Apple's InterfaceBuilder
- application to create the user interface The next page tells you
- how to do that; when you create your nibfile, save it into your
- "currency-converter" folder.
-
-
-
-
diff --git a/examples/cocoa/currency-converter/HOWTO_files/pages/writing_lisp.html b/examples/cocoa/currency-converter/HOWTO_files/pages/writing_lisp.html
deleted file mode 100644
index 154f7e163..000000000
--- a/examples/cocoa/currency-converter/HOWTO_files/pages/writing_lisp.html
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
-
-
In this section we'll write Lisp code that duplicates the
- features provided by the Objective-C code in Apple's
- tutorial. In Apple's tutorial, the explanation of the Objective
- C code begins with the
- section Bridging
- the Model and View: The Controller .
-
-
The Lisp code in this section of the HOWTO is considerably
- simpler than the corresponding Objective-C code, in part
- because we can ignore the conventions that XCode uses for
- laying out source files. We can just write all our definitions
- into a single Lisp source file, and load that file into Clozure CL
- when we are ready to build the application.
-
-
-
First Things First
-
-
-
-
Place the following line at the top of your Lisp source file:
-
-
(in-package "CCL")
-
-
Clozure CL's Objective-C bridge code is defined in the "CCL"
- package. Usually, when building an application, you'll create a
- package for that application and import the definitions you need
- to use. In order to keep the discussion short in this simple
- example, we just place all our definitions in the "CCL"
- package.
-
-
-
-
-
Defining the Converter Class
-
-
-
-
We begin by defining the Converter class. Recall from Apple's
- tutorial that this is the Model class that implements the
- conversion between dollars and other currencies. Here is the
- Lisp definition that implements the class you created in
- InterfaceBuilder:
-
-
-(defclass converter (ns:ns-object)
- ()
- (:metaclass ns:+ns-object))
-
-
-
-
-
This is an ordinary CLOS class definition, with a couple of
- simple wrinkles. First, the superclass it inherits from is the
- NS-OBJECT class in the "NS" package. NS-OBJECT is an Objective-C
- class, the ancestor of all Objective-C objects. This CLOS
- definition actually creates a new Objective-C class named
- "Converter".
-
-
We tell Clozure CL how to build the right kind of class object
- by including the :METACLASS option in the definition:
-
-
- (:metaclass ns:+ns-object)
-
-
-
The Objective-C bridge knows that when the metaclass
- is ns:+ns-object
, it must lay out the class object
- in memory as an Objective-C class, rather than a normal CLOS
- STANDARD-CLASS.
-
-
Next, we define the method "convertCurrency:atRate:":
-
-
-(objc:defmethod (#/convertCurrency:atRate: :float)
- ((self converter) (currency :float) (rate :float))
- (* currency rate))
-
-
-
This is the method that actually does the currency
- conversion. It's a Lisp method that will be called when the
- AppKit sends the Objective-C message "convertCurrency:atRate:"
- It's very simple—really, it just multiples
- currency
times rate
. Most of the text in the definition is
- Objective-C bridge code that links the definition to the right
- class with the right argument and return types.
-
-
objc:defmethod
is a version of DEFMETHOD that
- creates methods that can execute in response to Objective-C
- message-sends.
-
-
The syntax #/convertCurrency:atRate:
uses the
- "#/" reader macro to read a symbol with case preserved, so that
- you can see in your code the same name that Objective-C uses for
- the method, without worrying about how the name might be
- converted between Lisp and Objective-C conventions.
-
-
The number of arguments to an Objective-C method is the
- number of colons in the name, plus one. Each colon indicates an
- argument, and there is always an extra "self" argument that
- refers to the object that receives the message. These are normal
- Objective-C conventions, but we perhaps need to emphasize the
- details, since we are using Lisp code to call the Objective-C
- methods.
-
-
We indicate the return type and the types of arguments in
- the method definition by surrounding parameters and the method
- name with parentheses, and appending the type name.
-
-
Thus, for example,
-
-
-(#/convertCurrency:atRate: :float)
-
-
-
means that the return type of the method is :FLOAT, and
-
-
-(self converter)
-
-
-
means that the type of the receiving object is Converter.
-
-
You will see these same conventions repeated in the next
- section.
-
-
-
-
Defining the ConverterController Class
-
-
-
-
The previous section defined the Model class, Converter. All
- we need now is a definition for the ConverterController
- class. Recall from your reading of Apple's Tutorial that the
- CurrencyConverter example uses the Model-View-Controller
- paradigm. You used InterfaceBuilder to construct the
- application's views. The Converter class provides the model
- that represents application data. Now we define the controller
- class, ConverterController, which connects the View and the
- Model.
-
-
Here's the definition of the ConverterController class:
-
-
-(defclass converter-controller (ns:ns-object)
- ((amount-field :foreign-type :id :accessor amount-field)
- (converter :foreign-type :id :accessor converter)
- (dollar-field :foreign-type :id :accessor dollar-field)
- (rate-field :foreign-type :id :accessor rate-field))
- (:metaclass ns:+ns-object))
-
-
-
Once again we use the Objective-C bridge to define an
- Objective-C class. This time, we provide several
- instance-variable definitions in the class, and name accessors
- for each of them explicitly. The :FOREIGN-TYPE
- initargs enable us to specify the type of each field in the
- foreign (Objective-C) class.
-
-
Each field in the definition of the ConverterController class
- is an outlet that will be used to store a reference to one of
- the text fields that you created in InterfaceBuilder. For
- example, amount-field
will be connected to the
- "Amount" text field.
-
-
Why did we spell the name "amount-field" in Lisp code, and
- "amountField" when creating the outlet in InterfaceBuilder? The
- Objective-C bridge automatically converts Lisp-style field names
- (like "amount-field") to Objective-C-style field names (like
- "amountField"), when handling class definitions.
-
-
The converter
field at launch time contains a
- reference to the Converter object, whose class definition is in
- the previous section.
-
-
The final piece of the implementation is a definition of the
- "convert:" method. This is the method that is called when a
- user clicks the "Convert" button in the user interface.
-
-
-(objc:defmethod (#/convert: :void) ((self converter-controller) sender)
- (declare (ignore sender))
- (let* ((conv (converter self))
- (dollar-field (dollar-field self))
- (rate-field (rate-field self))
- (amount-field (amount-field self))
- (dollars (#/floatValue dollar-field))
- (rate (#/floatValue rate-field))
- (amount (#/convertCurrency:atRate: conv dollars rate)))
- (#/setFloatValue: amount-field amount)
- (#/selectText: rate-field self)))
-
-
-
Just as in the Apple example, this method reads the dollar
- and rate values, and passes them to the
- "convertCurrency:atRate:" method of the Converter class. It then
- sets the text of the amount-field to reflect the result of the
- conversion. The only significant difference between this
- implementation and Apple's is that the code is written in Lisp
- rather than Objective-C.
-
-
This completes the definition of the CurrencyConverter's
- behavior. All that remains is to actually build the Cocoa
- application. The next section shows how to do that.
-
-
-
-
-
-
-
-
diff --git a/examples/cocoa/currency-converter/HOWTO_files/stylesheets/styles.css b/examples/cocoa/currency-converter/HOWTO_files/stylesheets/styles.css
deleted file mode 100644
index bb6542461..000000000
--- a/examples/cocoa/currency-converter/HOWTO_files/stylesheets/styles.css
+++ /dev/null
@@ -1,55 +0,0 @@
-body {
- background-color: white;
- font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
-}
-
-.title {
- text-align: center;
- font-size: 16pt;
-}
-
-.subtitle {
- font-size: medium;
- font-weight: bold;
- text-align: center;
-}
-
-.byline {
- text-align: center;
- font-weight: bold;
- font-size: small;
-}
-
-.section-head {
- padding-top: 2em;
- padding-left: 1em;
-}
-
-.body-text {
- font: 12pt Georgia, "Times New Roman", Times, serif;
- margin-left: 4em;
- margin-right: 4em;
- text-indent: 3em;
-}
-
-.note {
- font: 12pt Georgia, "Times New Roman", Times, serif;
- margin-left: 6em;
- margin-right: 6em;
- text-indent: 0em;
-}
-
-.inline-image {
- text-align: center;
-}
-
-.nav {
- text-align: center;
- font-size: large;
- font-weight: bold;
- padding-top: 4em;
-}
-
-li, pre {
- text-indent: 0;
-}
\ No newline at end of file
diff --git a/examples/cocoa/currency-converter/currency-converter.lisp b/examples/cocoa/currency-converter/currency-converter.lisp
deleted file mode 100644
index 3489a5b88..000000000
--- a/examples/cocoa/currency-converter/currency-converter.lisp
+++ /dev/null
@@ -1,54 +0,0 @@
-(in-package "CCL")
-
-;;; define the classes referenced in the nibfile
-
-(defclass converter (ns:ns-object)
- ()
- (:metaclass ns:+ns-object))
-
-(objc:defmethod (#/convertCurrency:atRate: :float)
- ((self converter) (currency :float) (rate :float))
- (* currency rate))
-
-(defclass converter-controller (ns:ns-object)
- ((amount-field :foreign-type :id :accessor amount-field)
- (converter :foreign-type :id :accessor converter)
- (dollar-field :foreign-type :id :accessor dollar-field)
- (rate-field :foreign-type :id :accessor rate-field))
- (:metaclass ns:+ns-object))
-
-(objc:defmethod (#/convert: :void) ((self converter-controller) sender)
- (declare (ignore sender))
- (let* ((conv (converter self))
- (dollar-field (dollar-field self))
- (rate-field (rate-field self))
- (amount-field (amount-field self))
- (dollars (#/floatValue dollar-field))
- (rate (#/floatValue rate-field))
- (amount (#/convertCurrency:atRate: conv dollars rate)))
- (#/setFloatValue: amount-field amount)
- (#/selectText: rate-field self)))
-
-
-
-
-#|
-"/Users/mikel/Valise/clozure/openmcl/example-code/currency-converter/CurrencyConverter.nib"
-
-building the app:
-
-(progn
- (setf (current-directory) "/Users/mikel/Valise/clozure/openmcl/example-code/currency-converter/")
- (load "currency-converter")
- (require "build-application")
- (ccl::build-application :name "CurrencyConverter"
- :main-nib-name "CurrencyConverter"
- :directory "/Users/mikel/Desktop/"
- :nibfiles '(#P"/usr/local/openmcl/trunk/ccl/examples/cocoa/currency-converter/CurrencyConverter.xib")))
-
-TODO NOTES:
-
-The name of the app in the main menu title is determined by the CFBundleName field in the
-InfoPlist.strings file in the English.lproj resources folder.
-
-|#
\ No newline at end of file
diff --git a/examples/cocoa/nib-loading/HOWTO.html b/examples/cocoa/nib-loading/HOWTO.html
deleted file mode 100644
index 62a666255..000000000
--- a/examples/cocoa/nib-loading/HOWTO.html
+++ /dev/null
@@ -1,441 +0,0 @@
-
-
-
-
Nib-Loading HOWTO
-
-
-
-
-
-
-
Nib-Loading HOWTO
-
-
-
-
This HOWTO shows how you can load nibfiles
- into a running copy of Clozure CL by evaluating Lisp forms. You
- might want to load nibfiles this way to test user-interface
- elements that you are working on for an application project, or
- to enable an application to dynamically load optional
- user-interface elements.
-
-
-
-
-
Nibfiles
-
-
-
-
A large part of developing Cocoa applications is creating
- user-interface elements using the Cocoa frameworks. Although
- it's perfectly possible to create any user-interface element
- just by making method calls against the frameworks, the more
- standard way to design a user interface is to use Apple's
- InterfaceBuilder application to
- create nibfiles —files of archived
- Objective-C objects that implement the user-interface
- elements.
-
-
InterfaceBuilder is an application that ships with Apple's
- Developer Tools. The Developer Tools are an optional install
- that comes with Mac OS X. Before you can use this HOWTO, you'll
- need to make sure that Apple's Developer Tools are installed on
- your system. Members of Apple's developer programs may download
- the tools for free from
- Apple's developer
- website , but normally there is no need. You can simply
- use the optional Developer Tools installer on the Mac OS X
- system disks to install the tools.
-
-
-
-
Using Nibfiles
-
-
-
-
Using InterfaceBuilder, you can quickly and easily create
- windows, dialog boxes, text fields, buttons, and other
- user-interface elements. The elements you create with
- InterfaceBuilder have the standard appearance and behavior
- specified by Apple's Human Interface Guidelines.
-
-
InterfaceBuilder saves descriptions of these objects
- in nibfiles . These files contain archived
- representations of Objective-C classes and objects. When you
- launch an application and it loads a nibfile, the Cocoa runtime
- creates these Objective-C objects in memory, complete with any
- instance-variable references to other objects that might have
- been saved in the nibfile. In short, a nibfile is an archived
- collection of user-interface objects that Cocoa can quickly and
- easily revive in memory.
-
-
The normal way that Objective-C programmers use nibfiles is
- by storing them in an application bundle. The application's
- Info.plist file (also stored in the bundle) specifies which
- nibfile is the application's main nibfile, and that file is
- loaded automatically when the application starts up. The
- application can dynamically load other nibfiles from the bundle
- by making method calls.
-
-
Lisp applications written with Clozure CL can also use
- nibfiles in this same fashion (see the "currency-converter"
- HOWTO in the "cocoa" examples folder), but Lisp programmers are
- accustomed to highly interactive development, and might want to
- simply load an arbitrary nibfile into a running Clozure CL
- session. Fortunately, this is easy to do.
-
-
-
-
How To Load a Nibfile
-
-
-
-
Let's start by loading a very simple nibfile from the Clozure
- CL Listener window. Start by launching the Clozure CL
- application.
-
-
In the same directory as this HOWTO file, you'll find a
- nibfile named "hello.nib". This is an extremely simple nibfile
- that creates a single Cocoa window with a greeting in it. We'll
- use forms typed into the Listener window to load it.
-
-
We're going to call the Objective-C class
- method loadNibFile:externalNameTable:withZone:
to
- load the nibfile into memory, creating the window that is
- described in the file. First, though, we need to set up some
- data structures that we'll pass to this method.
-
-
The arguments
- to loadNibFile:externalNameTable:withZone:
are a
- pathname, a dictionary object, and a memory zone. As with every
- Objective-C method call, we also pass the object that receives
- the message, which in this case is the class NSBundle.
-
-
The pathname is just a reference to the nibfile we want to
- load. The dictionary holds references to objects. In this
- first simple example, we'll use it only to identify the
- nibfile's owner, which in this case is the application
- itself. The zone is a reference to the area of memory where
- the nibfile objects will be allocated.
-
-
Don't worry if none of this makes sense to you; the code to
- create these objects is simple and straightforward, and should
- help clarify what's going on.
-
-
-
1. Get the Zone
-
-
-
First, we'll get a memory zone. We'll tell Cocoa to allocate
- the nibfile objects in the same zone that the application
- uses, so getting a zone is a simple matter of asking the
- application for the one it's using.
-
-
Before we can ask the application anything, we need a
- reference to it. When the Clozure CL application starts up,
- it stores a reference to the Cocoa application object into
- the special variable *NSApp*.
-
-
Start by changing to the CCL package; most of the utility
- functions we'll use are defined in that package:
-
-
- ? (in-package :ccl)
- #<Package "CCL">
-
-
-
We have a reference to the running Clozure CL application
- object in the special variable *NSApp*. We can ask it for its
- zone, where it allocates objects in memory:
-
-
- ? (setf *my-zone* (#/zone *NSApp*))
- #<A Foreign Pointer #x8B000>
-
-
-
Now we have a reference to the application's zone, which is
- one of the parameters we need to pass
- to loadNibFile:externalNameTable:withZone:
.
-
-
-
2. Make a Dictionary
-
-
-
The dictionary argument
- to loadNibFile:externalNameTable:withZone:
is
- used for two purposes: to identify the nibfile's owner, and
- to collect toplevel objects.
-
-
The nibfile's owner becomes the owner of all the toplevel
- objects created when the nibfile is loaded, objects such as
- windows, buttons, and so on. A nibfile's owner manages the
- objects created when the nibfile is loaded, and provides a
- way for your code to get references to those objects. You
- supply an owner object in the dictionary, under the
- key "NSNibOwner"
.
-
-
The toplevel objects are objects, such as windows, that are
- created when the nibfile is loaded. To collect these, you
- can pass an NSMutableArray
object under the
- key NSNibTopLevelObjects
.
-
-
For this first example, we'll pass an owner object (the
- application object), but we don't need to collect toplevel
- objects, so we'll omit
- the NSNibTopLevelObjects
key.
-
-
- ? (setf *my-dict*
- (#/dictionaryWithObject:forKey: ns:ns-mutable-dictionary
- *my-app*
- #@"NSNibOwner"))
- #<NS-MUTABLE-DICTIONARY {
- NSNibOwner = <LispApplication: 0x1b8e10>;
- } (#x137F3DD0)>
-
-
-
-
-
3. Load the Nibfile
-
-
-
Now that we have the zone and the dictionary we need, we
- can load the nibfile. We just need to create an NSString with
- the proper pathname first:
-
-
- ? (setf *nib-path*
- (%make-nsstring
- (namestring "/usr/local/openmcl/ccl/examples/cocoa/nib-loading/hello.nib")))
- #<NS-MUTABLE-STRING "/usr/local/openmcl/ccl/examples/cocoa/nib-loading/hello.nib" (#x13902C10)>
-
-
-
Now we can actually load the nibfile, passing the method
- the objects we've created:
-
-
- ? (#/loadNibFile:externalNameTable:withZone:
- ns:ns-bundle
- *nib-path*
- *my-dict*
- *my-zone*)
- T
-
-
-
The window defined in the "hello.nib" file should appear
- on the
- screen. The loadNibFile:externalNameTable:withZone:
- method returns T
to indicate it loaded the
- nibfile successfully; if it had failed, it would have
- returned NIL
.
-
-
At this point we no longer need the pathname and
- dictionary objects. The *nib-path* we must release:
-
-
- ? (setf *nib-path* (#/release *nib-path*))
- NIL
-
-
-
The *my-dict* instance was not created with #/alloc (or with
- MAKE-INSTANCE), so it is already autoreleased, and we don't need
- to release it again.
-
-
-
Making a Nib-loading Function
-
-
-
Loading a nibfile seems like something we might want to do
- repeatedly, and so it makes sense to make it as easy as possible
- to do. Let's make a single function we can call to load a nib as
- needed.
-
-
The nib-loading function can take the file to be loaded as a
- parameter, and then perform the sequence of steps covered in the
- previous section. If we just literally do that, the result will
- look something like this:
-
-
-(defun load-nibfile (nib-path)
- (let* ((app-zone (#/zone *NSApp*))
- (nib-name (%make-nsstring (namestring nib-path)))
- (dict (#/dictionaryWithObject:forKey:
- ns-mutable-dictionary app #@"NSNibOwner")))
- (#/loadNibFile:externalNameTable:withZone: ns:ns-bundle
- nib-name
- dict
- app-zone
- )))
-
-
-
The trouble with this function is that it leaks a string
- every time we call it. We need to release the
- nib-name
before returning. So how about this
- version instead?
-
-
-(defun load-nibfile (nib-path)
- (let* ((app-zone (#/zone *NSApp*))
- (nib-name (%make-nsstring (namestring nib-path)))
- (dict (#/dictionaryWithObject:forKey:
- ns-mutable-dictionary app #@"NSNibOwner"))
- (result (#/loadNibFile:externalNameTable:withZone: ns:ns-bundle
- nib-name
- dict
- app-zone)))
- (#/release nib-name)
- result))
-
-
-
This version solves the leaking problem by binding the result
- of the load call to result
, then releasing the
- nib-name
before returning the result of the
- load.
-
-
There's just one more problem: what if we want to use the
- dictionary to collect the nibfile's toplevel objects, so that we
- can get access to them from our code? We'll need another version
- of our function.
-
-
In order to collect toplevel objects, we'll want to pass an
- NSMutableArray object in the dictionary, stored under the key
- NSNibTopLevelObjects
. So we first need to create such an
- array object in the let
form:
-
-
-(let* (...
- (objects-array (#/arrayWithCapacity: ns:ns-mutable-array 16))
- ...)
- ...)
-
-
-
Now that we have the array in which to store the nibfile's
- toplevel objects, we need to change the code that creates the
- dictionary, so that it contains not only the owner object, but
- also the array we just created:
-
-
- (let* (...
- (dict (#/dictionaryWithObjectsAndKeys: ns:ns-mutable-dictionary
- app #@"NSNibOwner"
- objects-array #&NSNibTopLevelObjects
- +null-ptr+))
- ...)
- ...)
-
-
-
-
We now want to collect the objects in it. We'll do that by
- making a local variable to store them, then iterating over the
- array object to get them all. (Normally, when we want to keep
- an object from an array, we have to retain it. Top-level nib
- objects are a special case: they are created by the nib loading
- process with a retain count of 1, and we are responsible for releasing
- them when we're through with them.)
-
-
- (let* (...
- (toplevel-objects (list))
- ...)
- (dotimes (i (#/count objects-array))
- (setf toplevel-objects
- (cons (#/objectAtIndex: objects-array i)
- toplevel-objects)))
- ...)
-
-
-
After collecting the objects, we can release the array, then
- return the list of objects. It's still possible we might want
- to know whether the load succeeded, so we
- use values
to return both the toplevel objects and
- the success or failure of the load.
-
-
The final version of the nib-loading code looks like
- this:
-
-
-(defun load-nibfile (nib-path)
- (let* ((app-zone (#/zone *NSApp*))
- (nib-name (%make-nsstring (namestring nib-path)))
- (objects-array (#/arrayWithCapacity: ns:ns-mutable-array 16))
- (dict (#/dictionaryWithObjectsAndKeys: ns:ns-mutable-dictionary
- *NSApp* #@"NSNibOwner"
- objects-array #&NSNibTopLevelObjects
- +null-ptr+))
- (toplevel-objects (list))
- (result (#/loadNibFile:externalNameTable:withZone: ns:ns-bundle
- nib-name
- dict
- app-zone)))
- (dotimes (i (#/count objects-array))
- (setf toplevel-objects
- (cons (#/objectAtIndex: objects-array i)
- toplevel-objects)))
- (#/release nib-name)
- (values toplevel-objects result)))
-
-
-
Now we can call this function with some suitable nibfile,
- such as simple "hello.nib" that comes with this HOWTO:
-
-
-? (ccl::load-nibfile "hello.nib")
-(#<LISP-APPLICATION <LispApplication: 0x1b8da0> (#x1B8DA0)>
- #<NS-WINDOW <NSWindow: 0x171344d0> (#x171344D0)>)
-T
-
-
-
-
The "Hello!" window appears on the screen, and two values are
- returned. The first value is the list of toplevel objects that
- were loaded. The second value, T
indicates that the
- nibfile was loaded successfully.
-
-
-
What About Unloading Nibfiles?
-
-
-
Cocoa provides no general nibfile-unloading API. Instead, if
- you want to unload a nib, the accepted approach is to close all
- the windows associated with a nibfile and release all the
- toplevel objects. This is one reason that you might want to use
- the "NSNibTopLevelObjects"
key with the dictionary
- object that you pass
- to loadNibFile:externalNameTable:withZone:
—to
- obtain a collection of toplevel objects that you release when
- the nibfile is no longer needed.
-
-
In document-based Cocoa applications, the main nibfile is
- usually owned by the application object, and is never unloaded
- while the application runs. Auxliliary nibfiles are normally
- owned by controller objects, usually instances of
- NSWindowController
subclasses. When you
- use NSWindowController
objects to load nibfiles,
- they take responsibility for loading and unloading nibfile
- objects.
-
-
When you're experimenting interactively with nibfile loading,
- you may not start out by
- creating NSWindowController
objects to load
- nibfiles, and so you may need to do more of the object
- management yourself. On the one hand, loading nibfiles by hand
- is not likely to be the source of major application problems. On
- the other hand, if you experiment with nib-loading for a long
- time in an interactive session, it's possible that you'll end up
- with numerous discarded objects cluttering memory, along with
- various references to live and possibly released objects. Keep
- this in mind when using the Listener to explore Cocoa. You can
- always restore your Lisp system to a clean state by restarting
- it, but of course you then lose whatever state you have built up
- in your explorations. It's often a good idea to work from a text
- file rather than directly in the Listener, so that you have a
- record of the experimenting you've done. That way, if you need
- to start fresh (or if you accidentally cause the application to
- crash), you don't lose all the information you gained.
-
-
-
-
-
-
diff --git a/examples/cocoa/nib-loading/HOWTO_files/images/bosco.jpg b/examples/cocoa/nib-loading/HOWTO_files/images/bosco.jpg
deleted file mode 100644
index c7b33f661..000000000
Binary files a/examples/cocoa/nib-loading/HOWTO_files/images/bosco.jpg and /dev/null differ
diff --git a/examples/cocoa/nib-loading/HOWTO_files/stylesheets/styles.css b/examples/cocoa/nib-loading/HOWTO_files/stylesheets/styles.css
deleted file mode 100644
index bb6542461..000000000
--- a/examples/cocoa/nib-loading/HOWTO_files/stylesheets/styles.css
+++ /dev/null
@@ -1,55 +0,0 @@
-body {
- background-color: white;
- font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
-}
-
-.title {
- text-align: center;
- font-size: 16pt;
-}
-
-.subtitle {
- font-size: medium;
- font-weight: bold;
- text-align: center;
-}
-
-.byline {
- text-align: center;
- font-weight: bold;
- font-size: small;
-}
-
-.section-head {
- padding-top: 2em;
- padding-left: 1em;
-}
-
-.body-text {
- font: 12pt Georgia, "Times New Roman", Times, serif;
- margin-left: 4em;
- margin-right: 4em;
- text-indent: 3em;
-}
-
-.note {
- font: 12pt Georgia, "Times New Roman", Times, serif;
- margin-left: 6em;
- margin-right: 6em;
- text-indent: 0em;
-}
-
-.inline-image {
- text-align: center;
-}
-
-.nav {
- text-align: center;
- font-size: large;
- font-weight: bold;
- padding-top: 4em;
-}
-
-li, pre {
- text-indent: 0;
-}
\ No newline at end of file
diff --git a/examples/cocoa/nib-loading/hello.nib/designable.nib b/examples/cocoa/nib-loading/hello.nib/designable.nib
deleted file mode 100644
index 3eb29b818..000000000
--- a/examples/cocoa/nib-loading/hello.nib/designable.nib
+++ /dev/null
@@ -1,269 +0,0 @@
-
-
-
- 1050
- 9B18
- 629
- 949
- 343.00
-
- YES
-
-
-
- YES
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
- YES
-
- NSObject
-
-
- FirstResponder
-
-
- NSApplication
-
-
- 271
- 2
- {{196, 453}, {201, 57}}
- 536870912
- Hello!
- NSWindow
-
-
-
- 256
-
- YES
-
-
- 268
- {{17, 20}, {167, 17}}
-
-
- YES
-
- 67239488
- 272630784
- Hello from the nib loader!
-
- LucidaGrande
- 1.300000e+01
- 1044
-
-
-
- 6
- System
- controlColor
-
- 3
- MC42NjY2NjY2OQA
-
-
-
- 6
-
- controlTextColor
-
- 3
- MAA
-
-
-
-
-
- {201, 57}
-
-
-
- {{0, 0}, {1920, 1178}}
-
-
-
-
- YES
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- -2
-
-
- RmlsZSdzIE93bmVyA
-
-
- -1
-
-
- First Responder
-
-
- -3
-
-
- Application
-
-
- 1
-
-
- YES
-
-
-
-
-
- 2
-
-
- YES
-
-
-
-
-
- 3
-
-
- YES
-
-
-
-
-
- 4
-
-
-
-
-
-
- YES
-
- YES
- -1.IBPluginDependency
- -2.IBPluginDependency
- -3.IBPluginDependency
- 1.IBPluginDependency
- 1.IBWindowTemplateEditedContentRect
- 1.NSWindowTemplate.visibleAtLaunch
- 1.WindowOrigin
- 1.editorWindowContentRectSynchronizationRect
- 2.IBPluginDependency
- 3.IBPluginDependency
- 4.IBPluginDependency
-
-
- YES
-
-
-
-
- {{513, 516}, {201, 57}}
-
- {196, 240}
- {{513, 516}, {201, 57}}
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
-
-
- YES
-
- YES
-
-
- YES
-
-
-
-
- YES
-
- YES
-
-
- YES
-
-
-
- 4
-
-
-
- YES
-
-
- 0
-
- 3
-
- YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhcmNoaXZlclgkb2JqZWN0cxIA
-AYag0QAHAAhdSUIub2JqZWN0ZGF0YYABXxAPTlNLZXllZEFyY2hpdmVyrxBCAAsADAAxADUANgA7ADwA
-QQBVAFYAVwBYAAsAZQBpAHUAdgCGAIcAjwCQAJMAnACdAJ4AowClAKoAqwCuALIAuAC8AAsAvQC/AMAA
-wwDHAMoA0gDVANYA2ADgAOkA8gDzAPQA9QD2APcA+AD7AP4BBwBSAKEBEAERARIBEwEUARcBGgEdVSRu
-dWxs3xASAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAn
-ACgAKQAqACsALAAtAC4ALwAwVk5TUm9vdFYkY2xhc3NdTlNPYmplY3RzS2V5c18QD05TQ2xhc3Nlc1Zh
-bHVlc18QGU5TQWNjZXNzaWJpbGl0eU9pZHNWYWx1ZXNdTlNDb25uZWN0aW9uc1tOU05hbWVzS2V5c1tO
-U0ZyYW1ld29ya11OU0NsYXNzZXNLZXlzWk5TT2lkc0tleXNdTlNOYW1lc1ZhbHVlc18QGU5TQWNjZXNz
-aWJpbGl0eUNvbm5lY3RvcnNdTlNGb250TWFuYWdlcl8QEE5TVmlzaWJsZVdpbmRvd3NfEA9OU09iamVj
-dHNWYWx1ZXNfEBdOU0FjY2Vzc2liaWxpdHlPaWRzS2V5c1lOU05leHRPaWRcTlNPaWRzVmFsdWVzgAKA
-QYAngDWAQIAmgCyABYA0gDaALYA+gACABoArgD8QBoA30gAOADIAMwA0W05TQ2xhc3NOYW1lgASAA1hO
-U09iamVjdNIANwA4ADkAOlgkY2xhc3Nlc1okY2xhc3NuYW1logA6ADVeTlNDdXN0b21PYmplY3RfEBBJ
-QkNvY29hRnJhbWV3b3Jr0gAOAD0APgA/Wk5TLm9iamVjdHOAJaEAQIAH2gBCAA4AQwBEAEUARgBHAEgA
-SQBKAEsATABNAE4ATwBQAFEAUgBTACtcTlNXaW5kb3dWaWV3XE5TU2NyZWVuUmVjdF1OU1dpbmRvd1Rp
-dGxlWU5TV1RGbGFnc11OU1dpbmRvd0NsYXNzXE5TV2luZG93UmVjdF8QD05TV2luZG93QmFja2luZ18Q
-EU5TV2luZG93U3R5bGVNYXNrW05TVmlld0NsYXNzgAuAJIAjgAkSIAAAAIAKgAgQAhEBD4AAXxAXe3sx
-OTYsIDQ1M30sIHsyMDEsIDU3fX1WSGVsbG8hWE5TV2luZG931wBZAA4AWgBbAFwAVwBdAF4AXwBgAGEA
-YgBeAGRfEA9OU05leHRSZXNwb25kZXJaTlNTdWJ2aWV3c1hOU3ZGbGFnc1tOU0ZyYW1lU2l6ZVtOU1N1
-cGVydmlld4AMgCKADREBAIAggAyAIdIADgA9AGYAZ4AfoQBogA7YAFkADgBqAGsAWwBsAFcAXQBLAG4A
-bwBwAHEAcgBeAEtXTlNGcmFtZVZOU0NlbGxZTlNFbmFibGVkgAuAHoAPgBARAQwJgAyAC18QFXt7MTcs
-IDIwfSwgezE2NywgMTd9fdgAdwAOAHgAeQB6AHsAfAB9AH4AfwCAAIEAggBoAIQAhVtOU0NlbGxGbGFn
-c18QEU5TQmFja2dyb3VuZENvbG9yWk5TQ29udGVudHNZTlNTdXBwb3J0XU5TQ29udHJvbFZpZXdcTlND
-ZWxsRmxhZ3MyW05TVGV4dENvbG9yEgQB/kCAHYAVgBGAEoAOEhBABACAGl8QGkhlbGxvIGZyb20gdGhl
-IG5pYiBsb2FkZXIh1AAOAIgAiQCKAIsAjACNAI5WTlNTaXplVk5TTmFtZVhOU2ZGbGFnc4AUI0AqAAAA
-AAAAgBMRBBRcTHVjaWRhR3JhbmRl0gA3ADgAkQCSogCSADVWTlNGb2501QAOAJQAlQCWAJcAmACZAC8A
-mgCbV05TQ29sb3JcTlNDb2xvclNwYWNlW05TQ29sb3JOYW1lXU5TQ2F0YWxvZ05hbWWAGYAYgBeAFlZT
-eXN0ZW1cY29udHJvbENvbG9y0wAOAJUAnwCYAKEAoldOU1doaXRlgBkQA0swLjY2NjY2NjY5ANIANwA4
-AKQAlKIAlAA11QAOAJQAlQCWAJcAmACnAC8AqACbgBmAHIAbgBZfEBBjb250cm9sVGV4dENvbG9y0wAO
-AJUAnwCYAKEArYAZQjAA0gA3ADgArwCwpACwALEAawA1XxAPTlNUZXh0RmllbGRDZWxsXE5TQWN0aW9u
-Q2VsbNIANwA4ALMAtKUAtAC1ALYAtwA1W05TVGV4dEZpZWxkWU5TQ29udHJvbFZOU1ZpZXdbTlNSZXNw
-b25kZXLSADcAOAC5ALqjALoAuwA1Xk5TTXV0YWJsZUFycmF5V05TQXJyYXlZezIwMSwgNTd90gA3ADgA
-vgC2owC2ALcANV8QFnt7MCwgMH0sIHsxOTIwLCAxMTc4fX3SADcAOADBAMKiAMIANV8QEE5TV2luZG93
-VGVtcGxhdGXSADcAOADEAMWjAMUAxgA1XE5TTXV0YWJsZVNldFVOU1NldNIADgA9AGYAyYAfoNIADgA9
-AMsAzIAqpQBLAGgAzwBAAHCAC4AOgCiAB4AQ0gAOADIAMwDUgASAKV1OU0FwcGxpY2F0aW9u0gA3ADgA
-1wC7ogC7ADXSAA4APQDLANqAKqUAQABLAB8AHwBogAeAC4ACgAKADtIADgA9AMsA4oAqpgBLAGgAzwBA
-AB8AcIALgA6AKIAHgAKAENIADgA9AMsA64AqpgDsAO0A7gDvAPAA8YAugC+AMIAxgDKAM1xDb250ZW50
-IFZpZXdfEChTdGF0aWMgVGV4dCAoSGVsbG8gZnJvbSB0aGUgbmliIGxvYWRlciEpW0FwcGxpY2F0aW9u
-XxAPV2luZG93IChIZWxsbyEpXEZpbGUncyBPd25lcl8QLFRleHQgRmllbGQgQ2VsbCAoSGVsbG8gZnJv
-bSB0aGUgbmliIGxvYWRlciEp0gAOAD0AywD6gCqg0gAOAD0AywD9gCqg0gAOAD0AywEAgCqmAEsAaADP
-AEAAHwBwgAuADoAogAeAAoAQ0gAOAD0AywEJgCqmAQoBCwEMAQ0BDgEPgDiAOYA6gDuAPIA9E///////
-///9EAEQBRAE0gAOAD0AZgEWgB+g0gAOAD0AywEZgCqg0gAOAD0AywEcgCqg0gA3ADgBHgEfogEfADVe
-TlNJQk9iamVjdERhdGEACAAZACIAJwAxADoAPwBEAFIAVABmAO0A8wE+AUUBTAFaAWwBiAGWAaIBrgG8
-AccB1QHxAf8CEgIkAj4CSAJVAlcCWQJbAl0CXwJhAmMCZQJnAmkCawJtAm8CcQJzAnUCdwJ5AoICjgKQ
-ApICmwKkAq0CuAK9AswC3wLoAvMC9QL4AvoDIwMwAz0DSwNVA2MDcAOCA5YDogOkA6YDqAOqA68DsQOz
-A7UDuAO6A9QD2wPkBAEEEwQeBCcEMwQ/BEEEQwRFBEgESgRMBE4EVwRZBFwEXgR/BIcEjgSYBJoEnASe
-BKAEowSkBKYEqATABOEE7QUBBQwFFgUkBTEFPQVCBUQFRgVIBUoFTAVRBVMFcAWBBYgFjwWYBZoFowWl
-BagFtQW+BcMFygXfBecF9AYABg4GEAYSBhQGFgYdBioGNwY/BkEGQwZPBlgGXQZyBnQGdgZ4BnoGjQaa
-BpwGnwaoBrEGwwbQBtkG5AbwBvoHAQcNBxYHHQcsBzQHPgdHB04HZwdwB3UHiAeRB5gHpQerB7QHtge3
-B8AHwgfNB88H0QfTB9UH1wfgB+IH5AfyB/sIAAgJCAsIFggYCBoIHAgeCCAIKQgrCDgIOgg8CD4IQAhC
-CEQITQhPCFwIXghgCGIIZAhmCGgIdQigCKwIvgjLCPoJAwkFCQYJDwkRCRIJGwkdCSoJLAkuCTAJMgk0
-CTYJPwlBCU4JUAlSCVQJVglYCVoJYwllCWcJaQlyCXQJdQl+CYAJgQmKCYwJjQmWCZsAAAAAAAACAgAA
-AAAAAAEgAAAAAAAAAAAAAAAAAAAJqg
-
-
-
diff --git a/examples/cocoa/nib-loading/hello.nib/keyedobjects.nib b/examples/cocoa/nib-loading/hello.nib/keyedobjects.nib
deleted file mode 100644
index 817849ec0..000000000
Binary files a/examples/cocoa/nib-loading/hello.nib/keyedobjects.nib and /dev/null differ
diff --git a/examples/cocoa/nib-loading/nib-loading.lisp b/examples/cocoa/nib-loading/nib-loading.lisp
deleted file mode 100644
index 049d617ab..000000000
--- a/examples/cocoa/nib-loading/nib-loading.lisp
+++ /dev/null
@@ -1,37 +0,0 @@
-;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: cl-user -*-
-;;;; ***********************************************************************
-;;;; FILE IDENTIFICATION
-;;;;
-;;;; Name: nib-loading.lisp
-;;;; Version: 0.1
-;;;; Project: cocoa examples
-;;;; Purpose: examples of loading nibs dynamically in the IDE
-;;;;
-;;;; ***********************************************************************
-
-(in-package :ccl)
-
-(defun load-nibfile (nib-path)
- (let* ((app-zone (#/zone *NSApp*))
- (nib-name (%make-nsstring (namestring nib-path)))
- (objects-array (#/arrayWithCapacity: ns:ns-mutable-array 16))
- (dict (#/dictionaryWithObjectsAndKeys: ns:ns-mutable-dictionary
- *NSApp* #&NSNibOwner
- objects-array #&NSNibTopLevelObjects
- +null-ptr+))
- (toplevel-objects (list))
- (result (#/loadNibFile:externalNameTable:withZone: ns:ns-bundle
- nib-name
- dict
- app-zone)))
- (dotimes (i (#/count objects-array))
- (setf toplevel-objects
- (cons (#/objectAtIndex: objects-array i)
- toplevel-objects)))
- (#/release nib-name)
- (values toplevel-objects result)))
-
-#|
-(ccl::load-nibfile "/usr/local/openmcl/trunk/source/examples/cocoa/nib-loading/hello.nib")
-|#
-
diff --git a/examples/sockets/socket-test.lisp b/examples/sockets/socket-test.lisp
index c78bd6e7b..ec92ba148 100644
--- a/examples/sockets/socket-test.lisp
+++ b/examples/sockets/socket-test.lisp
@@ -74,7 +74,7 @@
(defun send-message (socket string socket-address)
(let ((reply (encode-string-to-octets string)))
- (send-to socket reply (length reply) :remote socket-address)))
+ (send-to socket reply (length reply) :remote-address socket-address)))
(defun run-datagram-test (address-family &rest args &key host port)
(with-open-socket (server-socket :address-family address-family :type :datagram :local-host host :local-port port)
diff --git a/level-0/X86/x86-misc.lisp b/level-0/X86/x86-misc.lisp
index fac868da2..6414ab4f4 100644
--- a/level-0/X86/x86-misc.lisp
+++ b/level-0/X86/x86-misc.lisp
@@ -406,6 +406,21 @@
(shrq ($ 1) (% arg_z))
(single-value-return))
+(defx86lapfunction rdtscp ()
+ (:byte #x0f) ;three-byte rdtscp opcode
+ (:byte #x01) ;is #x0f #x01 xf9
+ (:byte #xf9)
+ (shlq ($ 32) (% rdx))
+ (orq (% rdx) (% rax))
+ (imul ($ (* 2 target::node-size)) (% rax) (% arg_z))
+ (shrq ($ 1) (% arg_z))
+ (shlq ($ target::fixnumshift) (% rcx))
+ (push (% arg_z))
+ (push (% rcx))
+ (set-nargs 2)
+ (lea (@ '2 (% rsp)) (% temp0))
+ (jmp-subprim .SPvalues))
+
;;; Return all 64 bits of the time-stamp counter as an unsigned integer.
(defx86lapfunction rdtsc64 ()
(:byte #x0f) ;two-byte rdtsc opcode
diff --git a/level-0/X86/x86-numbers.lisp b/level-0/X86/x86-numbers.lisp
index 0d2f4deaf..52732b3c3 100644
--- a/level-0/X86/x86-numbers.lisp
+++ b/level-0/X86/x86-numbers.lisp
@@ -340,9 +340,37 @@
(movq (% allocptr) (% arg_z))
(movq (% xmm0) (@ x8664::complex-single-float.realpart (% arg_z)))
(single-value-return))
-
-
+;;; Write the hex digits (including leading zeros) that represent the
+;;; unsigned-byte contained in FIXNUM into STRING, which must be long
+;;; enough. END-IDX is the position in the string where the rightmost
+;;; hex digit should go. END-IDX should be 14 for (unsigned-byte 60),
+;;; and 7 for (unsigned-byte 32). This function assumes that the
+;;; starting index (for the leftmost hex digit) is 0.
+(defx86lapfunction %ub-fixnum-hex-digits ((end-idx arg_x) (fixnum arg_y)
+ (string arg_z))
+ (let ((index imm1))
+ ;; We want index to start out as the index into the string of the
+ ;; rightmost hex digit. Thus, for (unsigned-byte 60), index will
+ ;; be 14. For (unsigned-byte 32), it will be 7.
+ (unbox-fixnum end-idx index)
+ (unbox-fixnum fixnum imm2)
+ ;; Fill in string, from right to left, with hex digits of fixnum.
+ @loop
+ (movl ($ #xf) (% imm0.l))
+ (andl (% imm2.l) (% imm0.l)) ;get low nibble
+ (cmpl ($ 10) (% imm0.l)) ;convert to char code
+ (jb @small)
+ ;; extra for digits #\A through #\F
+ (addl ($ 7) (% imm0.l))
+ @small
+ ;; 48 is (char-code #\0)
+ (addl ($ 48) (% imm0.l))
+ (movl (% imm0.l) (@ x8664::misc-data-offset (% string) (% index) 4))
+ (sarq ($ 4) (% imm2)) ;shift in next lowest nibble
+ (subq ($ 1) (% index))
+ (jae @loop)
+ (single-value-return)))
;;; End of x86-numbers.lisp
) ; #+x8664-target
diff --git a/level-0/X86/x86-utils.lisp b/level-0/X86/x86-utils.lisp
index 4fcf68719..4888c241b 100644
--- a/level-0/X86/x86-utils.lisp
+++ b/level-0/X86/x86-utils.lisp
@@ -79,7 +79,7 @@
(defx86lapfunction %object-in-heap-area-p ((object arg_y) (area arg_z))
(rcmp (% object) (@ x8664::area.low (% area)))
(setae (%b imm0))
- (rcmp (% object) (@ x8664::area.low (% area)))
+ (rcmp (% object) (@ x8664::area.active (% area)))
(setb (%b imm1))
(andb (% imm1.b) (% imm0.b))
(andl ($ x8664::t-offset) (%l imm0))
diff --git a/level-0/l0-array.lisp b/level-0/l0-array.lisp
index eca148ba2..d17d0d880 100644
--- a/level-0/l0-array.lisp
+++ b/level-0/l0-array.lisp
@@ -703,7 +703,6 @@ minimum number of elements to add if it must be extended."
(setf (uvref data (the fixnum (+ offset rmi))) val))))))))))))))
-
(defun schar (s i)
"SCHAR returns the character object at an indexed position in a string
just as CHAR does, except the string must be a simple-string."
@@ -713,47 +712,41 @@ minimum number of elements to add if it must be extended."
(aref (the simple-string s) i)
(report-bad-arg s 'simple-string))))
-
(defun %scharcode (s i)
(let* ((typecode (typecode s)))
(declare (fixnum typecode))
(if (= typecode target::subtag-simple-base-string)
- (locally
- (declare (optimize (speed 3) (safety 0)))
+ (locally (declare (optimize (speed 3) (safety 0)))
(aref (the (simple-array (unsigned-byte 32) (*)) s) i))
- (report-bad-arg s 'simple-string))))
-
+ (report-bad-arg s 'simple-string))))
(defun set-schar (s i v)
(let* ((typecode (typecode s)))
(declare (fixnum typecode))
(if (= typecode target::subtag-simple-base-string)
(setf (aref (the simple-string s) i) v)
- (report-bad-arg s 'simple-string))))
+ (report-bad-arg s 'simple-string))))
-
(defun %set-scharcode (s i v)
(let* ((typecode (typecode s)))
(declare (fixnum typecode))
(if (= typecode target::subtag-simple-base-string)
- (locally
- (declare (optimize (speed 3) (safety 0)))
+ (locally (declare (optimize (speed 3) (safety 0)))
(setf (aref (the simple-string s) i) v))
- (report-bad-arg s 'simple-string))))
-
+ (report-bad-arg s 'simple-string))))
-; Strings are simple-strings, start & end values are sane.
+;;; Strings are simple-strings, start & end values are sane.
(defun %simple-string= (str1 str2 start1 start2 end1 end2)
(declare (fixnum start1 start2 end1 end2))
(when (= (the fixnum (- end1 start1))
(the fixnum (- end2 start2)))
(locally (declare (type simple-base-string str1 str2))
- (do* ((i1 start1 (1+ i1))
- (i2 start2 (1+ i2)))
- ((= i1 end1) t)
- (declare (fixnum i1 i2))
- (unless (eq (schar str1 i1) (schar str2 i2))
- (return))))))
+ (do* ((i1 start1 (1+ i1))
+ (i2 start2 (1+ i2)))
+ ((= i1 end1) t)
+ (declare (fixnum i1 i2))
+ (unless (eq (schar str1 i1) (schar str2 i2))
+ (return))))))
(defun copy-uvector (src)
(%extend-vector 0 src (uvsize src)))
@@ -772,7 +765,15 @@ minimum number of elements to add if it must be extended."
4
(if (= subtag target::subtag-double-float-vector)
6
- 0)))))
+ (if (= subtag target::subtag-complex-double-float-vector)
+ (return-from subtag-bytes
+ ;; There's a 32-bit pad at the beginning of the vector.
+ (+ 4 (ash element-count 4)))
+ (if (= subtag target::subtag-complex-single-float-vector)
+ (return-from subtag-bytes
+ ;; There's a 32-bit pad at the beginning of the vector.
+ (+ 4 (ash element-count 3)))
+ 0)))))))
(total-bits (ash element-count element-bit-shift)))
(ash (+ 7 total-bits) -3)))
@@ -810,7 +811,15 @@ minimum number of elements to add if it must be extended."
4
(if (= subtag x8632::subtag-double-float-vector)
6
- 0)))))
+ (if (= subtag x8632::subtag-complex-double-float-vector)
+ (return-from subtag-bytes
+ ;; There's a 32-bit pad at the beginning of the vector.
+ (+ 4 (ash element-count 4)))
+ (if (= subtag x8632::subtag-complex-single-float-vector)
+ (return-from subtag-bytes
+ ;; There's a 32-bit pad at the beginning of the vector.
+ (+ 4 (ash element-count 3)))
+ 0)))))))
(total-bits (ash element-count element-bit-shift)))
(ash (+ 7 total-bits) -3)))
@@ -830,9 +839,13 @@ minimum number of elements to add if it must be extended."
6
(if (= subtag x8664::subtag-bit-vector)
0
- (if (>= subtag x8664::min-8-bit-ivector-subtag)
- 3
- 4)))))
+ (if (= subtag x8664::subtag-complex-double-float-vector)
+ (return-from subtag-bytes
+ ;; There's a 64-bit pad at the beginning of the vector.
+ (+ 8 (ash element-count 4)))
+ (if (>= subtag x8664::min-8-bit-ivector-subtag)
+ 3
+ 4))))))
(total-bits (ash element-count element-bit-shift)))
(declare (fixnum ivector-class element-bit-shift total-bits))
(ash (the fixnum (+ 7 total-bits)) -3)))
@@ -867,9 +880,6 @@ minimum number of elements to add if it must be extended."
target::subtag-u16-vector)
((and (>= low 0) (<= high #xffffffff))
target::subtag-u32-vector)
- #+64-bit-target
- ((and (>= low 0) (<= high (1- (ash 1 64))))
- target::subtag-u64-vector)
((and (>= low -128) (<= high 127)) target::subtag-s8-vector)
((and (>= low -32768) (<= high 32767)) target::subtag-s16-vector)
#+32-bit-target
@@ -883,6 +893,9 @@ minimum number of elements to add if it must be extended."
(<= high target::target-most-positive-fixnum))
target::subtag-fixnum-vector)
#+64-bit-target
+ ((and (>= low 0) (<= high (1- (ash 1 64))))
+ target::subtag-u64-vector)
+ #+64-bit-target
((and (>= low (ash -1 63)) (<= high (1- (ash 1 63))))
target::subtag-s64-vector)
(t target::subtag-simple-vector))))
diff --git a/level-0/l0-bignum64.lisp b/level-0/l0-bignum64.lisp
index d6886398a..87cd279aa 100644
--- a/level-0/l0-bignum64.lisp
+++ b/level-0/l0-bignum64.lisp
@@ -2080,9 +2080,9 @@
(setf (bignum-ref bignum sign-index)
(logand #x7fffffff (the (unsigned-byte 32)
(random (expt 2 (1- digit-size)) state))))
- (let* ((result (mod bignum number)))
+ (let* ((result (mod (%normalize-bignum-macro bignum) number)))
(if (eq result bignum)
- (copy-uvector bignum)
+ (copy-bignum bignum)
result)))))
diff --git a/level-0/l0-cfm-support.lisp b/level-0/l0-cfm-support.lisp
index 3d95041c1..caca1dc08 100644
--- a/level-0/l0-cfm-support.lisp
+++ b/level-0/l0-cfm-support.lisp
@@ -723,6 +723,7 @@ return a fixnum representation of that address, else return NIL."
(when (%simple-string= name shlibname 0 0 namelen shlibnamelen)
(unless (shlib.base lib)
(setf (shlib.base lib) addr)
+ #+no; don't change soname of existing library
(let* ((soname (soname-from-mach-header addr)))
(when soname
(setf (shlib.soname lib) soname))))
diff --git a/level-0/l0-int.lisp b/level-0/l0-int.lisp
index 9c5faeb86..e02597eae 100644
--- a/level-0/l0-int.lisp
+++ b/level-0/l0-int.lisp
@@ -186,3 +186,52 @@
(declare (fixnum i))
(setq index (1- index))
(setf (schar string index) #\0)))))))
+
+#+x8664-target
+(defun %bignum-hex-digits (b string)
+ (let* ((size (uvsize b))
+ (temp-string (make-string 8))
+ (end 0))
+ (declare (type fixnum size end))
+ (declare (dynamic-extent temp-string))
+ (locally (declare (optimize (speed 3) (safety 0)))
+ (loop for i of-type fixnum from (the fixnum (1- size)) downto 0
+ for start2 of-type fixnum by 32
+ do (%ub-fixnum-hex-digits 7 (bignum-ref b i) temp-string)
+ (setq end (%i+ end 8))
+ (%copy-ivector-to-ivector temp-string 0 string start2 32)))
+ (values string end)))
+
+(defun write-unsigned-byte-hex-digits (u stream)
+ (setq u (require-type u '(unsigned-byte)))
+ #-x8664-target
+ (write u :stream stream :base 16)
+ #+x8664-target
+ (if (fixnump u)
+ (let* ((scratch (make-string 15)))
+ (declare (dynamic-extent scratch))
+ (%ub-fixnum-hex-digits 14 u scratch)
+ (let ((start (dotimes (i 15 nil)
+ (declare (fixnum i)
+ (optimize (speed 3) (safety 0)))
+ (unless (char= #\0 (schar scratch i))
+ (return i)))))
+ (if start
+ (write-string scratch stream :start start)
+ (write-string "0" stream))))
+ (let* ((scratch (make-string (the fixnum (ash (the fixnum (uvsize u)) 3))))
+ (start 0))
+ (declare (dynamic-extent scratch)
+ (fixnum start))
+ (multiple-value-bind (string end)
+ (%bignum-hex-digits u scratch)
+ ;; skip leading zeros (there will be a non-zero digit)
+ (let ((i 0))
+ (declare (type (unsigned-byte 56) i))
+ (loop
+ (if (char= #\0 (schar string i))
+ (setq start (%i+ start 1))
+ (return))
+ (setq i (%i+ i 1))))
+ (write-string string stream :start start :end end))))
+ nil)
diff --git a/level-0/l0-numbers.lisp b/level-0/l0-numbers.lisp
index e44e7b370..aee0d6bc8 100644
--- a/level-0/l0-numbers.lisp
+++ b/level-0/l0-numbers.lisp
@@ -1917,9 +1917,9 @@
(when (<= half-words 0) (return))
(incf index 2))
;; The bignum code expects normalized bignums
- (let* ((result (mod dividend number)))
+ (let* ((result (mod (%normalize-bignum-2 t dividend) number)))
(if (eq dividend result)
- (copy-uvector result)
+ (copy-bignum result)
result))))
(defun %float-random (number state)
diff --git a/level-1/l1-aprims.lisp b/level-1/l1-aprims.lisp
index e8b8dad30..1c1294616 100644
--- a/level-1/l1-aprims.lisp
+++ b/level-1/l1-aprims.lisp
@@ -56,6 +56,7 @@
(def-standard-initial-binding *random-state* (initial-random-state))
(def-standard-initial-binding *error-print-length* 20)
(def-standard-initial-binding *error-print-level* 8)
+(def-standard-initial-binding *error-print-string-length* :default)
(defun %badarg (arg type)
(%err-disp $XWRONGTYPE arg type))
diff --git a/level-1/l1-boot-3.lisp b/level-1/l1-boot-3.lisp
index 8da0f543d..50e7b87da 100644
--- a/level-1/l1-boot-3.lisp
+++ b/level-1/l1-boot-3.lisp
@@ -33,6 +33,8 @@
(define-character-encoding-alias :mule-utf-8 :utf-8)
+(set-pathname-encoding-name :utf-8)
+
(catch :toplevel
(or (find-package "COMMON-LISP-USER")
(make-package "COMMON-LISP-USER" :use '("COMMON-LISP" "CCL") :NICKNAMES '("CL-USER")))
diff --git a/level-1/l1-boot-lds.lisp b/level-1/l1-boot-lds.lisp
index 346c2377b..4f1f5ff5c 100644
--- a/level-1/l1-boot-lds.lisp
+++ b/level-1/l1-boot-lds.lisp
@@ -68,7 +68,7 @@ consulting services e-mail info@clozure.com or visit http://www.clozure.com.
(defun listener-function ()
(unless (or *inhibit-greeting* *quiet-flag*)
- (format t "~&Welcome to ~A ~A!~%"
+ (format t "~&~A ~A~%"
(lisp-implementation-type)
(lisp-implementation-version))
(unless *did-show-marketing-blurb*
diff --git a/level-1/l1-error-system.lisp b/level-1/l1-error-system.lisp
index 60874261a..330366dbb 100644
--- a/level-1/l1-error-system.lisp
+++ b/level-1/l1-error-system.lisp
@@ -54,7 +54,7 @@
(define-condition storage-condition (serious-condition) ())
-(define-condition thread-condition (serious-condition) ())
+(define-condition thread-condition (condition) ())
(define-condition process-reset (thread-condition)
((kill :initarg :kill :initform nil :reader process-reset-kill)))
diff --git a/level-1/l1-events.lisp b/level-1/l1-events.lisp
index a1a2d0493..b9c8996bd 100644
--- a/level-1/l1-events.lisp
+++ b/level-1/l1-events.lisp
@@ -241,7 +241,7 @@
(%install-periodic-task
'auto-flush-interactive-streams
'auto-flush-interactive-streams
- 33
+ (truncate *ticks-per-second* 3) ;run 3 times/sec
(+ $ptask_draw-flag $ptask_event-dispatch-flag)))
diff --git a/level-1/l1-files.lisp b/level-1/l1-files.lisp
index 5fe938eb4..78a59f7bf 100644
--- a/level-1/l1-files.lisp
+++ b/level-1/l1-files.lisp
@@ -887,7 +887,7 @@ a host-structure or string."
(values pos2 host)))))
(defun %directory-string-list (sstr start &optional (end (length sstr)) host)
- ;; Should use host to split by / vs. ; but for now suport both for either host,
+ ;; Should use host to split by / vs. ; but for now support both for either host,
;; like the mac version. It means that ';' has to be quoted in unix pathnames.
(declare (ignore host))
;This must cons up a fresh list, %expand-logical-directory rplacd's it.
@@ -910,7 +910,7 @@ a host-structure or string."
(when (and slash-pos semi-pos)
(error "Illegal directory string ~s" (%substr sstr start end)))
(if (null pos)
- (list :relative (std-part sstr start end))
+ (list :absolute (std-part sstr start end))
(let ((pos-char (%schar sstr pos)))
(cons (if (eq pos start)
(if (eq pos-char #\/) ':absolute ':relative)
diff --git a/level-1/l1-init.lisp b/level-1/l1-init.lisp
index fd83b5934..81db6aa85 100644
--- a/level-1/l1-init.lisp
+++ b/level-1/l1-init.lisp
@@ -165,7 +165,8 @@
(defconstant lambda-list-keywords
- '(&OPTIONAL &REST &AUX &KEY &ALLOW-OTHER-KEYS &BODY &ENVIRONMENT &WHOLE)
+ '(&OPTIONAL &REST &AUX &KEY &ALLOW-OTHER-KEYS &BODY &ENVIRONMENT &WHOLE
+ &lexpr &lap)
"symbols which are magical in a lambda list")
(defstatic *type-system-initialized* nil)
diff --git a/level-1/l1-io.lisp b/level-1/l1-io.lisp
index 2c24e05ef..046fd618b 100644
--- a/level-1/l1-io.lisp
+++ b/level-1/l1-io.lisp
@@ -256,6 +256,9 @@ printed using \"#:\" syntax. NIL means no prefix is printed.")
(defun default-print-length (val)
(if (eq val :default) *print-length* val))
+(defun default-print-string-length (val)
+ (if (eq val :default) *print-string-length* val))
+
;;;; ======================================================================
(defclass xp-stream (output-stream)
diff --git a/level-1/l1-lisp-threads.lisp b/level-1/l1-lisp-threads.lisp
index 05ea333ca..8c9c7f117 100644
--- a/level-1/l1-lisp-threads.lisp
+++ b/level-1/l1-lisp-threads.lisp
@@ -31,7 +31,7 @@
(defloadvar *ticks-per-second*
#+windows-target 1000
#-windows-target
- (#_sysconf #$_SC_CLK_TCK))
+ (max 1000 (#_sysconf #$_SC_CLK_TCK)))
(defloadvar *ns-per-tick*
(floor 1000000000 *ticks-per-second*))
diff --git a/level-1/l1-processes.lisp b/level-1/l1-processes.lisp
index 33b8a48ec..b5c15a912 100644
--- a/level-1/l1-processes.lisp
+++ b/level-1/l1-processes.lisp
@@ -512,7 +512,7 @@ predicate to return true."
(defun process-wait-with-timeout (whostate time function &rest args)
"Cause the current thread to wait for a given predicate to return true,
-or for a timeout to expire."
+or for a timeout to expire. Time is in ticks."
(declare (dynamic-extent args))
(cond ((null time) (apply #'process-wait whostate function args) t)
(t (let* ((win nil)
diff --git a/level-1/l1-reader.lisp b/level-1/l1-reader.lisp
index f294a3ed4..640697bc0 100644
--- a/level-1/l1-reader.lisp
+++ b/level-1/l1-reader.lisp
@@ -3104,7 +3104,13 @@ arg=char : read delimited list"
(defun source-note-source (source-note)
(when source-note
- (source-note.source (require-type source-note 'source-note))))
+ (loop for note = (require-type source-note 'source-note) then source
+ for source = (source-note.source note)
+ unless (source-note-p source)
+ return (if (eq source-note note)
+ source
+ ;; Cache the toplevel note, don't really need the intermediate pointers
+ (setf (source-note.source source-note) note)))))
(defun source-note-file-range (source-note)
(when source-note
@@ -3164,17 +3170,17 @@ arg=char : read delimited list"
(let ((recording (assq stream *recording-source-streams*)))
(when (and recording (not *read-suppress*))
(destructuring-bind (map file-name stream-offset) (cdr recording)
- (let* ((prev (gethash form map))
- (note (make-source-note :filename file-name
- :start-pos (+ stream-offset start-pos)
- :end-pos (+ stream-offset end-pos))))
- (setf (gethash form map)
- (cond ((null prev) note)
- ((consp prev) (cons note prev))
- (t (list note prev))))
- (loop for subnote in subform-notes
- do (when (source-note-source subnote) (error "Subnote ~s already owned?" subnote))
- do (setf (source-note.source subnote) note))
+ ;; Don't record notes for entries with multiple sources, which can happen for atoms:
+ ;; if we can't tell which instance we mean, then we don't have useful source info.
+ (let ((note (when (eq (gethash form map 'first) 'first)
+ (make-source-note :filename file-name
+ :start-pos (+ stream-offset start-pos)
+ :end-pos (+ stream-offset end-pos)))))
+ (setf (gethash form map) note)
+ (when note
+ (loop for subnote in subform-notes
+ do (when (source-note.source subnote) (error "Subnote ~s already owned?" subnote))
+ do (setf (source-note.source subnote) note)))
note)))))
(defun read-recording-source (stream &key eofval file-name start-offset map save-source-text)
@@ -3193,18 +3199,7 @@ non-atomic nested subforms."
(declare (dynamic-extent recording *recording-source-streams*))
(multiple-value-bind (form source-note) (read-internal stream nil eofval nil)
(when (and source-note (not (eq form eofval)))
- (assert (null (source-note-source source-note)))
- (loop for form being the hash-key using (hash-value note) of map
- do (cond ((eq note source-note) nil)
- ;; Remove entries with multiple source notes, which can happen
- ;; for atoms. If we can't tell which instance we mean, then we
- ;; don't have useful source info.
- ((listp note) (remhash form map))
- ((loop for p = note then (source-note-source p) while (source-note-p p)
- thereis (eq p source-note))
- ;; Flatten the backpointers so each subnote points directly
- ;; to the toplevel note.
- (setf (source-note.source note) source-note))))
+ (assert (null (source-note.source source-note)))
(when save-source-text
(setf (source-note.source source-note)
(fetch-octets-from-stream stream
diff --git a/level-1/l1-readloop-lds.lisp b/level-1/l1-readloop-lds.lisp
index bfa430a9b..9d55cd030 100644
--- a/level-1/l1-readloop-lds.lisp
+++ b/level-1/l1-readloop-lds.lisp
@@ -567,6 +567,7 @@ commands but aren't")
(*print-gensym* t)
(*print-length* (default-print-length *error-print-length*))
(*print-level* (default-print-level *error-print-level*))
+ (*print-string-length* (default-print-string-length *error-print-string-length*))
(*print-lines* nil)
(*print-miser-width* nil)
(*print-readably* nil)
@@ -777,6 +778,7 @@ commands but aren't")
(let* ((*print-circle* *error-print-circle*)
(*print-length* (default-print-length *error-print-length*))
(*print-level* (default-print-level *error-print-level*))
+ (*print-string-length* (default-print-string-length *error-print-string-length*))
;(*print-pretty* nil)
(*print-array* nil))
(format t (or (application-ui-operation *application* :break-options-string t)
diff --git a/level-1/l1-sockets.lisp b/level-1/l1-sockets.lisp
index 69889caa9..a2320824c 100644
--- a/level-1/l1-sockets.lisp
+++ b/level-1/l1-sockets.lisp
@@ -61,15 +61,19 @@
'basic-binary-io-stream
'basic-character-io-stream)
-(defclass unconnected-socket (socket)
+(defclass device-mixin ()
((device :initarg :device :accessor socket-device)
(keys :initarg :keys :reader socket-keys)))
;; A passive tcp socket just generates connection streams
-(defclass listener-socket (tcp-socket unconnected-socket) ())
+(defclass listener-socket (tcp-socket device-mixin) ())
-(defclass file-listener-socket (stream-file-socket unconnected-socket) ())
+(defclass file-listener-socket (stream-file-socket device-mixin) ())
;; A udp socket just sends and receives packets.
-(defclass udp-socket (ip-socket unconnected-socket) ())
+(defclass udp-socket (ip-socket device-mixin)
+ ((connected :initarg :connected :initform nil :accessor socket-connected
+ :documentation "True if the socket is connected in the UDP sense,
+ i.e. it has had #_connect successfully called on it.")))
+
diff --git a/level-1/l1-streams.lisp b/level-1/l1-streams.lisp
index b2dbd9625..742bb0b91 100644
--- a/level-1/l1-streams.lisp
+++ b/level-1/l1-streams.lisp
@@ -3090,7 +3090,7 @@
(ecase line-termination
(:cr (setf (ioblock-write-char-when-locked-function ioblock)
'%ioblock-write-char-translating-newline-to-cr
- (ioblock-read-char-function ioblock)
+ (ioblock-write-char-function ioblock)
(case sharing
(:private
'%private-ioblock-write-char-translating-newline-to-cr)
@@ -4217,14 +4217,14 @@
(do* ((c (concatenated-stream-current-input-stream s)
(concatenated-stream-next-input-stream s)))
((null c))
- (when (stream-listen c)
- (return t))))
+ (cond ((stream-listen c) (return t))
+ ((not (stream-eofp c)) (return nil)))))
(defmethod stream-eofp ((s concatenated-stream))
(do* ((c (concatenated-stream-current-input-stream s)
(concatenated-stream-next-input-stream s)))
((null c) t)
- (when (stream-listen c)
+ (unless (stream-eofp c)
(return nil))))
(defmethod stream-clear-input ((s concatenated-stream))
@@ -5396,13 +5396,7 @@
:unsigned-fullword))
(defun unread-data-available-p (fd)
- #+(or freebsd-target windows-target)
- (fd-input-available-p fd 0)
- #-(or freebsd-target windows-target)
- (rlet ((arg (* :char) (%null-ptr)))
- (when (zerop (int-errno-call (#_ioctl fd #$FIONREAD :address arg)))
- (let* ((avail (pref arg :long)))
- (and (> avail 0) avail)))))
+ (fd-input-available-p fd 0))
;;; Read and discard any available unread input.
(defun %fd-drain-input (fd)
@@ -5518,6 +5512,9 @@
(pref tv :timeval.tv_usec) us)))))
(defun fd-input-available-p (fd &optional milliseconds)
+ "Returns true or false depending on whether input is available.
+ In some cases on windows, it may return a count of the number of unread bytes.
+ This behavior should not be depended upon."
#+windows-target
(case (%unix-fd-kind fd)
(:socket
@@ -5692,9 +5689,10 @@
nil)))))))
(defun fd-stream-eofp (s ioblock)
- (declare (ignore s))
- (ioblock-eof ioblock))
-
+ (or (ioblock-eof ioblock)
+ (progn (fd-stream-advance s ioblock nil)
+ (ioblock-eof ioblock))))
+
(defun fd-stream-listen (s ioblock)
(if (interactive-stream-p s)
(unread-data-available-p (ioblock-device ioblock))
diff --git a/level-1/l1-typesys.lisp b/level-1/l1-typesys.lisp
index be1a7634f..fdaca18c4 100644
--- a/level-1/l1-typesys.lisp
+++ b/level-1/l1-typesys.lisp
@@ -2919,8 +2919,8 @@
(defparameter specialized-array-element-types
'(nil bit (unsigned-byte 8) (signed-byte 8) (unsigned-byte 16)
(signed-byte 16) (unsigned-byte 32) #+32-bit-target fixnum (signed-byte 32)
- #+64-bit-target (unsigned-byte 64)
#+64-bit-target fixnum
+ #+64-bit-target (unsigned-byte 64)
#+64-bit-target (signed-byte 64)
character short-float double-float
#||(complex short-float) (complex double-float)||#))
diff --git a/level-1/l1-unicode.lisp b/level-1/l1-unicode.lisp
index a8365fc0c..edd9695b3 100644
--- a/level-1/l1-unicode.lisp
+++ b/level-1/l1-unicode.lisp
@@ -81,7 +81,7 @@
octets-in-string-function ;(STRING START END)
;; Returns the number of (full) characters encoded in VECTOR, and
- ;; the index the index of the first octet not used to encode
+ ;; the index of the first octet not used to encode
;; them. (The second value may be less than END.
length-of-vector-encoding-function ;(VECTOR START END)
@@ -2883,7 +2883,7 @@ mark."
(defun string-size-in-octets (string &key
(start 0)
end
- external-format
+ (external-format :default)
use-byte-order-mark)
(setq end (check-sequence-bounds string start end))
(let* ((ef (normalize-external-format t external-format)))
@@ -2928,7 +2928,7 @@ mark."
(defun encode-string-to-octets (string &key
(start 0)
end
- external-format
+ (external-format :default)
use-byte-order-mark
(vector nil vector-p)
(vector-offset 0))
@@ -2988,7 +2988,7 @@ mark."
(defun count-characters-in-octet-vector (vector &key
(start 0)
end
- external-format)
+ (external-format :default))
(setq end (check-sequence-bounds vector start end))
(%count-characters-in-octet-vector
vector
@@ -3008,7 +3008,7 @@ mark."
(defun decode-string-from-octets (vector &key
(start 0)
end
- external-format
+ (external-format :default)
(string nil string-p))
(setq end (check-sequence-bounds vector start end))
(unless (= (typecode vector) target::subtag-u8-vector)
diff --git a/level-1/linux-files.lisp b/level-1/linux-files.lisp
index abf73be70..1919fc34a 100644
--- a/level-1/linux-files.lisp
+++ b/level-1/linux-files.lisp
@@ -151,7 +151,7 @@ atomically decremented."
millis (floor remaining-itus (/ internal-time-units-per-second 1000)))))))))))))
(defun timed-wait-on-semaphore (s duration &optional notification)
- "Wait until the given semaphore has a postive count which can be
+ "Wait until the given semaphore has a positive count which can be
atomically decremented, or until a timeout expires."
(%timed-wait-on-semaphore-ptr (semaphore-value s) duration notification))
@@ -404,8 +404,10 @@ given is that of a group to which the current user belongs."
#-(or linux-target solaris-target)
(round (pref stat :stat.st_mtimespec.tv_nsec) 1000)
(pref stat :stat.st_gid)
- (pref stat :stat.st_dev))
- (values nil nil nil nil nil nil nil nil nil nil)))
+ (pref stat :stat.st_dev)
+ #-(or linux-target solaris-target)
+ (pref stat :stat.st_flags))
+ (values nil nil nil nil nil nil nil nil nil nil nil)))
#+win64-target
(defun %stat-values (result stat)
@@ -704,7 +706,10 @@ given is that of a group to which the current user belongs."
(with-filename-cstrs ((name namestring #|(tilde-expand namestring)|#))
(let* ((result (#_realpath name resultbuf)))
(declare (dynamic-extent result))
- (unless (%null-ptr-p result)
+ (if (%null-ptr-p result)
+ (let ((errno (%get-errno)))
+ (unless (= errno (- #$ENOENT))
+ (signal-file-error errno namestring)))
(get-foreign-namestring result))))))
;;; Return fully resolved pathname & file kind, or (values nil nil)
@@ -1057,7 +1062,7 @@ any EXTERNAL-ENTRY-POINTs known to be defined by it to become unresolved."
(return))
(decf (shlib.opencount lib)))
(when (and (eql 0 (shlib.opencount lib))
- (not (%probe-shared-library lib)))
+ t #||(not (%probe-shared-library lib))||#)
(setf (shlib.pathname lib) nil
(shlib.base lib) nil
(shlib.handle lib) nil
diff --git a/level-1/version.lisp b/level-1/version.lisp
index b6af03f58..66e1518fb 100644
--- a/level-1/version.lisp
+++ b/level-1/version.lisp
@@ -18,12 +18,12 @@
(defparameter *openmcl-major-version* 1)
(defparameter *openmcl-minor-version* 11)
-(defparameter *openmcl-revision* nil)
+(defparameter *openmcl-revision* 5)
;;; May be set by xload-level-0
(defvar *openmcl-svn-revision* nil)
(defparameter *openmcl-dev-level* nil)
-(defparameter *openmcl-version* (format nil "~d.~d~@[-~a~]~@[-r~a~] ~@[+~s~] (~@[~A: ~]~~A)"
+(defparameter *openmcl-version* (format nil "~d.~d~@[.~a~]~@[/~a~] ~@[+~s~] (~@[~A: ~]~~A)"
*openmcl-major-version*
*openmcl-minor-version*
(unless (null *openmcl-revision*)
diff --git a/lib/backtrace.lisp b/lib/backtrace.lisp
index 4ac224b4b..cf1de131b 100644
--- a/lib/backtrace.lisp
+++ b/lib/backtrace.lisp
@@ -27,6 +27,7 @@
(defparameter *backtrace-show-internal-frames* nil)
(defparameter *backtrace-print-level* 2)
(defparameter *backtrace-print-length* 5)
+(defparameter *backtrace-print-string-length* :default)
(defparameter *backtrace-format* :traditional
"If :TRADITIONAL, shows calls to non-toplevel functions using FUNCALL, and shows frame address values.
@@ -56,6 +57,7 @@
(start-frame-number 0)
(print-level *backtrace-print-level*)
(print-length *backtrace-print-length*)
+ (print-string-length *backtrace-print-string-length*)
(show-internal-frames *backtrace-show-internal-frames*))
"Returns a list representing the backtrace.
Each element in the list is a list that describes the call in one stack frame:
@@ -64,6 +66,7 @@ The arguments are represented by strings, the function is a symbol or a function
object."
(let* ((*backtrace-print-level* print-level)
(*backtrace-print-length* print-length)
+ (*backtrace-print-string-length* print-string-length)
(*backtrace-format* :list)
(result nil))
(map-call-frames (lambda (p context)
@@ -89,10 +92,12 @@ object."
(stream *debug-io*)
(print-level *backtrace-print-level*)
(print-length *backtrace-print-length*)
+ (print-string-length *backtrace-print-string-length*)
(show-internal-frames *backtrace-show-internal-frames*)
(format *backtrace-format*))
(let ((*backtrace-print-level* print-level)
(*backtrace-print-length* print-length)
+ (*backtrace-print-string-length* print-string-length)
(*backtrace-format* format)
(*standard-output* stream)
(*print-circle* nil)
@@ -153,7 +158,8 @@ object."
(format t "~& ~D " i)
(when name (format t "~s" name))
(let* ((*print-length* (default-print-length *backtrace-print-length*))
- (*print-level* (default-print-level *backtrace-print-level*)))
+ (*print-level* (default-print-level *backtrace-print-level*))
+ (*print-string-length* (default-print-string-length *backtrace-print-string-length*)))
(format t ": ~s" var))
(when type (format t " (~S)" type)))))
(error () (format t "#
")))
@@ -169,7 +175,8 @@ object."
(format t "~& Arguments: ~:s" (arglist-from-map lfun)))
(t (format t "~& ~s" (arglist-from-map lfun))))
(let* ((*print-length* (default-print-length *backtrace-print-length*))
- (*print-level* (default-print-level *backtrace-print-level*)))
+ (*print-level* (default-print-level *backtrace-print-level*))
+ (*print-string-length* (default-print-string-length *backtrace-print-string-length*)))
(flet ((show-pair (pair prefix)
(destructuring-bind (name . val) pair
(format t "~&~a~s: " prefix name)
@@ -219,7 +226,8 @@ object."
collect (if (eq arg (%unbound-marker))
"?"
(let* ((*print-length* (default-print-length *backtrace-print-length*))
- (*print-level* (default-print-level *backtrace-print-level*)))
+ (*print-level* (default-print-level *backtrace-print-level*))
+ (*print-string-length* (default-print-string-length *backtrace-print-string-length*)))
(format nil "~s" arg)))))))
;;; Return a list of "interesting" frame addresses in context, most
diff --git a/lib/ccl-export-syms.lisp b/lib/ccl-export-syms.lisp
index d3ebbb551..da7cf2c9d 100644
--- a/lib/ccl-export-syms.lisp
+++ b/lib/ccl-export-syms.lisp
@@ -78,6 +78,7 @@
dbg-form
*backtrace-print-level*
*backtrace-print-length*
+ *backtrace-print-string-length*
*backtrace-show-internal-frames*
*backtrace-format*
map-call-frames
@@ -87,6 +88,7 @@
apply-in-frame
*error-print-level*
*error-print-length*
+ *error-print-string-length*
*quit-on-eof*
*quit-interrupt-hook*
*break-hook*
@@ -107,6 +109,7 @@
abort-break
*trace-print-level*
*trace-print-length*
+ *trace-print-string-length*
*trace-bar-frequency*
trace-function
*ignore-extra-close-parenthesis*
diff --git a/lib/compile-ccl.lisp b/lib/compile-ccl.lisp
index 1f89d7ab0..db4c36056 100644
--- a/lib/compile-ccl.lisp
+++ b/lib/compile-ccl.lisp
@@ -678,7 +678,7 @@ the lisp and run REBUILD-CCL again.")
(eql exit-code 0))
(let* ((write-date (or (ignore-errors (file-write-date (standard-image-name))) 0)))
(unless (and write-date (> write-date old-write-date))
- (error "The hesp imsge ~a does not appear to have been written correctly. This may indicate a problem with the bootstapping image." (standard-image-name)))
+ (error "The heap image ~a does not appear to have been written correctly. This may indicate a problem with the bootstapping image." (standard-image-name)))
(format t "~&;Wrote heap image: ~s"
(truename (format nil "ccl:~a"
(standard-image-name))))
diff --git a/lib/encapsulate.lisp b/lib/encapsulate.lisp
index ddec913f2..f93e472d6 100644
--- a/lib/encapsulate.lisp
+++ b/lib/encapsulate.lisp
@@ -25,6 +25,7 @@
(defparameter *trace-max-indent* 40)
(defvar *trace-print-level* :default)
(defvar *trace-print-length* :default)
+(defvar *trace-print-string-length* :default)
;(defparameter *trace-define-if-undefined* nil)
(defparameter *trace-bar-frequency* nil)
(defvar *trace-hook* nil)
@@ -86,6 +87,7 @@
(trace-tab :in)
(let* ((*print-level* (default-print-level *trace-print-level*))
(*print-length* (default-print-length *trace-print-length*))
+ (*print-string-length* (default-print-string-length *trace-print-string-length*))
(*print-readably* nil))
(format *trace-output* "Calling ~S ~%" args)
(force-output *trace-output*)))
@@ -94,6 +96,7 @@
(declare (dynamic-extent args))
(let* ((*print-level* (default-print-level *trace-print-level*))
(*print-length* (default-print-length *trace-print-length*))
+ (*print-string-length* (default-print-string-length *trace-print-string-length*))
(*print-readably* nil))
(if (eq n 1)
(progn
diff --git a/lib/format.lisp b/lib/format.lisp
index ef4f16bf8..b4f8c0995 100644
--- a/lib/format.lisp
+++ b/lib/format.lisp
@@ -329,6 +329,7 @@ and (nthcdr *format-arguments-variance* *format-arguments*)")
(declare (ignore prev tilde parms atsign cmd))
(if (and evil-commands colon)
(format-error "Logical-block directive not allowed inside justification directive"))))
+ (#\~ (format-nextchar))
((#\} #\> #\) #\])
(format-error "No matching bracket")))))))
@@ -1130,8 +1131,14 @@ and (nthcdr *format-arguments-variance* *format-arguments*)")
;;; DO NOT EVEN THINK OF ATTEMPTING TO UNDERSTAND THIS CODE WITHOUT READING
;;; THE PAPER!
-
-
+#| Improvements beyond Steele and White:
+ Steele and White (original and retrospective included): http://kurtstephens.com/files/p372-steele.pdf
+ Bryan O'Sullivan: http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/
+ Burger and Dybvig: http://www.cs.indiana.edu/~dyb/pubs/FP-Printing-PLDI96.pdf
+ Loitsch: http://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf
+ Ryan Juckett: http://www.ryanjuckett.com/programming/printing-floating-point-numbers/part-2/
+ Gay: http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.31.4049
+|#
(defun flonum-to-string (n &optional width fdigits scale)
(let ((*print-radix* nil))
@@ -1293,54 +1300,84 @@ and (nthcdr *format-arguments-variance* *format-arguments*)")
(ash (5-to-e e) e))
|#
-
-
-
;;; Given a non-negative floating point number, SCALE-EXPONENT returns a
;;; new floating point number Z in the range (0.1, 1.0] and and exponent
;;; E such that Z * 10^E is (approximately) equal to the original number.
;;; There may be some loss of precision due the floating point representation.
;;; JUST do the EXPONENT since thats all we use
-
-(defconstant long-log10-of-2 0.30103d0)
-
-#|
-(defun scale-exponent (x)
- (if (floatp x )
- (scale-expt-aux (abs x) 0.0d0 1.0d0 1.0d1 1.0d-1 long-log10-of-2)
- (report-bad-arg x 'float)))
-
-#|this is the slisp code that was in the place of the error call above.
- before floatp was put in place of shortfloatp.
- ;(scale-expt-aux x (%sp-l-float 0) (%sp-l-float 1) %long-float-ten
- ; %long-float-one-tenth long-log10-of-2)))
-|#
-
-; this dies with floating point overflow (?) if fed least-positive-double-float
-
-(defun scale-expt-aux (x zero one ten one-tenth log10-of-2)
- (let ((exponent (nth-value 1 (decode-float x))))
- (if (= x zero)
- (values zero 1)
- (let* ((e (round (* exponent log10-of-2)))
- (x (if (minusp e) ;For the end ranges.
- (* x ten (expt ten (- -1 e)))
- (/ x ten (expt ten (1- e))))))
- (do ((d ten (* d ten))
- (y x (/ x d))
- (e e (1+ e)))
- ((< y one)
- (do ((m ten (* m ten))
- (z y (* z m))
- (e e (1- e)))
- ((>= z one-tenth) (values x e)))))))))
-|#
-
-(defun scale-exponent (n)
- (let ((exp (nth-value 1 (decode-float n))))
- (values (round (* exp long-log10-of-2)))))
-
+(defconstant single-float-min-e
+ (nth-value 1 (decode-float least-positive-single-float)))
+(defconstant double-float-min-e
+ (nth-value 1 (decode-float least-positive-double-float)))
+
+;;; Adapted from CMUCL.
+
+;; This is a modified version of the scale computation from Burger and
+;; Dybvig's paper "Printing floating-point quickly and accurately."
+;; We only want the exponent, so most things not needed for the
+;; computation of the exponent have been removed. We also implemented
+;; the floating-point log approximation given in Burger and Dybvig.
+;; This is very noticeably faster for large and small numbers. It is
+;; slower for intermediate sized numbers.
+(defun accurate-scale-exponent (v)
+ (declare (type float v))
+ (if (zerop v)
+ 1
+ (let ((float-radix 2) ; b
+ (float-digits (float-digits v)) ; p
+ (min-e
+ (etypecase v
+ (single-float single-float-min-e)
+ (double-float double-float-min-e))))
+ (multiple-value-bind (f e)
+ (integer-decode-float v)
+ (let ( ;; FIXME: these even tests assume normal IEEE rounding
+ ;; mode. I wonder if we should cater for non-normal?
+ (high-ok (evenp f)))
+ ;; We only want the exponent here.
+ (labels ((flog (x)
+ (declare (type (float (0.0)) x))
+ (let ((xd (etypecase x
+ (single-float
+ (float x 1d0))
+ (double-float
+ x))))
+ (ceiling (- (the (double-float -400d0 400d0)
+ (log xd 10d0))
+ 1d-10))))
+ (fixup (r s m+ k)
+ (if (if high-ok
+ (>= (+ r m+) s)
+ (> (+ r m+) s))
+ (+ k 1)
+ k))
+ (scale (r s m+)
+ (let* ((est (flog v))
+ (scale (the integer (10-to-e (abs est)))))
+ (if (>= est 0)
+ (fixup r (* s scale) m+ est)
+ (fixup (* r scale) s (* m+ scale) est)))))
+ (let (r s m+)
+ (if (>= e 0)
+ (let* ((be (expt float-radix e))
+ (be1 (* be float-radix)))
+ (if (/= f (expt float-radix (1- float-digits)))
+ (setf r (* f be 2)
+ s 2
+ m+ be)
+ (setf r (* f be1 2)
+ s (* float-radix 2)
+ m+ be1)))
+ (if (or (= e min-e)
+ (/= f (expt float-radix (1- float-digits))))
+ (setf r (* f 2)
+ s (* (expt float-radix (- e)) 2)
+ m+ 1)
+ (setf r (* f float-radix 2)
+ s (* (expt float-radix (- 1 e)) 2)
+ m+ float-radix)))
+ (scale r s m+))))))))
;;; Page ~|
@@ -1919,7 +1956,7 @@ and (nthcdr *format-arguments-variance* *format-arguments*)")
(and (plusp k)(>= k (+ d 2)))
(and (minusp k)(< k (- d))))
(format-error "incompatible values for k and d")))
- (when (not exp) (setq exp (scale-exponent number)))
+ (when (not exp) (setq exp (accurate-scale-exponent (abs number))))
AGAIN
(let* ((expt (- exp k))
(estr (let ((*print-base* 10))
diff --git a/lib/macros.lisp b/lib/macros.lisp
index 4bcc907d0..ad0dc2fab 100644
--- a/lib/macros.lisp
+++ b/lib/macros.lisp
@@ -670,7 +670,8 @@
(if (eq arg '&aux)
(return)
(push arg temp)))
- (format nil "~:a" (nreverse temp)))))
+ (let ((*package* (find-package "KEYWORD")))
+ (format nil "~:S" (nreverse temp))))))
(if (and body-pos (memq '&optional normalized)) (decf body-pos))
`(progn
(eval-when (:compile-toplevel)
@@ -692,6 +693,8 @@
;; ---- allow inlining setf functions
(defmacro defun (spec args &body body &environment env &aux global-name inline-spec)
"Define a function at top level."
+ (when (null spec)
+ (signal-program-error "Using ~s as a function name is silly." nil))
(validate-function-name spec)
(setq args (require-type args 'list))
(setq body (require-type body 'list))
@@ -1511,9 +1514,10 @@ All output to that string stream is saved in a string."
,@(if string-p () `((get-output-stream-string ,var))))
(close ,var))))))
-(defmacro with-output-to-vector ((var &optional vector &key external-format)
- &body body
- &environment env)
+(defmacro with-output-to-vector ((var &optional vector
+ &key (external-format :default))
+ &body body
+ &environment env)
(let* ((vector-p (not (null vector))))
(multiple-value-bind (forms decls) (parse-body body env nil)
`(let* ((,var ,@(if vector-p
diff --git a/lib/misc.lisp b/lib/misc.lisp
index 64e3db63f..40017593f 100644
--- a/lib/misc.lisp
+++ b/lib/misc.lisp
@@ -927,10 +927,20 @@ are running on, or NIL if we can't find any useful information."
(native-translated-namestring
(merge-pathnames "svnversion" *svn-program*)))
"svnversion"))
-
-
-
-
+
+(defun local-git-revision ()
+ (let ((s (make-string-output-stream))
+ (git-dir (native-translated-namestring
+ (merge-pathnames (ccl-directory) ".git"))))
+ (multiple-value-bind (status exit-code)
+ (external-process-status
+ (run-program "git" (list "--git-dir" git-dir "describe" "HEAD")
+ :output s :error :output))
+ (when (and (eq status :exited)
+ (= exit-code 0))
+ (string-right-trim (list #\space #\newline)
+ (get-output-stream-string s))))))
+
(defun local-svn-revision ()
(let* ((s (make-string-output-stream))
(root (native-translated-namestring "ccl:")))
@@ -949,6 +959,9 @@ are running on, or NIL if we can't find any useful information."
(return-from local-svn-revision line))))))
nil))
+(defun local-vc-revision ()
+ (or (local-git-revision)
+ (local-svn-revision)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
diff --git a/lib/read.lisp b/lib/read.lisp
index 8ca0cfbfe..fb22198b5 100644
--- a/lib/read.lisp
+++ b/lib/read.lisp
@@ -125,8 +125,7 @@
(apply sd (nreverse args))))))
;;;from slisp reader2.lisp, and apparently not touched in 20 years.
-(defun parse-integer (string &key (start 0) end
- (radix 10) junk-allowed)
+(defun parse-integer (string &key (start 0) end (radix 10) junk-allowed)
"Examine the substring of string delimited by start and end
(default to the beginning and end of the string) It skips over
whitespace characters and then tries to parse an integer. The
@@ -144,40 +143,39 @@
(return-from parse-integer (values nil end))
(parse-integer-not-integer-string string)))
(unless (whitespacep (char string i)) (return i))))
- (minusp nil)
- (found-digit nil)
- (result 0))
- (let ((char (char string index)))
- (cond ((char= char #\-)
- (setq minusp t)
- (setq index (1+ index)))
- ((char= char #\+)
- (setq index (1+ index))
- )))
- (loop
+ (minusp nil)
+ (found-digit nil)
+ (result 0))
+ (declare (fixnum start end radix))
+ (let ((char (char string index)))
+ (cond ((char= char #\-)
+ (setq minusp t)
+ (setq index (1+ index)))
+ ((char= char #\+)
+ (setq index (1+ index)))))
+ (loop
(when (= index end) (return nil))
(let* ((char (char string index))
(weight (digit-char-p char radix)))
- (cond (weight
- (setq result (+ weight (* result radix))
- found-digit t))
- (junk-allowed (return nil))
- ((whitespacep char)
- (until (eq (setq index (1+ index)) end)
- (unless (whitespacep (char string index))
- (parse-integer-not-integer-string string)))
- (return nil))
- (t
- (parse-integer-not-integer-string string))))
- (setq index (1+ index)))
- (values
- (if found-digit
- (if minusp (- result) result)
- (if junk-allowed
- nil
- (parse-integer-not-integer-string string)))
- index))))
-
+ (cond (weight
+ (setq result (+ weight (* result radix))
+ found-digit t))
+ (junk-allowed (return nil))
+ ((whitespacep char)
+ (until (eq (setq index (1+ index)) end)
+ (unless (whitespacep (char string index))
+ (parse-integer-not-integer-string string)))
+ (return nil))
+ (t
+ (parse-integer-not-integer-string string))))
+ (setq index (1+ index)))
+ (values
+ (if found-digit
+ (if minusp (- result) result)
+ (if junk-allowed
+ nil
+ (parse-integer-not-integer-string string)))
+ index))))
(defun get-read-object (arg)
(if (listp %read-objects%)
diff --git a/lib/sequences.lisp b/lib/sequences.lisp
index 3a1f7fa1c..8c4b1edfa 100644
--- a/lib/sequences.lisp
+++ b/lib/sequences.lisp
@@ -1049,10 +1049,10 @@
(dynamic-extent handle)
(list splice handle))
(if (and (%i>= i start) (eq item (car (%cdr splice))))
- (progn
- (%rplacd splice (%cddr splice))
- (setq numdeleted (%i+ numdeleted 1)))
- (setq splice (%cdr splice)))))
+ (progn
+ (%rplacd splice (%cddr splice))
+ (setq numdeleted (%i+ numdeleted 1)))
+ (setq splice (%cdr splice)))))
(defun list-delete-moderately-complex (item list start end count test test-not key)
(unless start (setq start 0))
@@ -1073,28 +1073,6 @@
(setq numdeleted (1+ numdeleted)))
(setq splice (cdr splice)))))
-(defun list-delete (item list &key from-end test test-not (start 0)
- end count key
- &aux (temp list) revp)
- (unless end (setq end target::target-most-positive-fixnum))
- (when (and from-end count)
- (let ((len (length temp)))
- (if (not (%i< start len))
- (return-from list-delete temp))
- (setq temp (nreverse temp) revp t)
- (psetq end (%i- len start)
- start (%i- len (%imin len end)))))
- (setq key (adjust-key key))
- (multiple-value-setq (test test-not)
- (adjust-test-args item test test-not))
- (setq temp
- (if (or test key test-not)
- (list-delete-moderately-complex item temp start end count test test-not key)
- (list-delete-very-simple item temp start end count)))
- (if revp
- (nreverse temp)
- temp))
-
; The vector will be freshly consed & nothing is displaced to it,
; so it's legit to destructively truncate it.
; Likewise, it's ok to access its components with UVREF.
diff --git a/lib/source-files.lisp b/lib/source-files.lisp
index b168f1a27..cd17a57ea 100644
--- a/lib/source-files.lisp
+++ b/lib/source-files.lisp
@@ -231,7 +231,7 @@ definition type NAME"
(defmethod definition-base-name ((dt method-definition-type) (name cons))
(if (setf-function-name-p name)
(canonical-maybe-setf-name name)
- (definition-base-name *function-definition-type* (car name))))
+ (definition-base-name *function-definition-type* (if (eq (car name) :method) (cadr name) (car name)))))
;; defmethod passes the actual method into record-source-file
(defmethod definition-base-name ((dt method-definition-type) (method method))
diff --git a/library/darwinppc-syscalls.lisp b/library/darwinppc-syscalls.lisp
deleted file mode 100644
index 16d8e7e14..000000000
--- a/library/darwinppc-syscalls.lisp
+++ /dev/null
@@ -1,298 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2001-2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL"))
-
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::exit 1 (:int) :void )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fork 2 () :void)
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::read 3 (:unsigned-fullword :address :unsigned-long)
- :signed-long )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::write 4 (:unsigned-fullword :address :unsigned-long)
- :signed-long )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::open 5 (:address :unsigned-fullword :unsigned-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::close 6 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::wait4 7 (:unsigned-fullword :address :signed-fullword :address) :unsigned-fullword )
- ; 8 is old creat
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::link 9 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::unlink 10 (:address) :signed-fullword )
- ; 11 is obsolete execv
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::chdir 12 (:address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fchdir 13 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mknod 14 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::chmod 15 (:address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lchown 16 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getpid 20 () :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setuid 23 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getuid 24 () :unsigned-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::geteuid 25 () :unsigned-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::recvmsg 27 (:unsigned-fullword :address :unsigned-fullword):signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sendmsg 28 (:unsigned-fullword :address :unsigned-fullword):signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::recvfrom 29 (:unsigned-fullword :address :unsigned-long :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::accept 30 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getpeername 31 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getsockname 32 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::kill 37 (:signed-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sync 36 () :unsigned-fullword )
- ; 38 is old stat
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getppid 39 () :unsigned-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::dup 41 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::pipe 42 () :signed-doubleword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getgid 47 () :unsigned-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ioctl 54 (:unsigned-fullword :signed-fullword :address) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::dup2 90 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fcntl 92 (:unsigned-fullword :signed-fullword :signed-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::select 93 (:unsigned-fullword :address :address
- :address :address)
- :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fsync 95 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::socket 97 (:unsigned-fullword :unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::connect 98 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::bind 104 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setsockopt 105 (:unsigned-fullword :signed-fullword :signed-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::listen 106 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::gettimeofday 116 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getrusage 117 (:signed-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getsockopt 118 (:unsigned-fullword :signed-fullword :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fchmod 124 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::rename 128 (:address :address) :signed-fullword)
- ; 129 is old truncate
- ; 130 is old ftruncate
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sendto 133 (:unsigned-fullword :address :unsigned-fullword :unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shutdown 134 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::socketpair 135 (:unsigned-fullword :unsigned-fullword :unsigned-fullword :address) :signed-fullword )
-
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mkdir 136 (:address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::rmdir 137 (:address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mount 167 (:address :address :unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setgid 181 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::stat 188 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fstat 189 (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lstat 190 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lseek 199 (:unsigned-fullword :signed-doubleword :unsigned-fullword) :signed-doubleword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::truncate 200 (:address :unsigned-doubleword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ftruncate 201 (:unsigned-fullword :unsigned-doubleword) :signed-fullword )
-
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::poll 230 ((:* (:struct :pollfd)) :int :int) :int)
-
-#+notdefinedyet
-(progn
- ; 17 is obsolete sbreak
- ; 18 is old getfsstat
- ; 19 is old lseek
- ; 21 is obsolete mount
- ; 22 is obsolete umount
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ptrace 26 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::access 33 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::chflags 34 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fchflags 35 () )
- ; 40 is old lstat
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getegid 43 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::profil 44 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ktrace 45 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sigaction 46 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sigprocmask 48 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getlogin 49 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setlogin 50 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::acct 51 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sigpending 52 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sigaltstack 53 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::reboot 55 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::revoke 56 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::symlink 57 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::readlink 58 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::execve 59 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::umask 60 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::chroot 61 () )
- ; 62 is old fstat
- ; 63 is unused
- ; 64 is old getpagesize
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::msync 65 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::vfork 66 () )
- ; 67 is obsolete vread
- ; 68 is obsolete vwrite
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sbrk 69 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sstk 70 () )
- ; 71 is old mmap
- ; 72 is obsolete vadvise
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::munmap 73 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mprotect 74 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::madvise 75 () )
- ; 76 is obsolete vhangup
- ; 77 is obsolete vlimit
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mincore 78 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getgroups 79 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setgroups 80 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getpgrp 81 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setpgid 82 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setitimer 83 () )
- ; 84 is old wait
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::swapon 85 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getitimer 86 () )
- ; 87 is old gethostname
- ; 88 is old sethostname
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getdtablesize 89 () )
-
-
- ; 94 is obsolete setdopt
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setpriority 96 () )
- ; 99 is old accept
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getpriority 100 () )
- ; 101 is old send
- ; 102 is old recv
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sigreturn 103 () )
- ; 107 is obsolete vtimes
- ; 108 is old sigvec
- ; 109 is old sigblock
- ; 110 is old sigsetmask
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sigsuspend 111 () )
- ; 112 is old sigstack
- ; 113 is old recvmsg
- ; 114 is old sendmsg
- ; 115 is obsolete vtrace
- ; 119 is obsolete resuba
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::readv 120 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::writev 121 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::settimeofday 122 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fchown 123 () )
- ; 125 is old recvfrom
- ; 126 is old setreuid
- ; 127 is old setregid
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::flock 131 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mkfifo 132 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::utimes 138 () )
- ; 139 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::adjtime 140 () )
- ; 141 is old getpeername
- ; 142 is old gethostid
- ; 143 is old sethostid
- ; 144 is old getrlimit
- ; 145 is old setrlimit
- ; 146 is old killpg
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setsid 147 () )
- ; 148 is obsolete setquota
- ; 149 is obsolete quota
- ; 150 is old getsockname
- ; 151 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setprivexec 152 () )
- ; 153 is reserved
- ; 154 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::nfssvc 155 () )
- ; 156 is old getdirentries
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::statfs 157 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fstatfs 158 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::unmount 159 () )
- ; 160 is obsolete async_daemon
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getfh 161 () )
- ; 162 is old getdomainname
- ; 163 is old setdomainname
- ; 164 is obsolete pcfs_mount
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::quotactl 165 () )
- ; 166 is obsolete exportfs
-
- ; 168 is obsolete ustat
- ; 169 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::table 170 () )
- ; 171 is old wait_3
- ; 172 is obsolete rpause
- ; 173 is unused
- ; 174 is obsolete getdents
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::gc_control 175 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::add_profil 176 () )
- ; 177 is unused
- ; 178 is unused
- ; 179 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::kdebug_trace 180 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setegid 182 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::seteuid 183 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lfs_bmapv 184 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lfs_markv 185 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lfs_segclean 186 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lfs_segwait 187 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::pathconf 191 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fpathconf 192 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getrlimit 194 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setrlimit 195 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getdirentries 196 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mmap 197 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::__syscall 198 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::__sysctl 202 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mlock 203 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::munlock 204 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::undelete 205 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ATsocket 206 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ATgetmsg 207 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ATputmsg 208 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ATPsndreq 209 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ATPsndrsp 210 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ATPgetreq 211 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::ATPgetrsp 212 () )
- ; 213-215 are reserved for AppleTalk
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mkcomplex 216 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::statv 217 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::lstatv 218 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::fstatv 219 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getattrlist 220 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::setattrlist 221 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::getdirentriesattr 222 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::exchangedata 223 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::checkuseraccess 224 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::searchfs 225 () )
-
- ; 226 - 230 are reserved for HFS expansion
- ; 231 - 249 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::minherit 250 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::semsys 251 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::msgsys 252 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shmsys 253 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::semctl 254 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::semget 255 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::semop 256 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::semconfig 257 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::msgctl 258 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::msgget 259 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::msgsnd 260 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::msgrcv 261 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shmat 262 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shmctl 263 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shmdt 264 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shmget 265 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shm_open 266 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::shm_unlink 267 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_open 268 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_close 269 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_unlink 270 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_wait 271 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_trywait 272 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_post 273 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_getvalue 274 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_init 275 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::sem_destroy 276 () )
- ; 277 - 295 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::load_shared_file 296 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::reset_shared_file 297 () )
- ; 298 - 323 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::mlockall 324 () )
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::munlockall 325 () )
- ; 326 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-ppc) syscalls::issetugid 327 () )
-)
diff --git a/library/darwinx8632-syscalls.lisp b/library/darwinx8632-syscalls.lisp
deleted file mode 100644
index 9eb90454c..000000000
--- a/library/darwinx8632-syscalls.lisp
+++ /dev/null
@@ -1,296 +0,0 @@
-;;; Copyright 2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU
-;;; Public License , known as the LLGPL and distributed with Clozure
-;;; CL as the file "LICENSE". The LLGPL consists of a preamble and
-;;; the LGPL, which is distributed with Clozure CL as the file "LGPL".
-;;; Where these conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL"))
-
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::exit 1 (:int) :void )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fork 2 () :void)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::read 3 (:unsigned-fullword :address :unsigned-long)
- :signed-long )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::write 4 (:unsigned-fullword :address :unsigned-long)
- :signed-long )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::open 5 (:address :unsigned-fullword :unsigned-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::close 6 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::wait4 7 (:unsigned-fullword :address :signed-fullword :address) :unsigned-fullword )
- ; 8 is old creat
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::link 9 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::unlink 10 (:address) :signed-fullword )
- ; 11 is obsolete execv
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::chdir 12 (:address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fchdir 13 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mknod 14 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::chmod 15 (:address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lchown 16 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getpid 20 () :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setuid 23 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getuid 24 () :unsigned-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::geteuid 25 () :unsigned-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::recvmsg 27 (:unsigned-fullword :address :unsigned-fullword):signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sendmsg 28 (:unsigned-fullword :address :unsigned-fullword):signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::recvfrom 29 (:unsigned-fullword :address :unsigned-long :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::accept 30 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getpeername 31 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getsockname 32 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::kill 37 (:signed-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sync 36 () :unsigned-fullword )
- ; 38 is old stat
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getppid 39 () :unsigned-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::dup 41 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::pipe 42 () :signed-doubleword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getgid 47 () :unsigned-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ioctl 54 (:unsigned-fullword :signed-fullword :address) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::dup2 90 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fcntl 92 (:unsigned-fullword :signed-fullword :signed-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::select 93 (:unsigned-fullword :address :address
- :address :address)
- :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fsync 95 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::socket 97 (:unsigned-fullword :unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::connect 98 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::bind 104 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setsockopt 105 (:unsigned-fullword :signed-fullword :signed-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::listen 106 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::gettimeofday 116 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getrusage 117 (:signed-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getsockopt 118 (:unsigned-fullword :signed-fullword :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fchmod 124 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::rename 128 (:address :address) :signed-fullword)
- ; 129 is old truncate
- ; 130 is old ftruncate
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sendto 133 (:unsigned-fullword :address :unsigned-fullword :unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shutdown 134 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::socketpair 135 (:unsigned-fullword :unsigned-fullword :unsigned-fullword :address) :signed-fullword )
-
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mkdir 136 (:address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::rmdir 137 (:address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mount 167 (:address :address :unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setgid 181 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::stat 188 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fstat 189 (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lstat 190 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lseek 199 (:unsigned-fullword :signed-doubleword :unsigned-fullword) :signed-doubleword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::truncate 200 (:address :unsigned-doubleword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ftruncate 201 (:unsigned-fullword :unsigned-doubleword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::poll 230 ((:* (:struct :pollfd)) :int :int) :int)
-
-#+notdefinedyet
-(progn
- ; 17 is obsolete sbreak
- ; 18 is old getfsstat
- ; 19 is old lseek
- ; 21 is obsolete mount
- ; 22 is obsolete umount
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ptrace 26 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::access 33 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::chflags 34 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fchflags 35 () )
- ; 40 is old lstat
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getegid 43 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::profil 44 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ktrace 45 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sigaction 46 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sigprocmask 48 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getlogin 49 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setlogin 50 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::acct 51 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sigpending 52 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sigaltstack 53 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::reboot 55 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::revoke 56 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::symlink 57 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::readlink 58 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::execve 59 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::umask 60 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::chroot 61 () )
- ; 62 is old fstat
- ; 63 is unused
- ; 64 is old getpagesize
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::msync 65 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::vfork 66 () )
- ; 67 is obsolete vread
- ; 68 is obsolete vwrite
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sbrk 69 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sstk 70 () )
- ; 71 is old mmap
- ; 72 is obsolete vadvise
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::munmap 73 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mprotect 74 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::madvise 75 () )
- ; 76 is obsolete vhangup
- ; 77 is obsolete vlimit
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mincore 78 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getgroups 79 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setgroups 80 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getpgrp 81 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setpgid 82 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setitimer 83 () )
- ; 84 is old wait
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::swapon 85 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getitimer 86 () )
- ; 87 is old gethostname
- ; 88 is old sethostname
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getdtablesize 89 () )
-
-
- ; 94 is obsolete setdopt
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setpriority 96 () )
- ; 99 is old accept
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getpriority 100 () )
- ; 101 is old send
- ; 102 is old recv
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sigreturn 103 () )
- ; 107 is obsolete vtimes
- ; 108 is old sigvec
- ; 109 is old sigblock
- ; 110 is old sigsetmask
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sigsuspend 111 () )
- ; 112 is old sigstack
- ; 113 is old recvmsg
- ; 114 is old sendmsg
- ; 115 is obsolete vtrace
- ; 119 is obsolete resuba
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::readv 120 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::writev 121 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::settimeofday 122 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fchown 123 () )
- ; 125 is old recvfrom
- ; 126 is old setreuid
- ; 127 is old setregid
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::flock 131 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mkfifo 132 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::utimes 138 () )
- ; 139 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::adjtime 140 () )
- ; 141 is old getpeername
- ; 142 is old gethostid
- ; 143 is old sethostid
- ; 144 is old getrlimit
- ; 145 is old setrlimit
- ; 146 is old killpg
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setsid 147 () )
- ; 148 is obsolete setquota
- ; 149 is obsolete quota
- ; 150 is old getsockname
- ; 151 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setprivexec 152 () )
- ; 153 is reserved
- ; 154 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::nfssvc 155 () )
- ; 156 is old getdirentries
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::statfs 157 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fstatfs 158 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::unmount 159 () )
- ; 160 is obsolete async_daemon
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getfh 161 () )
- ; 162 is old getdomainname
- ; 163 is old setdomainname
- ; 164 is obsolete pcfs_mount
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::quotactl 165 () )
- ; 166 is obsolete exportfs
-
- ; 168 is obsolete ustat
- ; 169 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::table 170 () )
- ; 171 is old wait_3
- ; 172 is obsolete rpause
- ; 173 is unused
- ; 174 is obsolete getdents
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::gc_control 175 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::add_profil 176 () )
- ; 177 is unused
- ; 178 is unused
- ; 179 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::kdebug_trace 180 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setegid 182 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::seteuid 183 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lfs_bmapv 184 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lfs_markv 185 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lfs_segclean 186 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lfs_segwait 187 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::pathconf 191 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fpathconf 192 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getrlimit 194 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setrlimit 195 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getdirentries 196 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mmap 197 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::__syscall 198 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::__sysctl 202 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mlock 203 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::munlock 204 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::undelete 205 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ATsocket 206 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ATgetmsg 207 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ATputmsg 208 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ATPsndreq 209 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ATPsndrsp 210 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ATPgetreq 211 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::ATPgetrsp 212 () )
- ; 213-215 are reserved for AppleTalk
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mkcomplex 216 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::statv 217 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::lstatv 218 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::fstatv 219 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getattrlist 220 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::setattrlist 221 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::getdirentriesattr 222 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::exchangedata 223 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::checkuseraccess 224 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::searchfs 225 () )
-
- ; 226 - 230 are reserved for HFS expansion
- ; 231 - 249 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::minherit 250 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::semsys 251 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::msgsys 252 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shmsys 253 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::semctl 254 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::semget 255 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::semop 256 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::semconfig 257 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::msgctl 258 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::msgget 259 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::msgsnd 260 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::msgrcv 261 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shmat 262 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shmctl 263 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shmdt 264 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shmget 265 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shm_open 266 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::shm_unlink 267 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_open 268 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_close 269 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_unlink 270 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_wait 271 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_trywait 272 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_post 273 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_getvalue 274 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_init 275 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::sem_destroy 276 () )
- ; 277 - 295 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::load_shared_file 296 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::reset_shared_file 297 () )
- ; 298 - 323 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::mlockall 324 () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::munlockall 325 () )
- ; 326 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-32) syscalls::issetugid 327 () )
-)
-
-
diff --git a/library/darwinx8664-syscalls.lisp b/library/darwinx8664-syscalls.lisp
deleted file mode 100644
index 6069b1d6f..000000000
--- a/library/darwinx8664-syscalls.lisp
+++ /dev/null
@@ -1,297 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2001-2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL")
- (defconstant darwinx8664-unix-syscall-mask #x2000000))
-
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::exit (logior darwinx8664-unix-syscall-mask 1) (:int) :void )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fork (logior darwinx8664-unix-syscall-mask 2) () :void)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::read (logior darwinx8664-unix-syscall-mask 3) (:unsigned-fullword :address :unsigned-long)
- :signed-long )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::write (logior darwinx8664-unix-syscall-mask 4) (:unsigned-fullword :address :unsigned-long)
- :signed-long )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::open (logior darwinx8664-unix-syscall-mask 5) (:address :unsigned-fullword :unsigned-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::close (logior darwinx8664-unix-syscall-mask 6) (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::wait4 (logior darwinx8664-unix-syscall-mask 7) (:unsigned-fullword :address :signed-fullword :address) :unsigned-fullword )
- ; 8 is old creat
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::link (logior darwinx8664-unix-syscall-mask 9) (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::unlink (logior darwinx8664-unix-syscall-mask 10) (:address) :signed-fullword )
- ; 11 is obsolete execv
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::chdir (logior darwinx8664-unix-syscall-mask 12) (:address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fchdir (logior darwinx8664-unix-syscall-mask 13) (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mknod (logior darwinx8664-unix-syscall-mask 14) (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::chmod (logior darwinx8664-unix-syscall-mask 15) (:address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lchown (logior darwinx8664-unix-syscall-mask 16) (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getpid (logior darwinx8664-unix-syscall-mask 20) () :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setuid (logior darwinx8664-unix-syscall-mask 23) (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getuid (logior darwinx8664-unix-syscall-mask 24) () :unsigned-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::geteuid (logior darwinx8664-unix-syscall-mask 25) () :unsigned-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::recvmsg (logior darwinx8664-unix-syscall-mask 27) (:unsigned-fullword :address :unsigned-fullword):signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sendmsg (logior darwinx8664-unix-syscall-mask 28) (:unsigned-fullword :address :unsigned-fullword):signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::recvfrom (logior darwinx8664-unix-syscall-mask 29) (:unsigned-fullword :address :unsigned-long :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::accept (logior darwinx8664-unix-syscall-mask 30) (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getpeername (logior darwinx8664-unix-syscall-mask 31) (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getsockname (logior darwinx8664-unix-syscall-mask 32) (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::kill (logior darwinx8664-unix-syscall-mask 37) (:signed-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sync (logior darwinx8664-unix-syscall-mask 36) () :unsigned-fullword )
- ; 38 is old stat
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getppid (logior darwinx8664-unix-syscall-mask 39) () :unsigned-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::dup (logior darwinx8664-unix-syscall-mask 41) (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::pipe (logior darwinx8664-unix-syscall-mask 42) () :signed-doubleword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getgid (logior darwinx8664-unix-syscall-mask 47) () :unsigned-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ioctl (logior darwinx8664-unix-syscall-mask 54) (:unsigned-fullword :signed-fullword :address) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::dup2 (logior darwinx8664-unix-syscall-mask 90) (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fcntl (logior darwinx8664-unix-syscall-mask 92) (:unsigned-fullword :signed-fullword :signed-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::select (logior darwinx8664-unix-syscall-mask 93) (:unsigned-fullword :address :address
- :address :address)
- :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fsync (logior darwinx8664-unix-syscall-mask 95) (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::socket (logior darwinx8664-unix-syscall-mask 97) (:unsigned-fullword :unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::connect (logior darwinx8664-unix-syscall-mask 98) (:unsigned-fullword :address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::bind (logior darwinx8664-unix-syscall-mask 104) (:unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setsockopt (logior darwinx8664-unix-syscall-mask 105) (:unsigned-fullword :signed-fullword :signed-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::listen (logior darwinx8664-unix-syscall-mask 106) (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::gettimeofday (logior darwinx8664-unix-syscall-mask 116) (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getrusage (logior darwinx8664-unix-syscall-mask 117) (:signed-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getsockopt (logior darwinx8664-unix-syscall-mask 118) (:unsigned-fullword :signed-fullword :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fchmod (logior darwinx8664-unix-syscall-mask 124) (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::rename (logior darwinx8664-unix-syscall-mask 128) (:address :address) :signed-fullword)
- ; 129 is old truncate
- ; 130 is old ftruncate
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sendto (logior darwinx8664-unix-syscall-mask 133) (:unsigned-fullword :address :unsigned-fullword :unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shutdown (logior darwinx8664-unix-syscall-mask 134) (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::socketpair (logior darwinx8664-unix-syscall-mask 135) (:unsigned-fullword :unsigned-fullword :unsigned-fullword :address) :signed-fullword )
-
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mkdir (logior darwinx8664-unix-syscall-mask 136) (:address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::rmdir (logior darwinx8664-unix-syscall-mask 137) (:address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mount (logior darwinx8664-unix-syscall-mask 167) (:address :address :unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setgid (logior darwinx8664-unix-syscall-mask 181) (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::stat (logior darwinx8664-unix-syscall-mask 188) (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fstat (logior darwinx8664-unix-syscall-mask 189) (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lstat (logior darwinx8664-unix-syscall-mask 190) (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lseek (logior darwinx8664-unix-syscall-mask 199) (:unsigned-fullword :signed-doubleword :unsigned-fullword) :signed-doubleword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::truncate (logior darwinx8664-unix-syscall-mask 200) (:address :unsigned-doubleword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ftruncate (logior darwinx8664-unix-syscall-mask 201) (:unsigned-fullword :unsigned-doubleword) :signed-fullword )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::poll (logior darwinx8664-unix-syscall-mask 230) ((:* (:struct :pollfd)) :int :int) :int)
-#+notdefinedyet
-(progn
- ; 17 is obsolete sbreak
- ; 18 is old getfsstat
- ; 19 is old lseek
- ; 21 is obsolete mount
- ; 22 is obsolete umount
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ptrace (logior darwinx8664-unix-syscall-mask 26) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::access (logior darwinx8664-unix-syscall-mask 33) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::chflags (logior darwinx8664-unix-syscall-mask 34) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fchflags (logior darwinx8664-unix-syscall-mask 35) () )
- ; 40 is old lstat
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getegid (logior darwinx8664-unix-syscall-mask 43) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::profil (logior darwinx8664-unix-syscall-mask 44) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ktrace (logior darwinx8664-unix-syscall-mask 45) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sigaction (logior darwinx8664-unix-syscall-mask 46) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sigprocmask (logior darwinx8664-unix-syscall-mask 48) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getlogin (logior darwinx8664-unix-syscall-mask 49) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setlogin (logior darwinx8664-unix-syscall-mask 50) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::acct (logior darwinx8664-unix-syscall-mask 51) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sigpending (logior darwinx8664-unix-syscall-mask 52) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sigaltstack (logior darwinx8664-unix-syscall-mask 53) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::reboot (logior darwinx8664-unix-syscall-mask 55) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::revoke (logior darwinx8664-unix-syscall-mask 56) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::symlink (logior darwinx8664-unix-syscall-mask 57) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::readlink (logior darwinx8664-unix-syscall-mask 58) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::execve (logior darwinx8664-unix-syscall-mask 59) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::umask (logior darwinx8664-unix-syscall-mask 60) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::chroot (logior darwinx8664-unix-syscall-mask 61) () )
- ; 62 is old fstat
- ; 63 is unused
- ; 64 is old getpagesize
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::msync (logior darwinx8664-unix-syscall-mask 65) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::vfork (logior darwinx8664-unix-syscall-mask 66) () )
- ; 67 is obsolete vread
- ; 68 is obsolete vwrite
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sbrk (logior darwinx8664-unix-syscall-mask 69) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sstk (logior darwinx8664-unix-syscall-mask 70) () )
- ; 71 is old mmap
- ; 72 is obsolete vadvise
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::munmap (logior darwinx8664-unix-syscall-mask 73) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mprotect (logior darwinx8664-unix-syscall-mask 74) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::madvise (logior darwinx8664-unix-syscall-mask 75) () )
- ; 76 is obsolete vhangup
- ; 77 is obsolete vlimit
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mincore (logior darwinx8664-unix-syscall-mask 78) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getgroups (logior darwinx8664-unix-syscall-mask 79) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setgroups (logior darwinx8664-unix-syscall-mask 80) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getpgrp (logior darwinx8664-unix-syscall-mask 81) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setpgid (logior darwinx8664-unix-syscall-mask 82) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setitimer (logior darwinx8664-unix-syscall-mask 83) () )
- ; 84 is old wait
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::swapon (logior darwinx8664-unix-syscall-mask 85) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getitimer (logior darwinx8664-unix-syscall-mask 86) () )
- ; 87 is old gethostname
- ; 88 is old sethostname
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getdtablesize (logior darwinx8664-unix-syscall-mask 89) () )
-
-
- ; 94 is obsolete setdopt
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setpriority (logior darwinx8664-unix-syscall-mask 96) () )
- ; 99 is old accept
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getpriority (logior darwinx8664-unix-syscall-mask 100) () )
- ; 101 is old send
- ; 102 is old recv
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sigreturn (logior darwinx8664-unix-syscall-mask 103) () )
- ; 107 is obsolete vtimes
- ; 108 is old sigvec
- ; 109 is old sigblock
- ; 110 is old sigsetmask
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sigsuspend (logior darwinx8664-unix-syscall-mask 111) () )
- ; 112 is old sigstack
- ; 113 is old recvmsg
- ; 114 is old sendmsg
- ; 115 is obsolete vtrace
- ; 119 is obsolete resuba
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::readv (logior darwinx8664-unix-syscall-mask 120) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::writev (logior darwinx8664-unix-syscall-mask 121) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::settimeofday (logior darwinx8664-unix-syscall-mask 122) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fchown (logior darwinx8664-unix-syscall-mask 123) () )
- ; 125 is old recvfrom
- ; 126 is old setreuid
- ; 127 is old setregid
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::flock (logior darwinx8664-unix-syscall-mask 131) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mkfifo (logior darwinx8664-unix-syscall-mask 132) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::utimes (logior darwinx8664-unix-syscall-mask 138) () )
- ; 139 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::adjtime (logior darwinx8664-unix-syscall-mask 140) () )
- ; 141 is old getpeername
- ; 142 is old gethostid
- ; 143 is old sethostid
- ; 144 is old getrlimit
- ; 145 is old setrlimit
- ; 146 is old killpg
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setsid (logior darwinx8664-unix-syscall-mask 147) () )
- ; 148 is obsolete setquota
- ; 149 is obsolete quota
- ; 150 is old getsockname
- ; 151 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setprivexec (logior darwinx8664-unix-syscall-mask 152) () )
- ; 153 is reserved
- ; 154 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::nfssvc (logior darwinx8664-unix-syscall-mask 155) () )
- ; 156 is old getdirentries
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::statfs (logior darwinx8664-unix-syscall-mask 157) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fstatfs (logior darwinx8664-unix-syscall-mask 158) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::unmount (logior darwinx8664-unix-syscall-mask 159) () )
- ; 160 is obsolete async_daemon
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getfh (logior darwinx8664-unix-syscall-mask 161) () )
- ; 162 is old getdomainname
- ; 163 is old setdomainname
- ; 164 is obsolete pcfs_mount
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::quotactl (logior darwinx8664-unix-syscall-mask 165) () )
- ; 166 is obsolete exportfs
-
- ; 168 is obsolete ustat
- ; 169 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::table (logior darwinx8664-unix-syscall-mask 170) () )
- ; 171 is old wait_3
- ; 172 is obsolete rpause
- ; 173 is unused
- ; 174 is obsolete getdents
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::gc_control (logior darwinx8664-unix-syscall-mask 175) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::add_profil (logior darwinx8664-unix-syscall-mask 176) () )
- ; 177 is unused
- ; 178 is unused
- ; 179 is unused
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::kdebug_trace (logior darwinx8664-unix-syscall-mask 180) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setegid (logior darwinx8664-unix-syscall-mask 182) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::seteuid (logior darwinx8664-unix-syscall-mask 183) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lfs_bmapv (logior darwinx8664-unix-syscall-mask 184) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lfs_markv (logior darwinx8664-unix-syscall-mask 185) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lfs_segclean (logior darwinx8664-unix-syscall-mask 186) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lfs_segwait (logior darwinx8664-unix-syscall-mask 187) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::pathconf (logior darwinx8664-unix-syscall-mask 191) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fpathconf (logior darwinx8664-unix-syscall-mask 192) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getrlimit (logior darwinx8664-unix-syscall-mask 194) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setrlimit (logior darwinx8664-unix-syscall-mask 195) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getdirentries (logior darwinx8664-unix-syscall-mask 196) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mmap (logior darwinx8664-unix-syscall-mask 197) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::__syscall (logior darwinx8664-unix-syscall-mask 198) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::__sysctl (logior darwinx8664-unix-syscall-mask 202) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mlock (logior darwinx8664-unix-syscall-mask 203) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::munlock (logior darwinx8664-unix-syscall-mask 204) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::undelete (logior darwinx8664-unix-syscall-mask 205) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ATsocket (logior darwinx8664-unix-syscall-mask 206) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ATgetmsg (logior darwinx8664-unix-syscall-mask 207) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ATputmsg (logior darwinx8664-unix-syscall-mask 208) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ATPsndreq (logior darwinx8664-unix-syscall-mask 209) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ATPsndrsp (logior darwinx8664-unix-syscall-mask 210) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ATPgetreq (logior darwinx8664-unix-syscall-mask 211) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::ATPgetrsp (logior darwinx8664-unix-syscall-mask 212) () )
- ; 213-215 are reserved for AppleTalk
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mkcomplex (logior darwinx8664-unix-syscall-mask 216) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::statv (logior darwinx8664-unix-syscall-mask 217) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::lstatv (logior darwinx8664-unix-syscall-mask 218) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::fstatv (logior darwinx8664-unix-syscall-mask 219) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getattrlist (logior darwinx8664-unix-syscall-mask 220) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::setattrlist (logior darwinx8664-unix-syscall-mask 221) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::getdirentriesattr (logior darwinx8664-unix-syscall-mask 222) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::exchangedata (logior darwinx8664-unix-syscall-mask 223) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::checkuseraccess (logior darwinx8664-unix-syscall-mask 224) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::searchfs (logior darwinx8664-unix-syscall-mask 225) () )
-
- ; 226 - 230 are reserved for HFS expansion
- ; 231 - 249 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::minherit (logior darwinx8664-unix-syscall-mask 250) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::semsys (logior darwinx8664-unix-syscall-mask 251) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::msgsys (logior darwinx8664-unix-syscall-mask 252) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shmsys (logior darwinx8664-unix-syscall-mask 253) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::semctl (logior darwinx8664-unix-syscall-mask 254) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::semget (logior darwinx8664-unix-syscall-mask 255) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::semop (logior darwinx8664-unix-syscall-mask 256) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::semconfig (logior darwinx8664-unix-syscall-mask 257) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::msgctl (logior darwinx8664-unix-syscall-mask 258) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::msgget (logior darwinx8664-unix-syscall-mask 259) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::msgsnd (logior darwinx8664-unix-syscall-mask 260) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::msgrcv (logior darwinx8664-unix-syscall-mask 261) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shmat (logior darwinx8664-unix-syscall-mask 262) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shmctl (logior darwinx8664-unix-syscall-mask 263) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shmdt (logior darwinx8664-unix-syscall-mask 264) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shmget (logior darwinx8664-unix-syscall-mask 265) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shm_open (logior darwinx8664-unix-syscall-mask 266) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::shm_unlink (logior darwinx8664-unix-syscall-mask 267) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_open (logior darwinx8664-unix-syscall-mask 268) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_close (logior darwinx8664-unix-syscall-mask 269) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_unlink (logior darwinx8664-unix-syscall-mask 270) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_wait (logior darwinx8664-unix-syscall-mask 271) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_trywait (logior darwinx8664-unix-syscall-mask 272) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_post (logior darwinx8664-unix-syscall-mask 273) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_getvalue (logior darwinx8664-unix-syscall-mask 274) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_init (logior darwinx8664-unix-syscall-mask 275) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::sem_destroy (logior darwinx8664-unix-syscall-mask 276) () )
- ; 277 - 295 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::load_shared_file (logior darwinx8664-unix-syscall-mask 296) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::reset_shared_file (logior darwinx8664-unix-syscall-mask 297) () )
- ; 298 - 323 are reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::mlockall (logior darwinx8664-unix-syscall-mask 324) () )
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::munlockall (logior darwinx8664-unix-syscall-mask 325) () )
- ; 326 is reserved
-(define-syscall (logior platform-os-darwin platform-cpu-x86 platform-word-size-64) syscalls::issetugid (logior darwinx8664-unix-syscall-mask 327) () )
-)
diff --git a/library/loop.lisp b/library/loop.lisp
index f31821cac..946bfce70 100644
--- a/library/loop.lisp
+++ b/library/loop.lisp
@@ -910,15 +910,19 @@ collected result will be returned as the value of the LOOP."
((atom tree) tree)
(t (cons (subst-gensyms-for-nil (car tree))
(subst-gensyms-for-nil (cdr tree))))))
-
+
+(defmacro loop-destructuring-bind (lambda-list args-list &body body)
+ (let ((*ignores* ()))
+ (declare (special *ignores*))
+ (let ((dl (subst-gensyms-for-nil lambda-list)))
+ `(destructuring-bind (&optional ,@dl) ,args-list
+ (declare (ignore ,@*ignores*))
+ ,@body))))
+
(defun loop-build-destructuring-bindings (crocks forms)
(if crocks
- (let ((*ignores* ()))
- (declare (special *ignores*))
- `((destructuring-bind ,(subst-gensyms-for-nil (car crocks))
- ,(cadr crocks)
- (declare (ignore ,@*ignores*))
- ,@(loop-build-destructuring-bindings (cddr crocks) forms))))
+ `((loop-destructuring-bind ,(car crocks) ,(cadr crocks)
+ ,@(loop-build-destructuring-bindings (cddr crocks) forms)))
forms))
(defun loop-translate (*loop-source-code* *loop-macro-environment* *loop-universe*)
diff --git a/library/ppc-linux-syscalls.lisp b/library/ppc-linux-syscalls.lisp
deleted file mode 100644
index 21980966b..000000000
--- a/library/ppc-linux-syscalls.lisp
+++ /dev/null
@@ -1,234 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2001-2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL"))
-
-
-
-
-
-
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::exit 1 (:signed-fullword) :void)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fork 2 () :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::read 3 (:unsigned-fullword :address :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::write 4 (:unsigned-fullword :address :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::open 5 (:address :unsigned-fullword :unsigned-fullword) :signed-fullword :min-args 2)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::close 6 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::waitpid 7 (:unsigned-fullword :address :signed-fullword)
- :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::creat 8 (:address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::link 9 (:address :address) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::unlink 10 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::execve 11 (:address :address :address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::chdir 12 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::time 13 (:address) :unsigned-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mknod 14 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::chmod 15 (:address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::lchown 16 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-;(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::oldstat 18 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::lseek 19 (:unsigned-fullword :signed-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getpid 20 () :unsigned-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mount 21 (:address
- :address
- :address
- :unsigned-fullword
- :address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::umount 22 (:address) :signed-fullword )
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setuid 23 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getuid 24 () :unsigned-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::stime 25 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::ptrace 26 (:unsigned-fullword
- :unsigned-fullword
- :address
- :address)
- :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::alarm 27 (:unsigned-fullword) :unsigned-fullword )
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::pause 29 () :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::utime 30 (:address :address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::access 33 (:address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::nice 34 (:signed-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sync 36 () :unsigned-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::kill 37 (:signed-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rename 38 (:address :address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mkdir 39 (:address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rmdir 40 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::dup 41 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::pipe 42 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::times 43 (:address) :unsigned-fullword )
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::brk 45 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setgid 46 (:unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getgid 47 () :unsigned-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::signal 48 (:unsigned-fullword :address) :address )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::geteuid 49 () :unsigned-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getegid 50 () :unsigned-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::acct 51 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::umount2 52 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::ioctl 54 (:unsigned-fullword :signed-fullword :address) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fcntl 55 (:unsigned-fullword :signed-fullword :signed-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setpgid 57 (:signed-fullword :signed-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::umask 60 (:unsigned-fullword) :unsigned-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::chroot 61 (:address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::ustat 62 (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::dup2 63 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getppid 64 () :unsigned-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getpgrp 65 () :unsigned-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setsid 66 () :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sigaction 67 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getrusage 77 (:signed-fullword :address) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::gettimeofday 78 (:address :address) :void)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::ftruncate 93 (:unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fchmod 94 (:unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::socketcall 102 (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::stat 106 (:address :address) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::lstat 107 (:address :address) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fstat 108 (:unsigned-fullword :address) :signed-fullword )
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fsync 118 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::uname 122 (:address) :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fchdir 133 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::_llseek 140 (:unsigned-fullword :unsigned-fullword :unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::select 142 (:unsigned-fullword :address :address
- :address :address)
- :signed-fullword)
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getcwd 182 (:address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::poll 167 ((:* (:struct :pollfd)) :int :int) :int)
-
-#+notdefinedyet
-(progn
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sgetmask 68 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::ssetmask 69 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setreuid 70 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setregid 71 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sigsuspend 72 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sigpending 73 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sethostname 74 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setrlimit 75 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getrlimit 76 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::settimeofday 79 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getgroups 80 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setgroups 81 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::symlink 83 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::oldlstat 84 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::readlink 85 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::uselib 86 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::swapon 87 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::reboot 88 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::readdir 89 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mmap 90 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::munmap 91 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::truncate 92 () )
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fchown 95 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getpriority 96 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setpriority 97 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::statfs 99 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fstatfs 100 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::ioperm 101 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::syslog 103 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setitimer 104 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getitimer 105 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::olduname 109 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::iopl 110 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::vhangup 111 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::idle 112 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::vm86 113 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::wait4 114 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::swapoff 115 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sysinfo 116 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::ipc 117 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sigreturn 119 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::clone 120 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setdomainname 121 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::modify_ldt 123 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::adjtimex 124 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mprotect 125 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sigprocmask 126 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::create_module 127 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::init_module 128 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::delete_module 129 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::get_kernel_syms 130 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::quotactl 131 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getpgid 132 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::bdflush 134 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sysfs 135 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::personality 136 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setfsuid 138 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setfsgid 139 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getdents 141 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::_newselect 142 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::flock 143 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::msync 144 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::readv 145 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::writev 146 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getsid 147 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::fdatasync 148 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::_sysctl 149 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mlock 150 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::munlock 151 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mlockall 152 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::munlockall 153 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_setparam 154 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_getparam 155 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_setscheduler 156 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_getscheduler 157 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_yield 158 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_get_priority_max 159 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_get_priority_min 160 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sched_rr_get_interval 161 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::nanosleep 162 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::mremap 163 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setresuid 164 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getresuid 165 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::query_module 166 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::poll 167 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::nfsservctl 168 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::setresgid 169 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getresgid 170 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::prctl 171 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rt_sigreturn 172 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rt_sigaction 173 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rt_sigprocmask 174 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rt_sigpending 175 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rt_sigtimedwait 176 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rt_sigqueueinfo 177 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::rt_sigsuspend 178 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::pread 179 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::pwrite 180 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::chown 181 (:address) )
-
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::capget 183 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::capset 184 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sigaltstack 185 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::sendfile 186 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::getpmsg 187 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::putpmsg 188 () )
-(define-syscall (logior platform-cpu-ppc platform-os-linux) syscalls::vfork 189 () )
-
-)
diff --git a/library/sockets.lisp b/library/sockets.lisp
index 135ab60bc..b653b2035 100644
--- a/library/sockets.lisp
+++ b/library/sockets.lisp
@@ -43,6 +43,7 @@
LOCAL-SOCKET-ADDRESS
SOCKET-ADDRESS-FAMILY
SOCKET-CONNECT
+ SOCKET-CONNECTED
SOCKET-FORMAT
SOCKET-TYPE
SOCKET-ERROR
@@ -355,9 +356,10 @@ for udp-socket."))
(defmethod socket-type ((socket stream-file-socket)) :stream)
+;;; Is this used by anybody?
(defgeneric socket-connect (stream)
(:documentation
- "Return :active for tcp-stream, :passive for listener-socket, and NIL
+ "Return :active for tcp-stream, :passive for listener-socket, and socket-connected
for udp-socket"))
(defmethod socket-connect ((stream tcp-stream)) :active)
@@ -409,7 +411,7 @@ make-socket."))
(assert (and in-p out-p) () "Non-bidirectional file-socket stream?")
'basic-file-socket-stream)
-(defmethod socket-format ((socket unconnected-socket))
+(defmethod socket-format ((socket device-mixin))
(or (getf (socket-keys socket) :format) :text))
(defgeneric close (socket &key abort)
@@ -417,13 +419,17 @@ make-socket."))
"The close generic function can be applied to sockets. It releases the
operating system resources associated with the socket."))
-(defmethod close ((socket unconnected-socket) &key abort)
+(defmethod close ((socket device-mixin) &key abort)
(declare (ignore abort))
(when (socket-device socket)
(fd-close (socket-device socket))
(setf (socket-device socket) nil)
t))
+(defmethod close :after ((socket udp-socket) &key abort)
+ (declare (ignore abort))
+ (setf (socket-connected socket) nil))
+
(defmethod socket-connect ((stream listener-socket)) :passive)
(defmethod socket-connect ((stream file-listener-socket)) :passive)
@@ -436,7 +442,7 @@ operating system resources associated with the socket."))
(socket-error nil "connect" err nil :connect-address socket-address))))
(defmethod socket-type ((stream udp-socket)) :datagram)
-(defmethod socket-connect ((stream udp-socket)) nil)
+(defmethod socket-connect ((stream udp-socket)) (socket-connected stream))
(defmethod socket-format ((stream udp-socket)) :binary)
(defgeneric socket-os-fd (socket)
@@ -631,7 +637,8 @@ the socket is not connected."))
:port remote-port
:allow-other-keys t
keys)
- nil))
+ nil)
+ (setf (socket-connected socket) t))
(setq fd -1)
socket)
(unless (< fd 0)
@@ -646,24 +653,8 @@ the socket is not connected."))
backlog connect-timeout deadline
&allow-other-keys)
(unwind-protect
- (let ((timeout-in-milliseconds
- (cond
- (deadline
- (max (round (- deadline (get-internal-real-time))
- (/ internal-time-units-per-second 1000))
- 0))
- (connect-timeout
- (check-io-timeout connect-timeout)
- (round (* connect-timeout 1000)))))
- (socket-address (or remote-address
- (apply #'resolve-address
- :connect connect
- :address-family address-family
- :host remote-host
- :port remote-port
- :allow-other-keys t
- keys))))
- (when (< fd 0)
+ (progn
+ (when (< fd 0)
(setq fd (socket-call nil "socket"
(c_socket (ecase address-family
(:internet #$PF_INET)
@@ -676,8 +667,25 @@ the socket is not connected."))
keys)))
(apply #'set-socket-options socket keys)
(if (eql connect :passive)
- (socket-call nil "listen" (c_listen fd (or backlog 5)))
- (%socket-connect fd socket-address timeout-in-milliseconds))
+ (socket-call nil "listen" (c_listen fd (or backlog 5)))
+ (let ((timeout-in-milliseconds
+ (cond
+ (deadline
+ (max (round (- deadline (get-internal-real-time))
+ (/ internal-time-units-per-second 1000))
+ 0))
+ (connect-timeout
+ (check-io-timeout connect-timeout)
+ (round (* connect-timeout 1000)))))
+ (socket-address (or remote-address
+ (apply #'resolve-address
+ :connect connect
+ :address-family address-family
+ :host remote-host
+ :port remote-port
+ :allow-other-keys t
+ keys))))
+ (%socket-connect fd socket-address timeout-in-milliseconds)))
(setq fd -1)
socket))
(unless (< fd 0)
@@ -843,7 +851,8 @@ the socket is not connected."))
(_accept fd *multiprocessing-socket-io*)))
(*multiprocessing-socket-io*
(_accept fd t))
- (t
+ (t ; if nowait was specified, temporarily force the socket to not block
+ ; (sockets are generally 'born blocking' in CCL)
(let ((was-blocking (get-socket-fd-blocking fd)))
(unwind-protect
(progn
@@ -908,24 +917,29 @@ accept-connection on it again."))
(defmethod send-to ((socket udp-socket) msg size
&key remote-host remote-port remote-address offset)
"Send a UDP packet over a socket."
- (let ((socket-address (or remote-address
- (remote-socket-address socket)
- (resolve-address :host (or remote-host
- (getf (socket-keys socket) :remote-host))
- :port (or remote-port
- (getf (socket-keys socket) :remote-port))
- :connect :active
- :address-family (socket-address-family socket)
- :socket-type :datagram))))
+ (let ((socket-address (and (not (socket-connected socket))
+ (or remote-address
+ (remote-socket-address socket)
+ (resolve-address :host (or remote-host
+ (getf (socket-keys socket) :remote-host))
+ :port (or remote-port
+ (getf (socket-keys socket) :remote-port))
+ :connect :active
+ :address-family (socket-address-family socket)
+ :socket-type :datagram)))))
(multiple-value-setq (msg offset) (verify-socket-buffer msg offset size))
(%stack-block ((bufptr size))
(%copy-ivector-to-ptr msg offset bufptr 0 size)
(socket-call socket "sendto"
- (with-eagain (socket-device socket) :output
- (c_sendto (socket-device socket)
- bufptr size 0
- (sockaddr socket-address)
- (sockaddr-length socket-address)))))))
+ (with-eagain (socket-device socket) :output
+ (c_sendto (socket-device socket)
+ bufptr size 0
+ (if socket-address
+ (sockaddr socket-address)
+ (%null-ptr))
+ (if socket-address
+ (sockaddr-length socket-address)
+ 0)))))))
(defmethod receive-from ((socket udp-socket) size &key buffer extract offset want-socket-address-p)
"Read a UDP packet from a socket. If no packets are available, wait for
@@ -942,7 +956,7 @@ If want-socket-address-p is true:
The buffer with the data
The number of bytes read
- The socket-address describing the sender
+ The socket-address object describing the sender
"
(let ((fd (socket-device socket))
(vec-offset offset)
@@ -990,8 +1004,12 @@ you need to read responses after sending an end-of-file signal."))
(let ((fd (socket-device socket)))
(socket-call socket "shutdown"
(c_shutdown fd (ecase direction
- (:input 0)
- (:output 1))))))
+ (:input #-windows-target #$SHUT_RD
+ #+windows-target #$SD_RECEIVE)
+ (:output #-windows-target #$SHUT_WR
+ #+windows-target #$SD_SEND)
+ (:both #-windows-target #$SHUT_RDWR
+ #+windows-target #$SD_BOTH))))))
(defun dotted-to-ipaddr (name &key (errorp t))
"Convert a dotted-string representation of a host address to a 32-bit
@@ -1463,25 +1481,25 @@ unsigned IP address."
(princ-to-string port)))
(defun resolve-address (&key
- host
- port
- (socket-type :stream)
- (connect :active)
- address-family
- numeric-host-p
- #-windows-target numeric-service-p
- (singlep t)
- (errorp t))
+ host
+ port
+ (socket-type :stream)
+ (connect :active)
+ address-family
+ numeric-host-p
+ #-windows-target numeric-service-p
+ (singlep t)
+ (errorp t))
"Resolve a host and/or port string to one or more socket-address
-instances. Either host or port may be unspecified. Calls
-getaddrinfo() underneath.
-
-singlep may be passed as NIL to make the function return a list of
-host addresses matching the specified query terms. The default is to
-return the first matching address.
-
-errorp may be passed as NIL to return NIL if no match was found."
-
+ instances. Either host or port may be unspecified. Calls
+ getaddrinfo() underneath.
+
+ singlep may be passed as NIL to make the function return a list of
+ host addresses matching the specified query terms. The default is to
+ return the first matching address.
+
+ errorp may be passed as NIL to return NIL if no match was found."
+
;; We have historically supported the use of an (unsigned-byte 32)
;; value to represent an IPv4 address. If existing code does that to
;; avoid overhead (name resolution, consing, what-have-you), then
@@ -1497,18 +1515,18 @@ errorp may be passed as NIL to return NIL if no match was found."
(symbol (_getservbyname (string-downcase
(string port)) proto)))))
(if (null inet-port)
- (when errorp
- (error "can't resolve port ~s with getservbyname" port))
- (let* ((socket-address (make-instance 'socket-address))
- (sin (sockaddr socket-address)))
- (setf (pref sin :sockaddr_in.sin_family) #$AF_INET)
- (setf (pref sin
- #+(or windows-target solaris-target) #>sockaddr_in.sin_addr.S_un.S_addr
- #-(or windows-target solaris-target) :sockaddr_in.sin_addr.s_addr) (htonl host))
- (setf (pref sin :sockaddr_in.sin_port) inet-port)
- (upgrade-socket-address-from-sockaddr #$AF_INET socket-address)
- (return-from resolve-address socket-address)))))
-
+ (when errorp
+ (error "can't resolve port ~s with getservbyname" port))
+ (let* ((socket-address (make-instance 'socket-address))
+ (sin (sockaddr socket-address)))
+ (setf (pref sin :sockaddr_in.sin_family) #$AF_INET)
+ (setf (pref sin
+ #+(or windows-target solaris-target) #>sockaddr_in.sin_addr.S_un.S_addr
+ #-(or windows-target solaris-target) :sockaddr_in.sin_addr.s_addr) (htonl host))
+ (setf (pref sin :sockaddr_in.sin_port) inet-port)
+ (upgrade-socket-address-from-sockaddr #$AF_INET socket-address)
+ (return-from resolve-address socket-address)))))
+
(with-cstrs ((host-buf (or host ""))
(port-buf (string-downcase (or (ensure-string port) ""))))
(rletZ ((hints #>addrinfo)
@@ -1535,24 +1553,26 @@ errorp may be passed as NIL to return NIL if no match was found."
results)))
(if (eql 0 err)
(prog1
- (or (loop for info = (pref results :address) then (pref info #>addrinfo.ai_next)
- until (%null-ptr-p info)
- for sockaddr = (pref info #>addrinfo.ai_addr)
- for socket-address = (make-instance 'socket-address)
- do (loop for i below (pref info #>addrinfo.ai_addrlen)
- do (setf (paref (sockaddr socket-address) :uint8_t i)
- (paref sockaddr :uint8_t i)))
- (upgrade-socket-address-from-sockaddr (pref (sockaddr socket-address) :sockaddr_storage.ss_family)
- socket-address)
- if singlep
- do (return socket-address)
- else
- collect socket-address)
- (when errorp
- (error "cannot resolve local service host ~A port ~A connect ~S type ~S"
- host port connect socket-type)))
+ (or (loop for info = (pref results :address) then (pref info #>addrinfo.ai_next)
+ until (%null-ptr-p info)
+ for sockaddr = (pref info #>addrinfo.ai_addr)
+ for socket-address = (make-instance 'socket-address)
+ do (loop for i below (pref info #>addrinfo.ai_addrlen)
+ do (setf (paref (sockaddr socket-address) :uint8_t i)
+ (paref sockaddr :uint8_t i)))
+ (upgrade-socket-address-from-sockaddr (pref (sockaddr socket-address) :sockaddr_storage.ss_family)
+ socket-address)
+ if singlep
+ do (return socket-address)
+ else
+ collect socket-address)
+ (when errorp
+ (error "cannot resolve local service host ~A port ~A connect ~S type ~S"
+ host port connect socket-type)))
(#_freeaddrinfo (pref results :address)))
- (values nil err))))))
+ (if errorp
+ (socket-error nil "getaddrinfo" err t)
+ (values nil err)))))))
(defclass ip4-socket-address (ip-socket-address)
())
@@ -1708,7 +1728,8 @@ the resulting sockaddr."
(case (find-symbol (string-upcase proto) :keyword)
(:udp :datagram)
(:tcp :stream))
- proto))))
+ proto)
+ :errorp nil)))
(when socket-address
(port socket-address)))))
@@ -1717,7 +1738,7 @@ the resulting sockaddr."
unsigned IP address."
(if (typep host 'integer)
host
- (let ((socket-address (resolve-address :host host :address-family :internet)))
+ (let ((socket-address (resolve-address :host host :address-family :internet :errorp nil)))
(when socket-address
(host socket-address)))))
diff --git a/library/syscall.lisp b/library/syscall.lisp
deleted file mode 100644
index fedf03463..000000000
--- a/library/syscall.lisp
+++ /dev/null
@@ -1,68 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2001-2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-;;; "Generic" syscall sypport.
-
-(in-package "CCL")
-
-(defpackage "SYSCALLS" (:use))
-
-(defstruct syscall
- (idx 0 :type fixnum)
- (arg-specs () :type list)
- (result-spec nil :type symbol)
- (min-args 0 :type fixnum))
-
-(defvar *os-syscall-definitions* ())
-
-(defun platform-syscall-definitions (platform-os)
- (or (getf *os-syscall-definitions* platform-os)
- (setf (getf *os-syscall-definitions* platform-os)
- (make-hash-table :test 'eq))))
-
-(defun backend-syscall-definitions (backend)
- (platform-syscall-definitions (backend-platform-syscall-mask backend)))
-
-
-
-(defmacro define-syscall (platform name idx (&rest arg-specs) result-spec
- &key (min-args (length arg-specs)))
- `(progn
- (setf (gethash ',name (platform-syscall-definitions ,platform))
- (make-syscall :idx ,idx
- :arg-specs ',arg-specs
- :result-spec ',result-spec
- :min-args ,min-args))
- ',name))
-
-(defmacro syscall (name &rest args)
- (let* ((info (or (gethash name (backend-syscall-definitions *target-backend*))
- (error "Unknown system call: ~s" name)))
- (idx (syscall-idx info))
- (arg-specs (syscall-arg-specs info))
- (n-argspecs (length arg-specs))
- (n-args (length args))
- (min-args (syscall-min-args info))
- (result (syscall-result-spec info)))
- (unless (and (>= n-args min-args) (<= n-args n-argspecs))
- (error "wrong number of args in ~s" args))
- (do* ((call ())
- (specs arg-specs (cdr specs))
- (args args (cdr args)))
- ((null args)
- `(%syscall ,idx ,@(nreverse (cons result call))))
- (push (car specs) call)
- (push (car args) call))))
diff --git a/library/x86-win64-syscalls.lisp b/library/x86-win64-syscalls.lisp
deleted file mode 100644
index bea63e1c9..000000000
--- a/library/x86-win64-syscalls.lisp
+++ /dev/null
@@ -1,281 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2008-2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL"))
-
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::open 0 (:address :unsigned-fullword :unsigned-fullword) :signed-fullword :min-args 2)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::close 1 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::read 2 (:unsigned-fullword :address :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::write 3 (:unsigned-fullword :address :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fchmod 4 (:unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::lseek 5 (:unsigned-fullword :signed-doubleword :unsigned-fullword) :signed-doubleword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::stat 6 (:address :address) :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fstat 7 (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::ftruncate 8 (:unsigned-fullword :unsigned-doubleword)
- :signed-fullword)
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::opendir 9 (:address) :address)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::readdir 10 (:address) :address)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::closedir 11 (:address)
- :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::pipe 12 (:address) :signed-fullword )
-
-#+notdefinedyet
-(progn
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::lstat 190 (:address :address) :signed-fullword)
-
-
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::exit 1 (:signed-fullword) :void)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fork 2 () :signed-fullword)
-
-
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::creat 85 (:address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::link 9 (:address :address) :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::unlink 10 (:address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::execve 59 (:address :address :address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::chdir 12 (:address) :signed-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::time 201 (:address) :unsigned-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mknod 14 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::chmod 15 (:address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::lchown 254 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getpid 20 () :unsigned-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mount 21 (:address :address :address :unsigned-fullword :address) :signed-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::umount2 166 (:address) :signed-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setuid 23 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getuid 24 () :unsigned-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::ptrace 26 (:unsigned-fullword
- :unsigned-fullword
- :address
- :address)
- :signed-fullword)
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::alarm 37 (:unsigned-fullword) :unsigned-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::pause 34 () :signed-fullword)
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::utime 132 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::access 33 (:address :unsigned-fullword) :signed-fullword)
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sync 36 () :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::kill 37 (:signed-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rename 128 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mkdir 136 (:address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rmdir 17 (:address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::dup 41 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::times 100 (:address) :unsigned-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::brk 12 (:address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setgid 181 (:unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getgid 47 () :unsigned-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::geteuid 25 () :unsigned-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getegid 43 () :unsigned-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::acct 51 (:address) :signed-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::ioctl 54 (:unsigned-fullword :signed-fullword :address) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fcntl 92 (:unsigned-fullword :signed-fullword :signed-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setpgid 82 (:signed-fullword :signed-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::umask 60 (:unsigned-fullword) :unsigned-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::chroot 61 (:address) :signed-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::ustat 136 (:unsigned-fullword :address) :signed-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::dup2 90 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getppid 39 () :unsigned-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getpgrp 81 () :unsigned-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setsid 147 () :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sigaction 416 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getrusage 117 (:signed-fullword :address) :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::gettimeofday 116 (:address :address) :void)
-
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fchmod 124 (:unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::socket 97 (:signed-fullword :signed-fullword :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::connect 98 (:signed-fullword :address :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::accept 30 (:signed-fullword :address :address)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sendto 133 (:unsigned-fullword :address :unsigned-fullword :unsigned-fullword :address :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::recvfrom 29 (:unsigned-fullword :address :unsigned-long :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sendmsg 28 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::recvmsg 27 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::shutdown 134 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::bind 104 (:signed-fullword :address :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::listen 106 (:signed-fullword :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getpeername 31 (:signed-fullword :address :address)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getsockname 32 (:signed-fullword :address :address)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::socketpair 135 (:signed-fullword :signed-fullword :signed-fullword :address)
- :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setsockopt 105 (:unsigned-fullword :signed-fullword :signed-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getsockopt 118 (:unsigned-fullword :signed-fullword :unsigned-fullword :address :address) :signed-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fsync 95 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::uname 164 (:address) :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fchdir 13 (:unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::select 93 (:unsigned-fullword :address :address
- :address :address)
- :signed-fullword)
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getcwd 326 (:address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::poll 209 ((:* (:struct :pollfd)) :int :int) :int)
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sgetmask 68 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::ssetmask 69 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setreuid 70 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setregid 71 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sigsuspend 72 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sigpending 73 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sethostname 74 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setrlimit 75 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getrlimit 76 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::settimeofday 79 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getgroups 80 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setgroups 81 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::symlink 83 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::oldlstat 84 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::readlink 58 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::uselib 86 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::swapon 87 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::reboot 88 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::readdir 89 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::truncate 92 () )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fchown 95 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getpriority 96 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setpriority 97 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::statfs 99 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fstatfs 100 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::ioperm 101 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::syslog 103 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setitimer 38 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getitimer 36 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::olduname 109 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::iopl 110 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::vhangup 111 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::idle 112 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::vm86 113 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::wait4 7 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::swapoff 115 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sysinfo 116 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::ipc 117 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sigreturn 119 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::clone 120 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setdomainname 121 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::modify_ldt 123 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::adjtimex 124 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mprotect 10 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sigprocmask 126 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::create_module 127 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::init_module 128 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::delete_module 129 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::get_kernel_syms 130 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::quotactl 131 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getpgid 132 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::bdflush 134 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sysfs 135 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::personality 136 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setfsuid 138 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setfsgid 139 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getdents 141 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::_newselect 142 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::flock 143 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::msync 26 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::readv 19 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::writev 20 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getsid 147 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::fdatasync 148 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::_sysctl 149 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mlock 150 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::munlock 151 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mlockall 152 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::munlockall 153 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_setparam 154 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_getparam 155 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_setscheduler 156 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_getscheduler 157 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_yield 24 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_get_priority_max 159 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_get_priority_min 160 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sched_rr_get_interval 161 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::nanosleep 35 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mremap 25 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setresuid 164 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getresuid 165 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::query_module 166 () )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::nfsservctl 168 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::setresgid 169 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getresgid 170 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::prctl 171 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rt_sigreturn 15 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rt_sigaction 13 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rt_sigprocmask 14 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rt_sigpending 175 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rt_sigtimedwait 176 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rt_sigqueueinfo 177 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::rt_sigsuspend 178 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::pread 17 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::pwrite 18 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::chown 181 (:address) )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::capget 183 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::capset 184 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sigaltstack 185 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::sendfile 40 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::getpmsg 187 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::putpmsg 188 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::vfork 189 () )
-
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::mmap 9 () )
-(define-syscall (logior platform-os-windows platform-cpu-x86 platform-word-size-64) syscalls::munmap 73 () )
-
-)
diff --git a/library/x8664-freebsd-syscalls.lisp b/library/x8664-freebsd-syscalls.lisp
deleted file mode 100644
index 1bf465aab..000000000
--- a/library/x8664-freebsd-syscalls.lisp
+++ /dev/null
@@ -1,272 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2006-2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL"))
-
-
-
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::read 3 (:unsigned-fullword :address :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::write 4 (:unsigned-fullword :address :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::open 5 (:address :unsigned-fullword :unsigned-fullword) :signed-fullword :min-args 2)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::close 6 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::stat 188 (:address :address) :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fstat 189 (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::lstat 190 (:address :address) :signed-fullword)
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::lseek 199 (:unsigned-fullword :unsigned-doubleword :signed-doubleword :unsigned-fullword) :signed-doubleword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::exit 1 (:signed-fullword) :void)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fork 2 () :signed-fullword)
-
-
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::creat 85 (:address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::link 9 (:address :address) :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::unlink 10 (:address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::execve 59 (:address :address :address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::chdir 12 (:address) :signed-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::time 201 (:address) :unsigned-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mknod 14 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::chmod 15 (:address :unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::lchown 254 (:address :unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getpid 20 () :unsigned-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mount 21 (:address :address :address :unsigned-fullword :address) :signed-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::umount2 166 (:address) :signed-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setuid 23 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getuid 24 () :unsigned-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::ptrace 26 (:unsigned-fullword
- :unsigned-fullword
- :address
- :address)
- :signed-fullword)
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::alarm 37 (:unsigned-fullword) :unsigned-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::pause 34 () :signed-fullword)
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::utime 132 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::access 33 (:address :unsigned-fullword) :signed-fullword)
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sync 36 () :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::kill 37 (:signed-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rename 128 (:address :address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mkdir 136 (:address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rmdir 137 (:address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::dup 41 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::pipe 42 (:address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::times 100 (:address) :unsigned-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::brk 12 (:address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setgid 181 (:unsigned-fullword) :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getgid 47 () :unsigned-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::geteuid 25 () :unsigned-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getegid 43 () :unsigned-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::acct 51 (:address) :signed-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::ioctl 54 (:unsigned-fullword :signed-fullword :address) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fcntl 92 (:unsigned-fullword :signed-fullword :signed-fullword) :signed-fullword :min-args 2 )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setpgid 82 (:signed-fullword :signed-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::umask 60 (:unsigned-fullword) :unsigned-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::chroot 61 (:address) :signed-fullword )
-
-#+notyet
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::ustat 136 (:unsigned-fullword :address) :signed-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::dup2 90 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getppid 39 () :unsigned-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getpgrp 81 () :unsigned-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setsid 147 () :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sigaction 416 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getrusage 117 (:signed-fullword :address) :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::gettimeofday 116 (:address :address) :void)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::ftruncate 201 (:unsigned-fullword :unsigned-fullword)
- :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fchmod 91 (:unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fchmod 124 (:unsigned-fullword :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::socket 97 (:signed-fullword :signed-fullword :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::connect 98 (:signed-fullword :address :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::accept 30 (:signed-fullword :address :address)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sendto 133 (:unsigned-fullword :address :unsigned-fullword :unsigned-fullword :address :unsigned-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::recvfrom 29 (:unsigned-fullword :address :unsigned-long :unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sendmsg 28 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::recvmsg 27 (:unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::shutdown 134 (:unsigned-fullword :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::bind 104 (:signed-fullword :address :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::listen 106 (:signed-fullword :signed-fullword)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getpeername 31 (:signed-fullword :address :address)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getsockname 32 (:signed-fullword :address :address)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::socketpair 135 (:signed-fullword :signed-fullword :signed-fullword :address)
- :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setsockopt 105 (:unsigned-fullword :signed-fullword :signed-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getsockopt 118 (:unsigned-fullword :signed-fullword :unsigned-fullword :address :address) :signed-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fsync 95 (:unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::uname 164 (:address) :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fchdir 13 (:unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::select 93 (:unsigned-fullword :address :address
- :address :address)
- :signed-fullword)
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getcwd 326 (:address :unsigned-fullword) :signed-fullword )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::poll 209 ((:* (:struct :pollfd)) :int :int) :int)
-
-#+notdefinedyet
-(progn
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sgetmask 68 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::ssetmask 69 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setreuid 70 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setregid 71 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sigsuspend 72 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sigpending 73 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sethostname 74 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setrlimit 75 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getrlimit 76 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::settimeofday 79 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getgroups 80 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setgroups 81 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::symlink 83 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::oldlstat 84 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::readlink 58 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::uselib 86 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::swapon 87 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::reboot 88 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::readdir 89 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::truncate 92 () )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fchown 95 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getpriority 96 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setpriority 97 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::statfs 99 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fstatfs 100 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::ioperm 101 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::syslog 103 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setitimer 38 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getitimer 36 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::olduname 109 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::iopl 110 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::vhangup 111 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::idle 112 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::vm86 113 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::wait4 7 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::swapoff 115 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sysinfo 116 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::ipc 117 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sigreturn 119 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::clone 120 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setdomainname 121 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::modify_ldt 123 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::adjtimex 124 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mprotect 10 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sigprocmask 126 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::create_module 127 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::init_module 128 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::delete_module 129 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::get_kernel_syms 130 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::quotactl 131 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getpgid 132 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::bdflush 134 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sysfs 135 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::personality 136 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setfsuid 138 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setfsgid 139 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getdents 141 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::_newselect 142 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::flock 143 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::msync 26 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::readv 19 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::writev 20 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getsid 147 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::fdatasync 148 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::_sysctl 149 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mlock 150 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::munlock 151 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mlockall 152 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::munlockall 153 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_setparam 154 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_getparam 155 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_setscheduler 156 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_getscheduler 157 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_yield 24 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_get_priority_max 159 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_get_priority_min 160 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sched_rr_get_interval 161 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::nanosleep 35 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mremap 25 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setresuid 164 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getresuid 165 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::query_module 166 () )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::nfsservctl 168 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::setresgid 169 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getresgid 170 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::prctl 171 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rt_sigreturn 15 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rt_sigaction 13 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rt_sigprocmask 14 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rt_sigpending 175 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rt_sigtimedwait 176 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rt_sigqueueinfo 177 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::rt_sigsuspend 178 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::pread 17 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::pwrite 18 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::chown 181 (:address) )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::capget 183 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::capset 184 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sigaltstack 185 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::sendfile 40 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::getpmsg 187 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::putpmsg 188 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::vfork 189 () )
-
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::mmap 9 () )
-(define-syscall (logior platform-os-freebsd platform-cpu-x86 platform-word-size-64) syscalls::munmap 73 () )
-
-)
diff --git a/library/x8664-linux-syscalls.lisp b/library/x8664-linux-syscalls.lisp
deleted file mode 100644
index 4910d8aa3..000000000
--- a/library/x8664-linux-syscalls.lisp
+++ /dev/null
@@ -1,261 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2001-2009 Clozure Associates
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL"))
-
-
-
-
-
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::read 0 (:int :address :size_t)
- :ssize_t)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::write 1 (:int :address :size_t)
- :ssize_t)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::open 2 (:address :int :mode_t) :int :min-args 2)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::close 3 (:int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::stat 4 (:address :address) :signed-fullword)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fstat 5 (:unsigned-fullword :address) :signed-fullword )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::lstat 6 (:address :address) :signed-fullword)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::poll 7 ((:* (:struct :pollfd)) :int :int) :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::lseek 8 (:int :off_t :int) :off_t )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::exit 60 (:int) :void)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fork 57 () :pid_t)
-
-
-
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::creat 85 (:address :mode_t) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::link 86 (:address :address) :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::unlink 87 (:address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::execve 59 (:address :address :address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::chdir 80 (:address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::time 201 (:address) :time_t )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mknod 133 (:address :mode_t :dev_t)
- :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::chmod 90 (:address :mode_t) :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::lchown 94 (:address :uid_t :gid_t)
- :int)
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getpid 39 () :pid_t)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mount 165 (:address
- :address
- :address
- :unsigned-long
- :address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::umount2 166 (:address :int) :int )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setuid 105 (:uid_t) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getuid 102 () :uid_t )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::ptrace 101 (:unsigned-fullword
- :pid_t
- :address
- :address)
- :long)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::alarm 37 (:unsigned) :unsigned )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::pause 34 () :unt)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::utime 132 (:address :address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::access 21 (:address :int) :int)
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sync 162 () :void )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::kill 62 (:pid_t :int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rename 82 (:address :address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mkdir 83 (:address :mode_t) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rmdir 84 (:address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::dup 32 (:int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::pipe 22 (:address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::times 100 (:address) :clock_t )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::brk 12 (:address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setgid 106 (:gid_t) :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getgid 104 () :gid_t )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::geteuid 107 () :uid_t )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getegid 108 () :gid_t)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::acct 163 (:address) :INT )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::ioctl 16 (:int :int :address) :int :min-args 2 )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fcntl 72 (:int :int :long) :int :min-args 2 )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setpgid 109 (:pid_t :gid_t) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::umask 95 (:mode_t) :mode_t )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::chroot 161 (:address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::ustat 136 (:dev_t :address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::dup2 33 (:int :int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getppid 110 () :pid_t)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getpgrp 111 () :gid_t)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setsid 112 () :pid_t)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt-sigaction 13 (:unsigned-fullword :address :address) :signed-fullword )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getrusage 98 (:int :address) :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::gettimeofday 96 (:address :address) :void)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::ftruncate 77 (:int :off_t)
- :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fchmod 91 (:int :mode_t)
- :int )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::socket 41 (:int :int :int)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::connect 42 (:int :address :socklen_t)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::accept 43 (:int :address :address)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sendto 44 (:int :address :size_t :int :address :socklen_t) :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::recvfrom 45 (:int :address :size_t :int :address :address) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sendmsg 46 (:int :address :int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::recvmsg 47 (:int :address :int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::shutdown 48 (:int :int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::bind 49 (:int :address :socklen_t)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::listen 50 (:int :int)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getsockname 51 (:int :address :address)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getpeername 52 (:int :address :address)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::socketpair 53 (:int :int :int :address)
- :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setsockopt 54 (:int :int :int :address :socklen_t) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getsockopt 55 (:int :int :int :address :address) :int )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fsync 118 (:int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::uname 63 (:address) :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fchdir 133 (:int) :int )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::_llseek 140 (:unsigned-fullword :unsigned-fullword :unsigned-fullword :address :unsigned-fullword) :signed-fullword )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::select 23 (:int :address :address
- :address :address)
- :int)
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getcwd 79 (:address :unsigned-long) :long )
-
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::futex 202 (:address :int :int :address :address :int) :int )
-
-#+notdefinedyet
-(progn
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sgetmask 68 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::ssetmask 69 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setreuid 70 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setregid 71 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sigsuspend 72 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sigpending 73 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sethostname 74 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setrlimit 75 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getrlimit 76 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::settimeofday 79 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getgroups 80 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setgroups 81 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::symlink 83 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::oldlstat 84 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::readlink 85 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::uselib 86 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::swapon 87 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::reboot 88 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::readdir 89 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::truncate 92 () )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fchown 95 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getpriority 96 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setpriority 97 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::statfs 99 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fstatfs 100 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::ioperm 101 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::syslog 103 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setitimer 38 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getitimer 36 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::olduname 109 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::iopl 110 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::vhangup 111 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::idle 112 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::vm86 113 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::wait4 114 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::swapoff 115 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sysinfo 116 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::ipc 117 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sigreturn 119 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::clone 120 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setdomainname 121 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::modify_ldt 123 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::adjtimex 124 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mprotect 10 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sigprocmask 126 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::create_module 127 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::init_module 128 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::delete_module 129 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::get_kernel_syms 130 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::quotactl 131 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getpgid 132 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::bdflush 134 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sysfs 135 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::personality 136 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setfsuid 138 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setfsgid 139 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getdents 141 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::_newselect 142 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::flock 143 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::msync 26 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::readv 19 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::writev 20 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getsid 147 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::fdatasync 148 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::_sysctl 149 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mlock 150 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::munlock 151 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mlockall 152 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::munlockall 153 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_setparam 154 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_getparam 155 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_setscheduler 156 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_getscheduler 157 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_yield 24 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_get_priority_max 159 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_get_priority_min 160 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sched_rr_get_interval 161 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::nanosleep 35 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mremap 25 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setresuid 164 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getresuid 165 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::query_module 166 () )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::nfsservctl 168 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::setresgid 169 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getresgid 170 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::prctl 171 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt_sigreturn 15 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt_sigaction 13 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt_sigprocmask 14 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt_sigpending 175 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt_sigtimedwait 176 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt_sigqueueinfo 177 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::rt_sigsuspend 178 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::pread 17 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::pwrite 18 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::chown 181 (:address) )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::capget 183 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::capset 184 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sigaltstack 185 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::sendfile 40 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::getpmsg 187 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::putpmsg 188 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::vfork 189 () )
-
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::mmap 9 () )
-(define-syscall (logior platform-os-linux platform-cpu-x86 platform-word-size-64) syscalls::munmap 11 () )
-
-)
diff --git a/library/x8664-solaris-syscalls.lisp b/library/x8664-solaris-syscalls.lisp
deleted file mode 100644
index 1821a65d4..000000000
--- a/library/x8664-solaris-syscalls.lisp
+++ /dev/null
@@ -1,493 +0,0 @@
-;;;-*-Mode: LISP; Package: CCL -*-
-;;;
-;;; Copyright (C) 2008-2009 Clozure Associates and contributors
-;;; This file is part of Clozure CL.
-;;;
-;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
-;;; License , known as the LLGPL and distributed with Clozure CL as the
-;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
-;;; which is distributed with Clozure CL as the file "LGPL". Where these
-;;; conflict, the preamble takes precedence.
-;;;
-;;; Clozure CL is referenced in the preamble as the "LIBRARY."
-;;;
-;;; The LLGPL is also available online at
-;;; http://opensource.franz.com/preamble.html
-
-(in-package "CCL")
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (require "SYSCALL"))
-
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::syscall 0 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::exit 1 (:int) :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::forkall 2 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::read 3 (:int :address :size_t) :ssize_t)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::write 4 (:int :address :size_t) :ssize_t)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::open 5 (:address :int :mode_t) :int :min-args 2)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::close 6 (:int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::wait 7 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::creat 8 (:address :mode_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::link 9 (:address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::unlink 10 (:address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::exec 11 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::chdir 12 (:address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::time 13 (:address) :time_t)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::mknod 14 (:address :mode_t :dev_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::chmod 15 (:address :mode_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::chown 16 (:address :uid_t :gid_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::brk 17 (:address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::stat 18 (:address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lseek 19 (:int :off_t :int) :off_t)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getpid 20 () :pid_t)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::mount 21 (:address :address :int :address :address :int :adress :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::umount 22 (:address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setuid 23 (:uid_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getuid 24 () :uid_t)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::stime 25 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pcsample 26 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::alarm 27 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fstat 28 (:int :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pause 29 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::utime 30 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::stty 31 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::gtty 32 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::access 33 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::nice 34 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::statfs 35 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sync 36 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::kill 37 (:pid_t :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fstatfs 38 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pgrpsys 39 () :void)
- #||
- * subcodes:
- * getpgrp() :: syscall(39,0)
- * setpgrp() :: syscall(39,1)
- * getsid(pid) :: syscall(39,2,pid)
- * setsid() :: syscall(39,3)
- * getpgid(pid) :: syscall(39,4,pid)
- * setpgid(pid,pgid) :: syscall(39,5,pid,pgid)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::uucopystr 40 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::dup 41 (:int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pipe 42 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::times 43 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::profil 44 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::plock 45 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setgid 46 (:gid_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getgid 47 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::signal 48 () :void)
- #||
- * subcodes:
- * signal(sig, f) :: signal(sig, f) ((sig&SIGNO_MASK) == sig)
- * sigset(sig, f) :: signal(sig|SIGDEFER, f)
- * sighold(sig) :: signal(sig|SIGHOLD)
- * sigrelse(sig) :: signal(sig|SIGRELSE)
- * sigignore(sig) :: signal(sig|SIGIGNORE)
- * sigpause(sig) :: signal(sig|SIGPAUSE)
- * see
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::msgsys 49 () :void)
- #||
- * subcodes:
- * msgget(...) :: msgsys(0, ...)
- * msgctl(...) :: msgsys(1, ...)
- * msgrcv(...) :: msgsys(2, ...)
- * msgsnd(...) :: msgsys(3, ...)
- * msgids(...) :: msgsys(4, ...)
- * msgsnap(...) :: msgsys(5, ...)
- * see
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sysi86 50 () :void)
- #||
- * subcodes:
- * sysi86(code, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::acct 51 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::shmsys 52 () :void)
- #||
- * subcodes:
- * shmat (...) :: shmsys(0, ...)
- * shmctl(...) :: shmsys(1, ...)
- * shmdt (...) :: shmsys(2, ...)
- * shmget(...) :: shmsys(3, ...)
- * shmids(...) :: shmsys(4, ...)
- * see
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::semsys 53 () :void)
- #||
- * subcodes:
- * semctl(...) :: semsys(0, ...)
- * semget(...) :: semsys(1, ...)
- * semop (...) :: semsys(2, ...)
- * semids(...) :: semsys(3, ...)
- * semtimedop(...) :: semsys(4, ...)
- * see
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::ioctl 54 (:int :int :address) :int :min-args 2)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::uadmin 55 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::utssys 57 () :void)
- #||
- * subcodes (third argument):
- * uname(obuf) (obsolete) :: syscall(57, obuf, ign, 0)
- * subcode 1 unused
- * ustat(dev, obuf) :: syscall(57, obuf, dev, 2)
- * fusers(path, flags, obuf) :: syscall(57, path, flags, 3, obuf)
- * see
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fdsync 58 (:int :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::execve 59 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::umask 60 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::chroot 61 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fcntl 62 (:int :int :address) :int :min-args 2)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::ulimit 63 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::reserved_64 64 #|| 64 reserved ||# () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::reserved_65 65 #|| 65 reserved ||# () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::reserved_66 66 #|| 66 reserved ||# () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::reserved_67 67 #|| 67 reserved ||# () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::reserved_68 68 #|| 68 reserved ||# () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::reserved_69 69 #|| 69 reserved ||# () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::tasksys 70 () :void)
- #||
- * subcodes:
- * settaskid(...) :: tasksys(0, ...)
- * gettaskid(...) :: tasksys(1, ...)
- * getprojid(...) :: tasksys(2, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::acctctl 71 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::exacctsys 72 () :void)
- #||
- * subcodes:
- * getacct(...) :: exacct(0, ...)
- * putacct(...) :: exacct(1, ...)
- * wracct(...) :: exacct(2, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getpagesizes 73 () :void)
- #||
- * subcodes:
- * getpagesizes2(...) :: getpagesizes(0, ...)
- * getpagesizes(...) :: getpagesizes(1, ...) legacy
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::rctlsys 74 () :void)
- #||
- * subcodes:
- * getrctl(...) :: rctlsys(0, ...)
- * setrctl(...) :: rctlsys(1, ...)
- * rctllist(...) :: rctlsys(2, ...)
- * rctlctl(...) :: rctlsys(3, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sidsys 75 () :void)
- #||
- * subcodes:
- * allocids(...) :: sidsys(0, ...)
- * idmap_reg(...) :: sidsys(1, ...)
- * idmap_unreg(...) :: sidsys(2, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fsat 76 () :void)
- #||
- * subcodes:
- * openat(...) :: fsat(0, ...)
- * openat64(...) :: fsat(1, ...)
- * fstatat64(...) :: fsat(2, ...)
- * fstatat(...) :: fsat(3, ...)
- * renameat(...) :: fsat(4, ...)
- * fchownat(...) :: fsat(5, ...)
- * unlinkat(...) :: fsat(6, ...)
- * futimesat(...) :: fsat(7, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_park 77 () :void)
- #||
- * subcodes:
- * _lwp_park(timespec_t *, lwpid_t) :: syslwp_park(0, ...)
- * _lwp_unpark(lwpid_t, int) :: syslwp_park(1, ...)
- * _lwp_unpark_all(lwpid_t *, int) :: syslwp_park(2, ...)
- * _lwp_unpark_cancel(lwpid_t *, int) :: syslwp_park(3, ...)
- * _lwp_set_park(lwpid_t *, int) :: syslwp_park(4, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sendfilev 78 () :void)
- #||
- * subcodes :
- * sendfilev() :: sendfilev(0, ...)
- * sendfilev64() :: sendfilev(1, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::rmdir 79 (:address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::mkdir 80 (:address :mode_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getdents 81 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::privsys 82 () :void)
- #||
- * subcodes:
- * setppriv(...) :: privsys(0, ...)
- * getppriv(...) :: privsys(1, ...)
- * getimplinfo(...) :: privsys(2, ...)
- * setpflags(...) :: privsys(3, ...)
- * getpflags(...) :: privsys(4, ...)
- * issetugid(); :: privsys(5)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::ucredsys 83 () :void)
- #||
- * subcodes:
- * ucred_get(...) :: ucredsys(0, ...)
- * getpeerucred(...) :: ucredsys(1, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sysfs 84 () :void)
- #||
- * subcodes:
- * sysfs(code, ...)
- * see
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getmsg 85 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::putmsg 86 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::poll 87 (:address :nfds_t :int) :int)
-
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lstat 88 (:address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::symlink 89 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::readlink 90 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setgroups 91 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getgroups 92 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fchmod 93 (:int :mode_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fchown 94 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigprocmask 95 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigsuspend 96 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigaltstack 97 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigaction 98 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigpending 99 () :void)
- #||
- * subcodes:
- * subcode 0 unused
- * sigpending(...) :: syscall(99, 1, ...)
- * sigfillset(...) :: syscall(99, 2, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::context 100 () :void)
- #||
- * subcodes:
- * getcontext(...) :: syscall(100, 0, ...)
- * setcontext(...) :: syscall(100, 1, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::evsys 101 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::evtrapret 102 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::statvfs 103 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fstatvfs 104 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getloadavg 105 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::nfssys 106 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::waitid 107 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigsendsys 108 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::hrtsys 109 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigresend 111 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::priocntlsys 112 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pathconf 113 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::mincore 114 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::mmap 115 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::mprotect 116 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::munmap 117 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fpathconf 118 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::vfork 119 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fchdir 120 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::readv 121 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::writev 122 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::xstat 123 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lxstat 124 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fxstat 125 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::xmknod 126 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setrlimit 128 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getrlimit 129 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lchown 130 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::memcntl 131 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getpmsg 132 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::putpmsg 133 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::rename 134 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::uname 135 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setegid 136 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sysconfig 137 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::adjtime 138 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::systeminfo 139 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sharefs 140 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::seteuid 141 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::forksys 142 () :void)
- #||
- * subcodes:
- * forkx(flags) :: forksys(0, flags)
- * forkallx(flags) :: forksys(1, flags)
- * vforkx(flags) :: forksys(2, flags)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fork1 143 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigtimedwait 144 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_info 145 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::yield 146 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_sema_wait 147 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_sema_post 148 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_sema_trywait 149 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_detach 150 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::corectl 151 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::modctl 152 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fchroot 153 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::utimes 154 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::vhangup 155 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::gettimeofday 156 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getitimer 157 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setitimer 158 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_create 159 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_exit 160 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_suspend 161 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_continue 162 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_kill 163 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_self 164 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_sigmask 165 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_private 166 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_wait 167 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_mutex_wakeup 168 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_mutex_lock 169 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_cond_wait 170 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_cond_signal 171 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_cond_broadcast 172 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pread 173 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pwrite 174 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::llseek 175 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::inst_sync 176 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::brand 177 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::kaio 178 () :void)
- #||
- * subcodes:
- * aioread(...) :: kaio(AIOREAD, ...)
- * aiowrite(...) :: kaio(AIOWRITE, ...)
- * aiowait(...) :: kaio(AIOWAIT, ...)
- * aiocancel(...) :: kaio(AIOCANCEL, ...)
- * aionotify() :: kaio(AIONOTIFY)
- * aioinit() :: kaio(AIOINIT)
- * aiostart() :: kaio(AIOSTART)
- * see
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::cpc 179 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lgrpsys 180 () :void)
- #||
- * subcodes:
- * meminfo(...) :: meminfosys(MIsyscalls::MEMINFO, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::rusagesys 181 (:int :int :address) :int)
- #||
- * subcodes:
- * getrusage(...) :: rusagesys(RUSAGEsyscalls::GETRUSAGE, ...)
- * getvmusage(...) :: rusagesys(RUSAGEsyscalls::GETVMUSAGE, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::port 182 () :void)
- #||
- * subcodes:
- * port_create(...) :: portfs(PORT_CREATE, ...)
- * port_associate(...) :: portfs(PORT_ASSOCIATE, ...)
- * port_dissociate(...) :: portfs(PORT_DISSOCIATE, ...)
- * port_send(...) :: portfs(PORT_SEND, ...)
- * port_sendn(...) :: portfs(PORT_SENDN, ...)
- * port_get(...) :: portfs(PORT_GET, ...)
- * port_getn(...) :: portfs(PORT_GETN, ...)
- * port_alert(...) :: portfs(PORT_ALERT, ...)
- * port_dispatch(...) :: portfs(PORT_DISPATCH, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pollsys 183 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::labelsys 184 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::acl 185 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::auditsys 186 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::processor_bind 187 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::processor_info 188 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::p_online 189 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sigqueue 190 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::clock_gettime 191 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::clock_settime 192 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::clock_getres 193 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::timer_create 194 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::timer_delete 195 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::timer_settime 196 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::timer_gettime 197 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::timer_getoverrun 198 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::nanosleep 199 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::facl 200 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::door 201 () :void)
- #||
- * Door Subcodes:
- * 0 door_create
- * 1 door_revoke
- * 2 door_info
- * 3 door_call
- * 4 door_return
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setreuid 202 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setregid 203 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::install_utrap 204 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::signotify 205 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::schedctl 206 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pset 207 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sparc_utrap_install 208 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::resolvepath 209 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_mutex_timedlock 210 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_sema_timedwait 211 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_rwlock_sys 212 () :void)
- #||
- * subcodes:
- * lwp_rwlock_rdlock(...) :: syscall(212, 0, ...)
- * lwp_rwlock_wrlock(...) :: syscall(212, 1, ...)
- * lwp_rwlock_tryrdlock(...) :: syscall(212, 2, ...)
- * lwp_rwlock_trywrlock(...) :: syscall(212, 3, ...)
- * lwp_rwlock_unlock(...) :: syscall(212, 4, ...)
- ||#
-#|| system calls for large file ( > 2 gigabyte) support ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getdents64 213 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::mmap64 214 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::stat64 215 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lstat64 216 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fstat64 217 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::statvfs64 218 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::fstatvfs64 219 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setrlimit64 220 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getrlimit64 221 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pread64 222 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::pwrite64 223 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::creat64 224 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::open64 225 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::rpcsys 226 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::zone 227 () :void)
- #||
- * subcodes:
- * zone_create(...) :: zone(ZONE_CREATE, ...)
- * zone_destroy(...) :: zone(ZONE_DESTROY, ...)
- * zone_getattr(...) :: zone(ZONE_GETATTR, ...)
- * zone_enter(...) :: zone(ZONE_ENTER, ...)
- * zone_list(...) :: zone(ZONE_LIST, ...)
- * zone_shutdown(...) :: zone(ZONE_SHUTDOWN, ...)
- * zone_lookup(...) :: zone(ZONE_LOOKUP, ...)
- * zone_boot(...) :: zone(ZONE_BOOT, ...)
- * zone_version(...) :: zone(ZONE_VERSION, ...)
- * zone_setattr(...) :: zone(ZONE_SETATTR, ...)
- * zone_add_datalink(...) :: zone(ZONE_ADD_DATALINK, ...)
- * zone_remove_datalink(...) :: zone(ZONE_DEL_DATALINK, ...)
- * zone_check_datalink(...) :: zone(ZONE_CHECK_DATALINK, ...)
- * zone_list_datalink(...) :: zone(ZONE_LIST_DATALINK, ...)
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::autofssys 228 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getcwd 229 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::so_socket 230 (:int :int :int :address :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::so_socketpair 231 (:address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::bind 232 (:int :address :socklen_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::listen 233 (:int :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::accept 234 (:int :address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::connect 235 (:int :address :socklen_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::shutdown 236 (:int :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::recv 237 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::recvfrom 238 (:int :address :size_t :int :address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::recvmsg 239 (:int :address :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::send 240 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sendmsg 241 (:int :address :int) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sendto 242 (:int :address :size_t :int :address :socklen_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getpeername 243 (:int :address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getsockname 244 (:int :address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::getsockopt 245 (:int :int :int :address :address) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::setsockopt 246 (:int :int :int :address :socklen_t) :int)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::sockconfig 247 () :void)
- #||
- * NTP codes
- ||#
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::ntp_gettime 248 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::ntp_adjtime 249 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_mutex_unlock 250 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_mutex_trylock 251 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::lwp_mutex_register 252 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::cladm 253 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::uucopy 254 () :void)
-(define-syscall (logior platform-os-solaris platform-cpu-x86 platform-word-size-64) syscalls::umount2 255 () :void)
diff --git a/lisp-kernel/darwinx8632/Makefile b/lisp-kernel/darwinx8632/Makefile
index d618054ba..67562accc 100644
--- a/lisp-kernel/darwinx8632/Makefile
+++ b/lisp-kernel/darwinx8632/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
SDKROOT=/
OSVERSION=10.6
@@ -42,9 +42,10 @@ ASFLAGS = -arch i386 -g
yosemite_plus := $(shell uname -r | awk -F. '{ if ($$1 >= 14) print "t" }')
ifeq ($(yosemite_plus),t)
ASFLAGS += -Q
+SDKROOT := "$(shell xcrun --show-sdk-path)"
endif
-CDEFINES = -DDARWIN -DX86 -DX8632 -DSVN_REVISION=$(SVN_REVISION) -D_DARWIN_NO_64_BIT_INODE -DUSE_DTRACE
+CDEFINES = -DDARWIN -DX86 -DX8632 -DVC_REVISION=$(VC_REVISION) -D_DARWIN_NO_64_BIT_INODE -DUSE_DTRACE
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
@@ -90,7 +91,7 @@ all: ../../dx86cl
# KSPOBJ=
-OSEARLYLIBS = -lcrt1.o
+OSEARLYLIBS = -L$(SDKROOT)/usr/lib -lcrt1.o
OSLATELIBS = -lSystem
# is this needed?
diff --git a/lisp-kernel/darwinx8664/Makefile b/lisp-kernel/darwinx8664/Makefile
index 10fa4561c..5de009daa 100644
--- a/lisp-kernel/darwinx8664/Makefile
+++ b/lisp-kernel/darwinx8664/Makefile
@@ -13,9 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
-SDKROOT=/
OSVERSION=10.6
MDYNAMIC_NO_PIC = $(shell ($(CC) --help -v 2>&1 | grep -q -e "-mdynamic-no-pic") && /bin/echo "-mdynamic-no-pic")
@@ -24,29 +23,9 @@ MDYNAMIC_NO_PIC = $(shell ($(CC) --help -v 2>&1 | grep -q -e "-mdynamic-no-pic")
VPATH = ..
RM = /bin/rm
CC=cc
-
-### Current ld64 bugs include the claim that 0x1000 isn't a power of 2.
-### Gosh. I always thought that it was. Go know, right ?
-LDFLAGS = -macosx_version_min $(OSVERSION) -arch x86_64 -no_pie \
- -o $@ -e start -pagezero_size 0x11000 -seg1addr 0x00011000
-
AS = as
M4 = gm4
-###
-### DARWIN_GS_HACK enables some awful, dangerous, and slow workarounds
-### for the fact that early versions of x86-64 Darwin don't provide
-### working mechanisms for threads to address thread-local-data
-### relative to a spare segment register. We instead use the
-### undocumented mechanism which the pthreads library uses to
-### keep pthread data in %gs, and switch %gs between pthread data
-### when running foreign code and lisp tcr data when running lisp
-### code. Hopefully, we won't have to do this for very long.
-###
-### (Things like i386_set_ldt() are defined, but not implemented
-### correctly on the libc side and not implemented at all on the
-### Mach kernel side.)
-###
-### Apple never
+
M4FLAGS = -DDARWIN -DX86 -DX8664 -DTCR_IN_GPR
ASFLAGS = -arch x86_64 -g
@@ -65,7 +44,7 @@ ifeq ($(yosemite_plus),t)
ASFLAGS += -Q
endif
-CDEFINES = -DDARWIN -DX86 -DX8664 -DTCR_IN_GPR -DSVN_REVISION=$(SVN_REVISION) \
+CDEFINES = -DDARWIN -DX86 -DX8664 -DTCR_IN_GPR -DVC_REVISION=$(VC_REVISION) \
-D_DARWIN_NO_64_BIT_INODE -DUSE_DTRACE
CDEBUG = -g
COPT = -O
@@ -79,7 +58,7 @@ PLATFORM_H = platform-darwinx8664.h
.c.o:
$(CC) -include ../$(PLATFORM_H) -c $< -arch x86_64 $(CDEFINES) \
$(CDEBUG) $(COPT) $(WFORMAT) $(MDYNAMIC_NO_PIC) \
- -I. -mmacosx-version-min=$(OSVERSION) -isysroot $(SDKROOT) -o $@
+ -I. -mmacosx-version-min=$(OSVERSION) -o $@
SPOBJ = x86-spjump64.o x86-spentry64.o x86-subprims64.o
ASMOBJ = x86-asmutils64.o imports.o
@@ -104,19 +83,10 @@ CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
KSPOBJ= $(SPOBJ)
all: ../../dx86cl64
-
-
-OSEARLYLIBS = -lcrt1.o
-OSLATELIBS = -lSystem
-
-OSMIDDLELIBS =
-
-
-OSLIBS = $(OSEARLYLIBS) $(OSMIDDLELIBS) $(OSLATELIBS)
-
../../dx86cl64: $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile
- $(LD) $(LDFLAGS) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
-
+ cc -mmacosx-version-min=$(OSVERSION) -arch x86_64 \
+ -Wl,-no_pie,-pagezero_size,0x11000,-seg1addr,0x11000 \
+ -o $@ $(SPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
$(SPOBJ): $(SPINC)
$(ASMOBJ): $(SPINC)
diff --git a/lisp-kernel/freebsdx8632/Makefile b/lisp-kernel/freebsdx8632/Makefile
index 22f8bcb35..dd314b609 100644
--- a/lisp-kernel/freebsdx8632/Makefile
+++ b/lisp-kernel/freebsdx8632/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION != svnversion
+VC_REVISION != sh -c "git describe --dirty 2>/dev/null || echo unknown"
VPATH = ..
RM = /bin/rm
@@ -21,7 +21,7 @@ AS = as
M4 = m4
ASFLAGS = --32
M4FLAGS = -DFREEBSD -DX86 -DX8632 -DHAVE_TLS
-CDEFINES = -DFREEBSD -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -DHAVE_TLS -DSVN_REVISION="$(SVN_REVISION)"
+CDEFINES = -DFREEBSD -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -DHAVE_TLS -DVC_REVISION="$(VC_REVISION)"
CDEBUG = -g
COPT = #-O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/freebsdx8664/Makefile b/lisp-kernel/freebsdx8664/Makefile
index dedbbcff4..53de9cbbb 100644
--- a/lisp-kernel/freebsdx8664/Makefile
+++ b/lisp-kernel/freebsdx8664/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION != svnversion
+VC_REVISION != sh -c "git describe --dirty 2>/dev/null || echo unknown"
VPATH = ..
RM = /bin/rm
@@ -21,7 +21,7 @@ AS = as
M4 = m4
ASFLAGS = --64
M4FLAGS = -DFREEBSD -DX86 -DX8664 -DHAVE_TLS
-CDEFINES = -DFREEBSD -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DSVN_REVISION="$(SVN_REVISION)"
+CDEFINES = -DFREEBSD -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DVC_REVISION="$(VC_REVISION)"
CDEBUG = -g
COPT = #-O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/linuxarm/Makefile b/lisp-kernel/linuxarm/Makefile
index 6c4a8a427..1b7c9826f 100644
--- a/lisp-kernel/linuxarm/Makefile
+++ b/lisp-kernel/linuxarm/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
# default float-abi to whatever the toolchain defaults to.
# allow float-abi.mk to override
@@ -26,7 +26,7 @@ AS = as
M4 = m4
ASFLAGS = -mfpu=vfp -march=armv6 $(FLOAT_ABI_OPTION)
M4FLAGS = -DLINUX -DARM
-CDEFINES = -DLINUX -DARM -D_REENTRANT -D_GNU_SOURCE -DSVN_REVISION=$(SVN_REVISION)
+CDEFINES = -DLINUX -DARM -D_REENTRANT -D_GNU_SOURCE -DVC_REVISION=$(VC_REVISION)
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
@@ -89,7 +89,7 @@ OSLIBS = -ldl -lm -lpthread -lrt
../../armcl: $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
- $(CC) $(CDEBUG) -Wl,--export-dynamic $(HASH_STYLE) $(FLOAT_ABI_OPTION) -o $@ -T ./armlinux.x $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
+ $(CC) $(CDEBUG) -Wl,--export-dynamic $(HASH_STYLE) $(FLOAT_ABI_OPTION) -o $@ $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
$(SPOBJ): $(SPINC)
diff --git a/lisp-kernel/linuxarm64/Makefile b/lisp-kernel/linuxarm64/Makefile
index a0dddccb8..eec09a587 100644
--- a/lisp-kernel/linuxarm64/Makefile
+++ b/lisp-kernel/linuxarm64/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
# See
#CROSS=aarch64-linux-gnu-
@@ -24,7 +24,7 @@ CC = ${CROSS}gcc
M4 = m4
ASFLAGS =
M4FLAGS = -DLINUX -DARM64
-CDEFINES = -DLINUX -DARM64 -D_REENTRANT -D_GNU_SOURCE -DUSE_FUTEX -DSVN_REVISION=$(SVN_REVISION)
+CDEFINES = -DLINUX -DARM64 -D_REENTRANT -D_GNU_SOURCE -DUSE_FUTEX -DVC_REVISION=$(VC_REVISION)
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/linuxppc/Makefile b/lisp-kernel/linuxppc/Makefile
index 66877f2ae..1f32b9a47 100644
--- a/lisp-kernel/linuxppc/Makefile
+++ b/lisp-kernel/linuxppc/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ../
RM = /bin/rm
@@ -23,7 +23,7 @@ AS = as
M4 = m4
ASFLAGS = -mregnames -mppc32 -maltivec
M4FLAGS = -DLINUX -DPPC
-CDEFINES = -DLINUX -DPPC -D_REENTRANT -D_GNU_SOURCE -DSVN_REVISION=$(SVN_REVISION)
+CDEFINES = -DLINUX -DPPC -D_REENTRANT -D_GNU_SOURCE -DVC_REVISION=$(VC_REVISION)
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/linuxppc64/Makefile b/lisp-kernel/linuxppc64/Makefile
index 55d9d75df..4428c0548 100644
--- a/lisp-kernel/linuxppc64/Makefile
+++ b/lisp-kernel/linuxppc64/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ../
RM = /bin/rm
@@ -23,7 +23,7 @@ AS = as
M4 = m4
ASFLAGS = -mregnames -mppc64 -a64 -maltivec
M4FLAGS = -DLINUX -DPPC -DPPC64
-CDEFINES = -DLINUX -D_REENTRANT -DPPC -DPPC64 -D_GNU_SOURCE -DSVN_REVISION=$(SVN_REVISION)
+CDEFINES = -DLINUX -D_REENTRANT -DPPC -DPPC64 -D_GNU_SOURCE -DVC_REVISION=$(VC_REVISION)
CDEBUG = -g
COPT = -O2
# word size issues are a little more relevant on a 64-bit platform
diff --git a/lisp-kernel/linuxx8632/Makefile b/lisp-kernel/linuxx8632/Makefile
index f99982827..6aae78511 100644
--- a/lisp-kernel/linuxx8632/Makefile
+++ b/lisp-kernel/linuxx8632/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ../
RM = /bin/rm
@@ -21,7 +21,7 @@ AS = as
M4 = m4
ASFLAGS = --32
M4FLAGS = -DLINUX -DX86 -DX8632 -DHAVE_TLS
-CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -DHAVE_TLS -DSVN_REVISION=$(SVN_REVISION) # -DGC_INTEGRITY_CHECKING -DDISABLE_EGC
+CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -DHAVE_TLS -DVC_REVISION=$(VC_REVISION) # -DGC_INTEGRITY_CHECKING -DDISABLE_EGC
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/linuxx8664/Makefile b/lisp-kernel/linuxx8664/Makefile
index 00a012588..d6768f793 100644
--- a/lisp-kernel/linuxx8664/Makefile
+++ b/lisp-kernel/linuxx8664/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ../
RM = /bin/rm
@@ -21,7 +21,7 @@ AS = as
M4 = m4
ASFLAGS = --64
M4FLAGS = -DLINUX -DX86 -DX8664 -DHAVE_TLS
-CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DSVN_REVISION=$(SVN_REVISION) #-DDISABLE_EGC -DUSE_FUTEX
+CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DVC_REVISION=$(VC_REVISION) #-DDISABLE_EGC -DUSE_FUTEX
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/lisp-debug.c b/lisp-kernel/lisp-debug.c
index db18d3102..ddc74f889 100644
--- a/lisp-kernel/lisp-debug.c
+++ b/lisp-kernel/lisp-debug.c
@@ -45,14 +45,14 @@ typedef enum {
debug_kill
} debug_command_return;
-#ifdef SVN_REVISION
+#ifdef VC_REVISION
#define xstr(s) str(s)
#define str(s) #s
-char *kernel_svn_revision = xstr(SVN_REVISION);
+char *kernel_vc_revision = xstr(VC_REVISION);
#undef xstr
#undef str
#else
-char *kernel_svn_revision = "unknown";
+char *kernel_vc_revision = "unknown";
#endif
#ifdef ARM
@@ -208,6 +208,7 @@ foreign_name_and_offset(natural addr, int *delta)
#if defined(LINUX) || defined(SOLARIS)
+#include
#define fpurge __fpurge
#endif
@@ -945,7 +946,7 @@ debug_show_lisp_version(ExceptionInformation *xp, siginfo_t *info, int arg)
{
extern void *plsym(ExceptionInformation *,char*);
- fprintf(dbgout, "Lisp kernel svn revision: %s\n", kernel_svn_revision);
+ fprintf(dbgout, "Lisp kernel vc revision: %s\n", kernel_vc_revision);
if (xp)
plsym(xp, "*OPENMCL-VERSION*");
return debug_continue;
diff --git a/lisp-kernel/platform-linuxx8632.h b/lisp-kernel/platform-linuxx8632.h
index 4b8902fa9..e74ea6a24 100644
--- a/lisp-kernel/platform-linuxx8632.h
+++ b/lisp-kernel/platform-linuxx8632.h
@@ -19,7 +19,9 @@
#define PLATFORM_CPU PLATFORM_CPU_X86
#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
-typedef struct ucontext ExceptionInformation;
+#include
+
+typedef ucontext_t ExceptionInformation;
#define MAXIMUM_MAPPABLE_MEMORY (9U<<28)
#define IMAGE_BASE_ADDRESS 0x10000000
diff --git a/lisp-kernel/platform-linuxx8664.h b/lisp-kernel/platform-linuxx8664.h
index 5cca2c967..aba8bffb8 100644
--- a/lisp-kernel/platform-linuxx8664.h
+++ b/lisp-kernel/platform-linuxx8664.h
@@ -19,7 +19,9 @@
#define PLATFORM_CPU PLATFORM_CPU_X86
#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
-typedef struct ucontext ExceptionInformation;
+#include
+
+typedef ucontext_t ExceptionInformation;
#define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
#define IMAGE_BASE_ADDRESS 0x300000000000L
diff --git a/lisp-kernel/platform-solarisx86.h b/lisp-kernel/platform-solarisx86.h
index 2d1dcb310..8fa19036c 100644
--- a/lisp-kernel/platform-solarisx86.h
+++ b/lisp-kernel/platform-solarisx86.h
@@ -19,6 +19,8 @@
#define PLATFORM_CPU PLATFORM_CPU_X86
#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
+#include
+#include
typedef struct ucontext ExceptionInformation;
#define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
diff --git a/lisp-kernel/pmcl-kernel.c b/lisp-kernel/pmcl-kernel.c
index 5b7110749..cc0b73683 100644
--- a/lisp-kernel/pmcl-kernel.c
+++ b/lisp-kernel/pmcl-kernel.c
@@ -1716,6 +1716,12 @@ ensure_gs_available(char *progname)
{
LispObj fs_addr = 0L, gs_addr = 0L, cur_thread = (LispObj)pthread_self();
char *gnu_get_libc_version(void);
+ /*
+ * According arch_prctl(2), there's no function prototype for
+ * arch_prctl(). Thus, we have to declare it ourselves.
+ * Note that addr is unsigned long * for GET operations.
+ */
+ extern int arch_prctl(int code, unsigned long *addr);
arch_prctl(ARCH_GET_GS, &gs_addr);
arch_prctl(ARCH_GET_FS, &fs_addr);
@@ -1917,7 +1923,7 @@ main
}
#endif
#endif
-#ifdef WINDOXS
+#ifdef WINDOWS
real_executable_name = determine_executable_name();
#else
real_executable_name = determine_executable_name(argv[0]);
diff --git a/lisp-kernel/solarisx64/Makefile b/lisp-kernel/solarisx64/Makefile
index 858ad7de5..68ee62954 100644
--- a/lisp-kernel/solarisx64/Makefile
+++ b/lisp-kernel/solarisx64/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ..
RM = /bin/rm
@@ -26,7 +26,7 @@ M4 = gm4
CC = gcc
ASFLAGS = --64 --divide
M4FLAGS = -DSOLARIS -DX86 -DX8664
-CDEFINES = -DSOLARIS -D_REENTRANT -DX86 -DX8664 -D__EXTENSIONS__ -DHAVE_TLS -DSVN_REVISION=$(SVN_REVISION) #-DDISABLE_EGC
+CDEFINES = -DSOLARIS -D_REENTRANT -DX86 -DX8664 -D__EXTENSIONS__ -DHAVE_TLS -DVC_REVISION=$(VC_REVISION) #-DDISABLE_EGC
CDEBUG = -g
COPT = #-O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/solarisx86/Makefile b/lisp-kernel/solarisx86/Makefile
index 9153271ac..0596add3b 100644
--- a/lisp-kernel/solarisx86/Makefile
+++ b/lisp-kernel/solarisx86/Makefile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ..
RM = /bin/rm
@@ -26,7 +26,7 @@ M4 = gm4
CC = gcc
ASFLAGS = --32 --divide
M4FLAGS = -DSOLARIS -DX86 -DX8632
-CDEFINES = -DSOLARIS -D_REENTRANT -DX86 -DX8632 -D__EXTENSIONS__ -DHAVE_TLS -DSVN_REVISION=$(SVN_REVISION) #-DDISABLE_EGC
+CDEFINES = -DSOLARIS -D_REENTRANT -DX86 -DX8632 -D__EXTENSIONS__ -DHAVE_TLS -DVC_REVISION=$(VC_REVISION) #-DDISABLE_EGC
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/thread_manager.c b/lisp-kernel/thread_manager.c
index 7806bbbb5..abcfb80fc 100644
--- a/lisp-kernel/thread_manager.c
+++ b/lisp-kernel/thread_manager.c
@@ -598,7 +598,7 @@ suspend_resume_handler(int signo, siginfo_t *info, ExceptionInformation *context
*(--tcr->save_vsp) = lisp_nil;
register_thread_tcr(tcr);
}
- if (TCR_INTERRUPT_LEVEL(tcr) <= (-2<suspend_context = context;
@@ -866,6 +866,13 @@ setup_tcr_extra_segment(TCR *tcr)
amd64_set_gsbase(tcr);
#endif
#ifdef LINUX
+ /*
+ * According arch_prctl(2), there's no function prototype for
+ * arch_prctl(). Thus, we have to declare it ourselves.
+ * Note that addr is unsigned long for SET operations.
+ */
+ extern int arch_prctl(int code, unsigned long addr);
+
arch_prctl(ARCH_SET_GS, (natural)tcr);
#endif
#ifdef DARWIN
@@ -1328,7 +1335,7 @@ new_tcr(natural vstack_size, natural tstack_size)
for (i = 0; i < 2048; i++) {
tcr->tlb_pointer[i] = (LispObj) no_thread_local_binding_marker;
}
- TCR_INTERRUPT_LEVEL(tcr) = (LispObj) (-1<shutdown_count = PTHREAD_DESTRUCTOR_ITERATIONS;
#else
diff --git a/lisp-kernel/win32/Makefile b/lisp-kernel/win32/Makefile
index 823f936be..4816485e3 100644
--- a/lisp-kernel/win32/Makefile
+++ b/lisp-kernel/win32/Makefile
@@ -14,8 +14,9 @@
# limitations under the License.
# This makefile is written to be used with the mingw toolchain
-# running in the Cygwin environment.
-#
+# running in the Cygwin environment or Msys2 environment.
+
+# If running in the Cygwin environment:
# Install the following Cygwin packages:
# * make
# * m4
@@ -27,17 +28,38 @@
#
# Accept the dependencies the installation tool may add.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+# If running in the Msys2 environment:
+# Install the following Msys2 packages using pacman -S:
+# * make
+# * m4
+# * mingw-w64-i686-binutils
+# * mingw-w64-i686-crt
+# * mingw-w64-i686-gcc
+# * mingw-w64-i686-headers
+# * mingw-w64-i686-winpthreads
+# Accept the dependencies the installation tool may add.
+# Currently only install make, m4 and mingw-w64-i686-gcc will install other
+# mingw-w64-* dependencies. May change in the future.
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ../
RM = rm
+
+ifeq ($(MSYSTEM),)
CC = i686-w64-mingw32-gcc
AS = i686-w64-mingw32-as
-M4 = m4
LD = i686-w64-mingw32-ld
+else
+CC = /mingw32/bin/i686-w64-mingw32-gcc
+AS = /mingw32/bin/as
+LD = /mingw32/bin/ld
+endif
+
+M4 = m4
+
ASFLAGS = -g --32
M4FLAGS = -DWIN_32 -DWINDOWS -DX86 -DX8632
-CDEFINES = -DWIN_32 -DWINDOWS -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -D__MSVCRT__ -D__MSVCRT_VERSION__=0x700 -D_WIN32_WINNT=0x0502 -DSVN_REVISION=$(SVN_REVISION)
+CDEFINES = -DWIN_32 -DWINDOWS -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -D__MSVCRT__ -D__MSVCRT_VERSION__=0x700 -D_WIN32_WINNT=0x0502 -DVC_REVISION=$(VC_REVISION)
CDEBUG = -g
COPT = -O
# Once in a while, -Wformat says something useful. The odds are against that,
diff --git a/lisp-kernel/win64/Makefile b/lisp-kernel/win64/Makefile
index 084525eab..1cd97ac05 100644
--- a/lisp-kernel/win64/Makefile
+++ b/lisp-kernel/win64/Makefile
@@ -14,8 +14,9 @@
# limitations under the License.
# This makefile is written to be used with the mingw toolchain
-# running in the Cygwin environment.
-#
+# running in the Cygwin environment or Msys2 environment.
+
+# If running in the Cygwin environment:
# Install the following Cygwin packages:
# * make
# * m4
@@ -27,19 +28,41 @@
#
# Accept the dependencies the installation tool may add.
-SVN_REVISION := "$(shell svnversion || echo unknown)"
+# If running in the Msys2 environment:
+# Install the following Msys2 packages using pacman -S:
+# * make
+# * m4
+# * mingw-w64-x86_64-binutils
+# * mingw-w64-x86_64-crt
+# * mingw-w64-x86_64-gcc
+# * mingw-w64-x86_64-headers
+# * mingw-w64-x86_64-winpthreads
+# Accept the dependencies the installation tool may add.
+# Currently only install make, m4 and mingw-w64-x86_64-gcc will install other
+# mingw-w64-* dependencies. May change in the future.
+# Running make using msys2-installation-directory/mingw64.exe, not msys2.exe.
+VC_REVISION := "$(shell git describe --dirty 2>/dev/null || echo unknown)"
VPATH = ../
RM = rm
# gcc64, as64: until there's a real win64 gcc, assume that gcc and gas
# are installed under these names
+
+ifeq ($(MSYSTEM),)
CC = x86_64-w64-mingw32-gcc
AS = x86_64-w64-mingw32-as
-M4 = m4
LD = x86_64-w64-mingw32-ld
+else
+CC = /mingw64/bin/x86_64-w64-mingw32-gcc
+AS = /mingw64/bin/as
+LD = /mingw64/bin/ld
+endif
+
+M4 = m4
+
ASFLAGS = -g --64
M4FLAGS = -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR
-CDEFINES = -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION=$(SVN_REVISION)
+CDEFINES = -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DVC_REVISION=$(VC_REVISION)
CDEBUG = -g
COPT = -O2
# Once in a while, -Wformat says something useful. The odds are against that,
@@ -97,7 +120,7 @@ KSPOBJ = $(SPOBJ)
all: ../../wx86cl64.exe
-OSLIBS = -lpsapi -lws2_32
+OSLIBS = -lpsapi -lws2_32 -static -lpthread
../../wx86cl64.exe: $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile pei-x86-64.x
diff --git a/lisp-kernel/x86-exceptions.c b/lisp-kernel/x86-exceptions.c
index fa59af764..3ccc2f989 100644
--- a/lisp-kernel/x86-exceptions.c
+++ b/lisp-kernel/x86-exceptions.c
@@ -1677,7 +1677,7 @@ struct rt_sigframe {
siginfo_t *pinfo;
void *puc;
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
struct _fpstate fpstate;
char retcode[8];
};
@@ -2425,7 +2425,7 @@ setup_sigaltstack(area *a)
It's easier to just reserve that page here than it would be to
change copy_ucontext().
*/
- stack.ss_size -= sizeof(struct ucontext);
+ stack.ss_size -= sizeof(ucontext_t);
#endif
if (sigaltstack(&stack, NULL) != 0) {
perror("sigaltstack");
diff --git a/lisp-kernel/x86-spentry32.s b/lisp-kernel/x86-spentry32.s
index df2336170..63d807e94 100644
--- a/lisp-kernel/x86-spentry32.s
+++ b/lisp-kernel/x86-spentry32.s
@@ -4826,9 +4826,9 @@ _spentry(aref3)
__(movl arrayH.data_vector(%arg_y),%arg_y)
__(extract_subtag(%arg_y,%imm0_b))
__(cmpb $subtag_vectorH,%imm0_b)
- __(je 6b)
+ __(je 8b)
__(cmpb $subtag_arrayH,%imm0_b)
- __(je 6b)
+ __(je 8b)
__(jmp C(misc_ref_common))
0: __(uuo_error_reg_not_fixnum(Rtemp0))
1: __(uuo_error_reg_not_fixnum(Rarg_y))
@@ -4868,7 +4868,7 @@ _spentry(aset2)
__(cmpb $subtag_arrayH,%imm0_b)
__(je 6b)
__(jmp C(misc_set_common))
-w0: __(uuo_error_reg_not_fixnum(Rtemp0))
+0: __(uuo_error_reg_not_fixnum(Rtemp0))
1: __(uuo_error_reg_not_fixnum(Rarg_y))
2: __(uuo_error_reg_not_type(Rtemp1,error_object_not_array_2d))
3: __(uuo_error_array_bounds(Rtemp0,Rtemp1))
@@ -4911,11 +4911,9 @@ _spentry(aset3)
__(movl arrayH.data_vector(%temp0),%temp0)
__(extract_subtag(%temp0,%imm0_b))
__(cmpb $subtag_vectorH,%imm0_b)
- __(je 6b)
- __(cmpb $subtag_vectorH,%imm0_b)
- __(je 6b)
+ __(je 8b)
__(cmpb $subtag_arrayH,%imm0_b)
- __(je 6b)
+ __(je 8b)
__(jmp C(misc_set_common))
0: __(pop %temp0) /* supplied i */
__(uuo_error_reg_not_fixnum(Rtemp0))
diff --git a/lisp-kernel/x86-spentry64.s b/lisp-kernel/x86-spentry64.s
index ff041fab0..bf8c1637b 100644
--- a/lisp-kernel/x86-spentry64.s
+++ b/lisp-kernel/x86-spentry64.s
@@ -4004,14 +4004,14 @@ _spentry(builtin_length)
__(movq %arg_z,%temp0) /* fast pointer */
__(movq %arg_z,%temp1) /* slow pointer */
3: __(extract_lisptag(%temp0,%imm0))
- __(compare_reg_to_nil(%temp0))
__(leaq fixnumone(%imm2),%imm2)
+ __(compare_reg_to_nil(%temp0))
__(je 9f)
__(cmpb $tag_list,%imm0_b)
__(jne 8f)
__(extract_lisptag(%temp1,%imm1))
- __(testb $fixnumone,%imm2_b)
__(_cdr(%temp0,%temp0))
+ __(testb $fixnumone,%imm2_b)
__(je 3b)
__(cmpb $tag_list,%imm1_b)
__(jne 8f)
diff --git a/xdump/xfasload.lisp b/xdump/xfasload.lisp
index 6adef7098..c7b4e39b0 100644
--- a/xdump/xfasload.lisp
+++ b/xdump/xfasload.lisp
@@ -1122,12 +1122,11 @@
(xload-save-list (mapcar #'xload-save-list *xload-early-class-cells*)))
(setf (xload-symbol-value (xload-copy-symbol '*istruct-cells*))
*xload-early-istruct-cells*)
- (let* ((svnrev (local-svn-revision))
- (tree (svn-tree)))
+ (let ((rev (local-vc-revision)))
(setf (xload-symbol-value (xload-copy-symbol '*openmcl-svn-revision*))
- (typecase svnrev
- (fixnum (ash svnrev *xload-target-fixnumshift*))
- (string (xload-save-string (if tree (format nil "~a-~a" svnrev tree) svnrev)))
+ (typecase rev
+ (fixnum (ash rev *xload-target-fixnumshift*))
+ (string (xload-save-string rev))
(t *xload-target-nil*))))
(let* ((experimental-features *build-time-optional-features*))
(setf (xload-symbol-value (xload-copy-symbol '*optional-features*))