New module 'unicase/ulc-casecoll'.
[pspp] / lib / canonicalize-lgpl.c
index e8d2b65ebc82b2a1f8aa9eac982a901822985c6b..3aaa310ecd2d0883e6b8e5121e214859d28d1786 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file.
-   Copyright (C) 1996-2003, 2005-2007 Free Software Foundation, Inc.
+   Copyright (C) 1996-2003, 2005-2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -78,7 +78,7 @@
 # endif
 # define __readlink readlink
   /* On systems without symbolic links, call stat() instead of lstat().  */
-# if !defined S_ISNLK && !HAVE_READLINK
+# if !defined S_ISLNK && !HAVE_READLINK
 #  define lstat stat
 # endif
 #endif
@@ -260,7 +260,7 @@ __realpath (const char *name, char *resolved)
                  goto error;
                }
 
-             n = __readlink (rpath, buf, path_max);
+             n = __readlink (rpath, buf, path_max - 1);
              if (n < 0)
                {
                  int saved_errno = errno;