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:
parent
2a8fe286da
commit
35b72cc941
@ -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,
|
||||
|
@ -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])
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user