I'm experimenting with alien objects to get my lisp app to use the unix native fcntl function for file locking.
Following the example in "Advanced Programming in the UNIX Environment" book (http://apuebook.com/), I've built the lockfile.o object file. Its function call is: int lockfile(int fd) where fd is the integer representation of the file, as the unix os knows it. Inside my lisp code, I'm able load the object file by calling (ext:load-foreign "lockfile.o") and I'm all set to invoke the lockfile function with the (def-alien-routine) macro. But now, I need to pass it an integer (fd) which represents the unix file descriptor. All I have, though, is the lisp pathname object. Is there a way to convert pathname to the correct integer value? I looked at all the pathname related functions in the hyperspec, but there doesn't seem to be anything there that can do this.
