.
[gnulib.git] / lib / basename.c
index 5237b11..36e0f62 100644 (file)
@@ -1,5 +1,5 @@
 /* basename.c -- return the last element in a path
-   Copyright (C) 1990, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 # include <config.h>
 #endif
 
+#include <stdio.h>
 #include <assert.h>
 
 #ifndef FILESYSTEM_PREFIX_LEN
@@ -64,7 +65,7 @@ base_name (char const *name)
     --base;
 
   /* Make sure the last byte is not a slash.  */
-  assert (all_slashes || *(p - 1) != '/');
+  assert (all_slashes || !ISSLASH (*(p - 1)));
 
   return (char *) base;
 }