To: davis AT amy DOT tch DOT harvard DOT edu ("John E. Davis") Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: `access still buggy Date: Tue, 31 Jan 95 08:57:59 +0200 From: "Eli Zaretskii" > 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.