From: Marc Singer Subject: mkdir return value EACCESS... To: nbn.nbn.com!sapien!sun.soe.clarkson.edu!djgpp (DJGPP List Alias) Date: Fri, 15 Sep 1995 14:49:42 -0700 (PDT) Is this the correct return value when trying to create a directory that exists? Linux returns EEXIST while DJGPP returns EACCESS. I notice that DOS returns permission denied, too. Is this a limitation of the error codes that DOS returns from system calls? I wrote a simple little test routine to check this: ------------------------------------------------------------------------ #include /* Comment this out for a DOS compiler */ #include #include #include main () { char sz[80]; int result; printf ("Directory to create:"); scanf ("%s", sz); printf ("errno before %d (%s)\n", errno, sys_errlist [errno]); result = mkdir (sz, 0777); printf ("errno after %d (%s) with %d return\n", errno, sys_errlist [errno], result); exit (0); } ------------------------------------------------------------------------