Paolo Amoroso <firstname.lastname@example.org> wrote:
| Erik Naggum <email@example.com> wrote:
| > The crucial element appears to be whether you compile with exported
| > syscalls or not. ...
| The relevant CLISP configure options should be:
| --with-export-syscalls --with-module=bindings/linuxlibc6
| Since I don't have the configure help handy, I don't remember whether both
| of them are required, or just the former. The function for getting a
| process pid is then accessible as `LINUX:getpid'.
Guys, this is all very well and good if one wants *all* the syscalls
in that package to be accessible with their Unix names, but in the case
of the original poster's question the following might be a lot simpler:
#+clisp (setf (symbol-function 'getpid) ; in the using package
[I apologize if this isn't the "proper" way to do that, but after a
half-hour of wandering around in the PACKAGE & SYMBOL dictionaries
in the CLHS looking for "RENAMING-IMPORT" or equiv., I gave up and
went with the brute-force approach.]
Or perhaps even:
#+clisp (defun getpid () (system::program-id))
Since one never needs to call it more than *once* per process,
the overhead of the extra subroutine won't matter.
What am I missing here?
Rob Warnock, PP-ASEL-IA <firstname.lastname@example.org>
627 26th Avenue <URL:http://www.rpw3.org/>
San Mateo, CA 94403 (650)572-2607