Author: sthibault Date: 2010-04-04 16:42:08 +0000 (Sun, 04 Apr 2010) New Revision: 4235
Added: glibc-package/trunk/debian/patches/any/cvs-remove.diff Removed: glibc-package/trunk/debian/patches/any/submitted-remove.diff Modified: glibc-package/trunk/debian/changelog glibc-package/trunk/debian/patches/series Log: patches/any/submitted-remove.diff: replace with cvs-remove.diff, from upstream Modified: glibc-package/trunk/debian/changelog =================================================================== --- glibc-package/trunk/debian/changelog 2010-03-29 13:36:49 UTC (rev 4234) +++ glibc-package/trunk/debian/changelog 2010-04-04 16:42:08 UTC (rev 4235) @@ -3,11 +3,11 @@ [ Samuel Thibault ] * patches/hurd-i386/local-pthread.diff: Refresh patch. * Update debian/testsuite-checking/expected-results-i486-gnu-libc. - * patches/any/submitted-remove.diff: New patch to fix remove() on - directory on non-Linux ports. * patches/hurd-i386/cvs-setsid.diff: Update to git version. * patches/hurd-i386/local-locarchive.diff: New patch to fix installation of locales-all. + * patches/hurd-i386/cvs-remove.diff: New upstream patch to fix remove() + on directory on non-Linux ports. [ Aurelien Jarno ] * debian/control.in/*: add ${misc:Depends} to all binary packages. Added: glibc-package/trunk/debian/patches/any/cvs-remove.diff =================================================================== --- glibc-package/trunk/debian/patches/any/cvs-remove.diff (rev 0) +++ glibc-package/trunk/debian/patches/any/cvs-remove.diff 2010-04-04 16:42:08 UTC (rev 4235) @@ -0,0 +1,52 @@ +commit cb652f30b0aa17e65803962305e052e509a5316d +Author: Ulrich Drepper <drep...@redhat.com> +Date: Sun Apr 4 02:08:37 2010 -0700 + + Handle POSIX-compliant errno value of unlink in remove. + +--- + posix/remove.c | 10 ++++++++-- + unix/sysv/linux/remove.c | 2 ++ + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/posix/remove.c b/sysdeps/posix/remove.c +index c44af92..ae5bbdb 100644 +--- a/sysdeps/posix/remove.c ++++ b/sysdeps/posix/remove.c +@@ -1,5 +1,5 @@ + /* ANSI C `remove' function to delete a file or directory. POSIX.1 version. +- Copyright (C) 1995,96,97,2002,2003 Free Software Foundation, Inc. ++ Copyright (C) 1995,96,97,2002,2003,2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -21,6 +21,12 @@ + #include <stdio.h> + #include <unistd.h> + ++ ++#ifndef IS_NO_DIRECTORY_ERROR ++# define IS_NO_DIRECTORY_ERROR errno != EPERM ++#endif ++ ++ + int + remove (file) + const char *file; +@@ -28,7 +34,7 @@ remove (file) + /* First try to unlink since this is more frequently the necessary action. */ + if (__unlink (file) != 0 + /* If it is indeed a directory... */ +- && (errno != EISDIR ++ && (IS_NO_DIRECTORY_ERROR + /* ...try to remove it. */ + || __rmdir (file) != 0)) + /* Cannot remove the object for whatever reason. */ +diff --git a/sysdeps/unix/sysv/linux/remove.c b/sysdeps/unix/sysv/linux/remove.c +new file mode 100644 +index 0000000..4abf34a +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/remove.c +@@ -0,0 +1,2 @@ ++#define IS_NO_DIRECTORY_ERROR errno != EISDIR ++#include <sysdeps/posix/remove.c> Deleted: glibc-package/trunk/debian/patches/any/submitted-remove.diff =================================================================== --- glibc-package/trunk/debian/patches/any/submitted-remove.diff 2010-03-29 13:36:49 UTC (rev 4234) +++ glibc-package/trunk/debian/patches/any/submitted-remove.diff 2010-04-04 16:42:08 UTC (rev 4235) @@ -1,25 +0,0 @@ -Only Linux' unlink() uses EISDIR when the entry to remove() is a directory -Reported by Ludovic Courtès - -2010-02-23 Samuel Thibault <samuel.thiba...@ens-lyon.org> - - * sysdeps/posix/remove.c (remove): Check __unlink()'s result against - EPERM too. - ---- - remove.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysdeps/posix/remove.c b/sysdeps/posix/remove.c -index c44af92..61fa5f3 100644 ---- a/sysdeps/posix/remove.c -+++ b/sysdeps/posix/remove.c -@@ -28,7 +28,7 @@ remove (file) - /* First try to unlink since this is more frequently the necessary action. */ - if (__unlink (file) != 0 - /* If it is indeed a directory... */ -- && (errno != EISDIR -+ && ((errno != EISDIR && errno != EPERM) - /* ...try to remove it. */ - || __rmdir (file) != 0)) - /* Cannot remove the object for whatever reason. */ Modified: glibc-package/trunk/debian/patches/series =================================================================== --- glibc-package/trunk/debian/patches/series 2010-03-29 13:36:49 UTC (rev 4234) +++ glibc-package/trunk/debian/patches/series 2010-04-04 16:42:08 UTC (rev 4235) @@ -239,5 +239,5 @@ any/submitted-stack-guard-quick-randomization.diff any/submitted-leading-zero-stack-guard.diff any/submitted-stat-issock.diff -any/submitted-remove.diff +any/cvs-remove.diff any/submitted-nptl-invalid-td.patch -- To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1nystn-00070i...@alioth.debian.org