1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Handle missing wchar.h, wcwidth.

This commit is contained in:
Micah Cowan 2008-02-03 01:48:50 -08:00
parent 2a8fe286da
commit 35b72cc941
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-02-03 Micah Cowan <micah@cowan.name>
* configure.in: Add checks for wchar.h, wcwidth function (to
support column-counting in progress.c).
2008-01-31 Micah Cowan <micah@cowan.name>
* util/README, util/dist-wget, util/download-netscape.html,

View File

@ -159,7 +159,7 @@ dnl
AC_HEADER_STDBOOL
AC_CHECK_HEADERS(unistd.h sys/time.h)
AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h)
AC_CHECK_HEADERS(stdint.h inttypes.h pwd.h)
AC_CHECK_HEADERS(stdint.h inttypes.h pwd.h wchar.h)
dnl
dnl Check sizes of integer types. These are used to find n-bit
@ -197,7 +197,7 @@ AC_FUNC_ALLOCA
AC_FUNC_MMAP
AC_FUNC_FSEEKO
AC_CHECK_FUNCS(strptime timegm snprintf vsnprintf vasprintf drand48)
AC_CHECK_FUNCS(strtoll usleep ftello sigblock sigsetjmp memrchr)
AC_CHECK_FUNCS(strtoll usleep ftello sigblock sigsetjmp memrchr wcwidth)
if test x"$ENABLE_OPIE" = xyes; then
AC_LIBOBJ([ftp-opie])

View File

@ -38,6 +38,9 @@ as that of the covered work. */
# include <unistd.h>
#endif
#include <signal.h>
#ifdef HAVE_WCHAR_H
# include <wchar.h>
#endif
#include "progress.h"
#include "utils.h"
@ -764,6 +767,10 @@ update_speed_ring (struct bar_progress *bp, wgint howmuch, double dltime)
#endif
}
#if ! HAVE_WCWIDTH
#define wcwidth(wc) (1)
#endif
int
count_cols (const char *mbs)
{