[w3m-dev 04379] check socklen_t

This commit is contained in:
Ito Hiroyuki
2010-08-10 10:16:57 +00:00
parent 69aeac8c14
commit 88b4721025
5 changed files with 3291 additions and 5951 deletions

View File

@@ -1,11 +1,17 @@
2010-08-09 Ito Hiroyuki <ZXB01226 at nifty.com>
2010-08-10 Ito Hiroyuki <ZXB01226@nifty.com>
* [w3m-dev 04379] check socklen_t
* configure.ac: check socklen_t
* ftp.c (ftp_login, ftp_pasv): use socklen_t instead of int
2010-08-09 Ito Hiroyuki <ZXB01226@nifty.com>
* [w3m-dev 04374] Re: "important" bugs from bugs.debian.org
* table.c (feed_table_tag): don't show message when rowspan is greater than ATTR_ROWSPAN_MAX
* [w3m-dev 04376] Re: "important" bugs from bugs.debian.org
* table.c (feed_table_tag): fix indent
2010-08-08 Steven Harms <ZXB01226 at nifty.com>
2010-08-08 Steven Harms <ZXB01226@nifty.com>
* [w3m-dev 04371] Re: "important" bugs from bugs.debian.org
* https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/131993
@@ -9130,4 +9136,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
$Id: ChangeLog,v 1.1031 2010/08/09 12:00:19 htrb Exp $
$Id: ChangeLog,v 1.1032 2010/08/10 10:16:57 htrb Exp $

View File

@@ -81,6 +81,7 @@
#define ID_EXT
#undef CLEAR_BUF
#undef INET6
#undef HAVE_SOCKLEN_T
#undef HAVE_OLD_SS_FAMILY
#define USE_EGD
#define ENABLE_REMOVE_TRAILINGSPACES

9213
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -107,6 +107,11 @@ AC_W3M_TERMLIB
AC_W3M_GC
AC_CHECK_LIB(z, zError, [AUXBIN_TARGETS="$AUXBIN_TARGETS inflate\$(EXT)"])
AC_CHECK_TYPE([socklen_t],
[AC_DEFINE(HAVE_SOCKLEN_T)], ,
[#include <sys/types.h>
#include <sys/socket.h>])
AC_DEFINE(AUXBIN_TARGETS, "$AUXBIN_TARGETS")
AC_SUBST(USE_BINMODE_STREAM)

11
ftp.c
View File

@@ -1,4 +1,4 @@
/* $Id: ftp.c,v 1.39 2007/05/31 01:19:50 inu Exp $ */
/* $Id: ftp.c,v 1.40 2010/08/10 10:16:57 htrb Exp $ */
#include <stdio.h>
#ifndef __MINGW32_VERSION
#include <pwd.h>
@@ -25,6 +25,10 @@
#include <winsock.h>
#endif /* __MINGW32_VERSION */
#ifdef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
typedef struct _FTP {
char *host;
int port;
@@ -128,7 +132,7 @@ ftp_login(FTP ftp)
if (n > 0 && ftp->pass[n - 1] == '@') {
struct sockaddr_in sockname;
int socknamelen = sizeof(sockname);
socklen_t socknamelen = sizeof(sockname);
if (!getsockname(sock, (struct sockaddr *)&sockname, &socknamelen)) {
struct hostent *sockent;
@@ -192,7 +196,8 @@ ftp_pasv(FTP ftp)
int family;
#ifdef INET6
struct sockaddr_storage sockaddr;
int sockaddrlen, port;
int port;
socklen_t sockaddrlen;
unsigned char d1, d2, d3, d4;
char abuf[INET6_ADDRSTRLEN];
#endif