From: Eric Blake Date: Wed, 16 Sep 2009 14:27:07 +0000 (-0600) Subject: rm, rmdir: improve cross-compilation support X-Git-Tag: v8.0~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2bad8c0deaf43743537a20fcdf7702d610fbe71d;p=thirdparty%2Fcoreutils.git rm, rmdir: improve cross-compilation support * bootstrap.conf (gnulib_modules): Drop rmdir-errno. * src/rmdir.c (errno_rmdir_non_empty): Check both cases allowed by POSIX, rather than relying on configure-time check that might fail during cross-compilation. Reverts commit 9b6eb98d41. --- diff --git a/bootstrap.conf b/bootstrap.conf index 9cdfb79d6c..fb5ed15840 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -179,7 +179,6 @@ gnulib_modules=" regex rename-dest-slash rmdir - rmdir-errno root-dev-ino rpmatch safe-read diff --git a/src/rmdir.c b/src/rmdir.c index 3bfff22d45..826cebcfa4 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -74,7 +74,7 @@ static struct option const longopts[] = static bool errno_rmdir_non_empty (int error_number) { - return (error_number == RMDIR_ERRNO_NOT_EMPTY); + return error_number == ENOTEMPTY || error_number == EEXIST; } /* Return true if when rmdir fails with errno == ERROR_NUMBER