[plt-scheme] Where to find out that library objects like "chmod" are available in the underlying implementation?
On Fri, Oct 3, 2008 at 4:42 PM, Ernie Smith <esmith at acanac.net> wrote:
> Many reasonable inferences can be made, but one would find comfort in
> finding an assertion
> like the above somewhere in the documentation with or without caveats.
You can't in general make many useful statements, as PLT can be
compiled with or without many libraries (e.g. OpenGL, Cairo, etc...
the options specified in the configure script). However you can
almost surely rely on libc being linked in on Unix systems. I believe
you can call the OS directly from assembler, but this is the only way
I know to get around using libc, and it certainly isn't a time
effective way to develop. It's called the standard library for a
reason... any reasonable program that does an kind of system call
(e.g. IO, threads, date/time, memory allocation, etc.) is going to
link to it.
If you don't like that assurance you can always load a copy of libc directly:
> (require scheme/foreign)
> (unsafe!)
> (ffi-lib "libc")
#<ffi-lib>
and away you go.
HTH,
N.