BUG: configure.ac in kpathsea
Karl Berry
karl at freefriends.org
Tue Jun 16 00:22:36 CEST 2020
I wonder, why getcwd() shouldn't use fork() or vfork(),
In the days of more limited memory, it was quite plausible for fork() to
cause ENOMEM, and getcwd was commonly implemented as, essentially,
`pwd`.
Nowadays, I doubt either of those obtain often, if ever, but the test
remains ...
but for this test to work correctly, you have to insert
#include <stdlib> in the test program not to fail because fork()
is not defined.
As far as I can see, fork() is defined in the test program, so I don't
understand this. The program should look essentially like this:
int fork() { exit(1); }
int vfork() { exit(1); }
extern char *getcwd();
char path[100];
int main() { getcwd(path,100); return 0; }
If you look at config.log, the exact source of the program being
compiled, and the error messages, should be present. Can you send that
to me?
Looking at that now, it seems to me that 100 bytes is not nearly enough
to return the cwd, but that shouldn't result in the error "fork is not
defined".
Adding an #include would cause yet more problems, it seems to me,
because the system include files are likely to make all kinds of crazy
#defines with the basic system functions, causing the redefinitions here
to fail. --thanks for the report, karl.
More information about the tex-live
mailing list.