Only in eglibc-2.11.1: build-tree diff -ru eglibc-2.11.1.debian-orig/debian/changelog eglibc-2.11.1/debian/changelog --- eglibc-2.11.1.debian-orig/debian/changelog 2010-06-11 17:15:34.000000000 +0200 +++ eglibc-2.11.1/debian/changelog 2010-06-12 03:41:27.000000000 +0200 @@ -1,3 +1,10 @@ +eglibc (2.11.1-2.0jk1) unstable; urgency=low + + * Non-maintainer non-upload. + * Fix file_name_split("/") and directory_name_split("/"). + + -- Jeremie Koenig Sat, 12 Jun 2010 03:40:26 +0200 + eglibc (2.11.1-2) unstable; urgency=low [ Aurelien Jarno] diff -ru eglibc-2.11.1.debian-orig/hurd/hurd.h eglibc-2.11.1/hurd/hurd.h --- eglibc-2.11.1.debian-orig/hurd/hurd.h 2007-03-18 19:01:40.000000000 +0100 +++ eglibc-2.11.1/hurd/hurd.h 2010-06-12 21:49:58.000000000 +0200 @@ -183,7 +183,9 @@ directory lookup uses the current root and working directory. If successful, stores in *NAME a pointer into FILE where the name within directory begins and returns a port to the directory; - otherwise sets `errno' and returns MACH_PORT_NULL. */ + otherwise sets `errno' and returns MACH_PORT_NULL. As a special + case, if PATH is "/", stores in *NAME a pointer into a constant + "." string and returns the current root directory. */ extern file_t __file_name_split (const char *file, char **name); extern file_t file_name_split (const char *file, char **name); diff -ru eglibc-2.11.1.debian-orig/hurd/hurdlookup.c eglibc-2.11.1/hurd/hurdlookup.c --- eglibc-2.11.1.debian-orig/hurd/hurdlookup.c 2006-08-17 03:18:26.000000000 +0200 +++ eglibc-2.11.1/hurd/hurdlookup.c 2010-06-12 20:20:08.000000000 +0200 @@ -22,6 +22,9 @@ #include #include +/* Used as the basename of "/" by __hurd_{file,directory}_name_split() below */ +static const char *dot = "."; + /* Translate the error from dir_lookup into the error the user sees. */ static inline error_t @@ -126,8 +129,8 @@ { if (lastslash == file_name) { - /* "/foobar" => crdir + "foobar". */ - *name = (char *) file_name + 1; + /* "/foobar" => crdir + "foobar", except for "/" => crdir + "." */ + *name = (char *) (file_name[1] ? file_name + 1 : dot); return (*use_init_port) (INIT_PORT_CRDIR, &addref); } else @@ -175,7 +178,7 @@ const char *lastslash = strrchr (file_name, '/'); - if (lastslash != NULL && lastslash[1] == '\0') + if (lastslash != NULL && lastslash[1] == '\0' && lastslash > file_name) { /* Trailing slash doesn't count. Look back further. */ @@ -191,8 +194,8 @@ { if (lastslash == file_name) { - /* "/foobar" => crdir + "foobar". */ - *name = (char *) file_name + 1; + /* "/foobar" => crdir + "foobar", except for "/" => crdir + "." */ + *name = (char *) (file_name[1] ? file_name + 1 : dot); return (*use_init_port) (INIT_PORT_CRDIR, &addref); } else Only in eglibc-2.11.1: manual Only in eglibc-2.11.1: stamp-dir Only in eglibc-2.11.1/sysdeps: m68k Only in eglibc-2.11.1.debian-orig/sysdeps/mach/hurd: .link.c.swp