mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fallback to PATH_MAX when pathconf is not available
This commit is contained in:
parent
fe401688a6
commit
22bd8011e8
@ -1,3 +1,7 @@
|
||||
2012-10-07 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* configure.ac: Check for patchconf.
|
||||
|
||||
2012-09-23 Merinov Nikolay <kim.roader@gmail.com>
|
||||
|
||||
* m4/wget.m4 (WGET_FNMATCH): Add AC_LANG_SOURCE into
|
||||
|
@ -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)
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2012-10-07 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||
Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* utils.c (get_max_length): If `pathconf' is not available
|
||||
fallback to PATH_MAX.
|
||||
|
||||
2012-10-06 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* http.c (http_loop): Send a HEAD request when -c and
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user