Why can (could) linux.lisp contain a reference to _IO_stdin_ and I see =
no warning during build, while my simple test program cannot?
I once wrote (in clisp-list):
Yet there's no _IO_stderr_ in /usr/include...
There's only _IO_stderr (no trailing underscore) in libio.h
>yet linux.c was compilable, and linkable.
While a naive .c file complains:
tmp> gcc -O -Wall -lm stdin.c
stdin.c: In function `main':
stdin.c:28: `_IO_stdin_' undeclared (first use in this function)
stdin.c:28: (Each undeclared identifier is reported only once
stdin.c:28: for each function it appears in.)
BTW, libio.h only mentions _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
There's no way I'm going to reference that in linux.lisp!
Anyway, def-c-var is not the right thing for stdin/stdout/stderr.
You need a location holding something for def-c-var, while stdin may =
not be such a place. That's also the difference between a true global =
int errno and a macro definition for errno.
for C programmers, this doesn't matter, but CLISP's FFI wants &errno, =
&stdin, &of-def-c-var: this may not be defined!
Thanks for your help,