diff src/realpath.c @ 288:e11d67e05968 r21-0b42

Import from CVS: tag r21-0b42
author cvs
date Mon, 13 Aug 2007 10:35:54 +0200
parents 558f606b08ae
children 8626e4521993
line wrap: on
line diff
--- a/src/realpath.c	Mon Aug 13 10:35:07 2007 +0200
+++ b/src/realpath.c	Mon Aug 13 10:35:54 2007 +0200
@@ -42,6 +42,10 @@
 extern int errno;
 #endif
 
+#ifdef WINDOWSNT
+#include <direct.h>
+#endif
+
 #include <sys/stat.h>			/* for S_IFLNK */
 
 #ifndef PATH_MAX
@@ -67,11 +71,13 @@
 #endif
 {
   char copy_path[PATH_MAX];
-  char link_path[PATH_MAX];
   char *new_path = resolved_path;
   char *max_path;
   int readlinks = 0;
+#ifdef S_IFLNK
+  char link_path[PATH_MAX];
   int n;
+#endif
 
   /* Make a copy of the source path since we may need to modify it. */
   strcpy(copy_path, path);