X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Frmdir.c;h=2a92803db7e60c14f01b6cd4567657ca746d465d;hb=488cf84c63fbbffa44143d0ebf56e5a6c26d4383;hp=fac5d44b5a315be335ebfe36137ec75d9189619d;hpb=6d8337bfc808cddc275899c03482eceb6aff8547;p=gnulib.git diff --git a/lib/rmdir.c b/lib/rmdir.c index fac5d44b5..2a92803db 100644 --- a/lib/rmdir.c +++ b/lib/rmdir.c @@ -1,4 +1,4 @@ -/* rmdir.c -- BSD compatible remove directory function for System V +/* BSD compatible remove directory function for System V Copyright (C) 1988, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -15,8 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H -#include +#if HAVE_CONFIG_H +# include #endif #include @@ -27,12 +27,12 @@ extern int errno; #endif -#ifdef STAT_MACROS_BROKEN -#undef S_ISDIR +#if STAT_MACROS_BROKEN +# undef S_ISDIR #endif #if !defined(S_ISDIR) && defined(S_IFDIR) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif /* rmdir adapted from GNU tar. */ @@ -44,7 +44,8 @@ int rmdir (dpath) char *dpath; { - int cpid, status; + pid_t cpid; + int status; struct stat statbuf; if (stat (dpath, &statbuf) != 0) @@ -73,7 +74,7 @@ rmdir (dpath) while (wait (&status) != cpid) /* Do nothing. */ ; - if (status & 0xFFFF) + if (status) { /* /bin/rmdir failed. */