cvs.delorie.com/djgpp/bugs/show.cgi | search |
Library functions like execvp() don't function correctly. The symptom is usually that they don't find the executable (although it's on the PATH), or fail with mysterious message like ``: cannot open''. If you call spawnvp(P_OVERLAY, ...) instead, everything works.
The problem is that those functions declare environ thusly: extern *const environ[]; while the original declaration (on crt1.c) is: extern ** environ; This mismatch causes exec* functions to emit incorrect code when they and their callees access environ. To correct the problem, I changed the declaration to this: extern *const *environ; which fixed the bug.
webmaster | delorie software privacy |
Copyright © 2010 by DJ Delorie | Updated Jul 2010 |