/* BSD compatible make directory function for System V
- Copyright (C) 1988, 1990 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1990, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
subroutine didn't return EEXIST. It does now. */
int
-mkdir (dpath, dmode)
- char *dpath;
- int dmode;
+mkdir (const char *dpath, int dmode)
{
- int cpid, status;
+ pid_t cpid;
+ int status;
struct stat statbuf;
if (stat (dpath, &statbuf) == 0)
while (wait (&status) != cpid)
/* Do nothing. */ ;
- if (status & 0xFFFF)
+ if (status)
{
/* /bin/mkdir failed. */
errno = EIO;