Joerg Hoehle <hoehle@users.sourceforge.net> wrote:
+---------------
| RC <otqocrkwvv@pvoalfotpmezsaq.net> writes:
| > I also found that if you build CLISP with
| > --with-module=bindings/glibc
| > then you get the function (unix:getpid) included
| > but it's only working under linux. With Freebsd
| > you get errors about bits/errno.h not being found.
|
| Is FreeBSD a glibc based-system?
+---------------
No, or at least not by default. The BSD libc predates glibc by some years.
There are versions of glibc used in the Linux compatibility libraries
[since FreeBSD supports running (most) precompiled Linux applications],
and there may be some projects to get glibc on BSD "natively" [e.g., see
http://lists.freebsd.org/pipermail/freebsd-ports/2005-January/019839.html
and http://lists.freebsd.org/pipermail/freebsd-ports/2005-January/019844.html].
+---------------
| Could you please investigate where errno and its values are defined?
+---------------
On a stock FreeBSD-4.10 they're in "/usr/include/errno.h" [there
is no such file as <bits/errno.h>], and "errno" is defined as a
C macro that calls the procedure "__error()". As it says in the
"errno(2)" man page:
The __error() function returns a pointer to a field in the
thread specific structure for threads other than the initial
thread. For the initial thread and non-threaded processes,
__error() returns a pointer to a global errno variable that
is compatible with the previous definition.
Does that help?
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607