/* mkdir: make a new directory * written by Eric R. Smith and placed in the public domain */ #include #include #include #include "lib.h" extern int errno; extern int __mint; int mkdir(_path, mode) const char *_path; unsigned mode; { int rv; char path[PATH_MAX]; _unx2dos(_path, path); rv = Dcreate(path); if (rv < 0) { errno = -rv; return -1; } if (__mint >= 9) { (void)Fchmod(path, mode); } return 0; }