From: Gurucharan Shetty Date: Mon, 10 Mar 2014 16:16:08 +0000 (-0700) Subject: util: Maximum path length for Windows. X-Git-Tag: sliver-openvswitch-2.2.90-1~6^2~145 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=661c32dcff236d06903014c8583c062ab8f31033;p=sliver-openvswitch.git util: Maximum path length for Windows. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/lib/util.c b/lib/util.c index 911cc3e34..68a1ce6ea 100644 --- a/lib/util.c +++ b/lib/util.c @@ -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);