cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/20/20:15:39

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
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

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;
    }


- Raw text -


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