X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmkdir.c;h=5ca5af6964e0e726cb381a66a93d1b79047881fd;hb=0bb0c42bbc23b604ec21f3f9e30363eb17fdc484;hp=95fb1a6d40e383a799af444057b629118e856d15;hpb=974c1be5ddd0807bca0dcfd4bdf023213d99a2ba;p=gnulib.git diff --git a/lib/mkdir.c b/lib/mkdir.c index 95fb1a6d4..5ca5af696 100644 --- a/lib/mkdir.c +++ b/lib/mkdir.c @@ -1,5 +1,5 @@ /* 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 @@ -48,11 +48,10 @@ extern int errno; 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) @@ -86,7 +85,7 @@ mkdir (dpath, dmode) while (wait (&status) != cpid) /* Do nothing. */ ; - if (status & 0xFFFF) + if (status) { /* /bin/mkdir failed. */ errno = EIO;