From: Martin Str|mberg Message-Id: <199803210114.CAA14889@sister.ludd.luth.se> Subject: Re: mkdir and errno To: dj AT delorie DOT com Date: Sat, 21 Mar 1998 02:14:25 +0100 (MET) Cc: djgpp-workers AT delorie DOT com Reply-To: martin DOT stromberg AT lu DOT erisoft DOT se MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk Here is a patch to restore errno after the call to access(). Right, MartinS *** libc/posix/sys/stat/mkdir.c.org Sat Mar 21 02:02:35 1998 --- libc/posix/sys/stat/mkdir.c Sat Mar 21 02:06:20 1998 *************** *** 33,38 **** --- 33,40 ---- we should return EEXIST - DJ */ if (access(dirname, D_OK) == 0) errno = EEXIST; + /* Restore errno. */ + errno = EACCES; } return -1; }