util: Maximum path length for Windows.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 10 Mar 2014 16:16:08 +0000 (09:16 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 12 Mar 2014 03:32:35 +0000 (20:32 -0700)
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/util.c

index 911cc3e..68a1ce6 100644 (file)
@@ -646,7 +646,11 @@ get_cwd(void)
     size_t size;
 
     /* Get maximum path length or at least a reasonable estimate. */
+#ifndef _WIN32
     path_max = pathconf(".", _PC_PATH_MAX);
+#else
+    path_max = MAX_PATH;
+#endif
     size = (path_max < 0 ? 1024
             : path_max > 10240 ? 10240
             : path_max);