www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/01/30/20:00:23

Date: Mon, 30 Jan 1995 16:14:38 -0500
From: davis AT amy DOT tch DOT harvard DOT edu ("John E. Davis")
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: `access still buggy

Hi,

   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:

-------------------------------------------------------------------------
#include <stdio.h>
#include <unistd.h>

int main(int argc, char **argv) 
{
   if (argc > 1)
     {
	char name[512];
	sprintf (name, "%s", argv[1] );
	if (!access(name, F_OK) && access(name, W_OK))
	  printf("readonly\n");
        else
	  printf("not readonly\n");
     }
   return 0;
}
---------------------------------------------------------------------------
Here is my config.sys:
DEVICE=C:\DOS\SETVER.EXE
DEVICE=C:\WINDOWS\HIMEM.SYS
rem DEVICE=C:\dos\emm386.exe frame=none
DOS=HIGH
FILES=30
BUFFERS=30
DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER
STACKS=9,256
device=c:\bcc\bin\tdh386.sys -e2000
----------------------------------------------------------------------------
The system is a DECpc 486d2 MTE, EISA bus machine with a SCSI harddisk.

--John

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019