about summary refs log tree commit diff
path: root/hurd/hurdlookup.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /hurd/hurdlookup.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'hurd/hurdlookup.c')
-rw-r--r--hurd/hurdlookup.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/hurd/hurdlookup.c b/hurd/hurdlookup.c
index 8270132b90..77de27150a 100644
--- a/hurd/hurdlookup.c
+++ b/hurd/hurdlookup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1993,1994,1995,1996,1997,1999,2001,2004,2006
+/* Copyright (C) 1992,93,94,95,96,97,99,2001,2004
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -184,7 +184,19 @@ __hurd_directory_name_split (error_t (*use_init_port)
 	--lastslash;
 
       /* Find the last one earlier in the string, before the trailing ones.  */
+#if __GLIBC__ > 2 || __GLIBC_MINOR__ >= 2
       lastslash = __memrchr (file_name, '/', lastslash - file_name);
+#else
+      /* Keep backing up, looking for a slash.  */
+      do
+	if (lastslash == file_name)
+	  {
+	    /* Hit the start with no slash.  */
+	    lastslash = NULL;
+	    break;
+	  }
+      while (*lastslash-- != '/');
+#endif
     }
 
   if (lastslash != NULL)