Test HAVE_READLINK instead of S_ISLNK.
authorBruno Haible <bruno@clisp.org>
Sat, 23 Dec 2006 15:43:03 +0000 (15:43 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 23 Dec 2006 15:43:03 +0000 (15:43 +0000)
ChangeLog
lib/canonicalize-lgpl.c

index 778f87b..a00a191 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-12-23  Bruno Haible  <bruno@clisp.org>
+
+       * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
+       S_ISLNK.
+       Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
+       mingw.
+
 2006-12-22  Bruno Haible  <bruno@clisp.org>
 
        * lib/copy-file.c: Include acl.h.
index 7da1206..05ced11 100644 (file)
@@ -101,7 +101,7 @@ __realpath (const char *name, char *resolved)
   char *rpath, *dest, *extra_buf = NULL;
   const char *start, *end, *rpath_limit;
   long int path_max;
-#ifdef S_ISLNK
+#if HAVE_READLINK
   int num_links = 0;
 #endif
 
@@ -231,7 +231,7 @@ __realpath (const char *name, char *resolved)
 #endif
            goto error;
 
-#ifdef S_ISLNK
+#if HAVE_READLINK
          if (S_ISLNK (st.st_mode))
            {
              char *buf;