bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Wget 1.11.4 and FTP Server from Windows Server 2008 R2


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] Wget 1.11.4 and FTP Server from Windows Server 2008 R2
Date: Sun, 07 Oct 2012 13:10:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Tim Ruehsen <address@hidden> writes:

>> I couldn't build 6e4c3ab for MinGW without reverting the recent commit
>> 67e6027 "Add support for file names longer than MAX_FILE" from Tim
>> Ruehsen. I have no pathconf() here and it looks like gnulib doesn't offer
>> it for mingw or msvc. I'm not suggesting it should be reverted in the main
>> repo but there would have to be _PC_NAME_MAX and pathconf() substitutes
>> for windows.
>
> Hi Ray,
>
> since I have no Win Env, could you check if something like this works ?
>
> #ifdef WINDOWS
>  ret = PATH_MAX;
> #else
>  ret = pathconf (*p ? p : ".", name);
> #endif
>
> It is in utils.c/get_max_length().

thanks for the patch.  I have applied this:

diff --git a/configure.ac b/configure.ac
index 873c3c9..a413b75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,7 +198,7 @@ dnl Checks for library functions.
 dnl
 AC_FUNC_MMAP
 AC_FUNC_FSEEKO
-AC_CHECK_FUNCS(strptime timegm vsnprintf vasprintf drand48)
+AC_CHECK_FUNCS(strptime timegm vsnprintf vasprintf drand48 pathconf)
 AC_CHECK_FUNCS(strtoll usleep ftello sigblock sigsetjmp memrchr wcwidth mbtowc)
 AC_CHECK_FUNCS(sleep symlink utime)
 
diff --git a/src/utils.c b/src/utils.c
index 729ec50..faae62e 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -2509,9 +2509,13 @@ get_max_length (const char *path, int length, int name)
     {
       errno = 0;
       /* For an empty path query the current directory. */
+#if HAVE_PATHCONF
       ret = pathconf (*p ? p : ".", name);
       if (!(ret < 0 && errno == ENOENT))
         break;
+#else
+      ret = PATH_MAX;
+#endif
 
       /* The path does not exist yet, but may be created. */
       /* Already at current or root directory, give up. */

Giuseppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]