Mail Archives: djgpp/1995/01/31/07:00:11
> I have installed all 3 of the dj112m?.zip patches for djgpp. I did
> everything in order the way the documentation says. Still, `access' causes
> my machine to crash. In fact, the following program reboots my machine:
access() has a bug in that it doesn't zero-out the FLAGS
field of the structure it passes to DPMI call. You can
correct this. Find this fragment in access.c:
int access(const char *fn, int flags)
{
_go32_dpmi_registers r;
r.x.ss = r.x.sp = 0;
and add this line:
r.x.flags = 0;
Recompile access.c, put it into the libc.a library and relink
your program; it should work OK now.
Unfortunately, access() is also called extensively by GCC.EXE
which causes it to crash under certain system configurations.
But if you can compile at all, you're lucky to not be one of
the victims of this.
- Raw text -