Fixed some compiler warnings
This commit is contained in:
parent
69d4e13520
commit
51940ae330
@ -238,6 +238,9 @@
|
|||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
#undef uid_t
|
#undef uid_t
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
|
#undef ssize_t
|
||||||
|
|
||||||
/* Define as `fork' if `vfork' does not work. */
|
/* Define as `fork' if `vfork' does not work. */
|
||||||
#undef vfork
|
#undef vfork
|
||||||
|
|
||||||
|
63
configure
vendored
63
configure
vendored
@ -7793,6 +7793,69 @@ _ACEOF
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
{ echo "$as_me:$LINENO: checking for ssize_t" >&5
|
||||||
|
echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
|
||||||
|
if test "${ac_cv_type_ssize_t+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
$ac_includes_default
|
||||||
|
typedef ssize_t ac__type_new_;
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((ac__type_new_ *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (ac__type_new_))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (ac_try="$ac_compile"
|
||||||
|
case "(($ac_try" in
|
||||||
|
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||||
|
*) ac_try_echo=$ac_try;;
|
||||||
|
esac
|
||||||
|
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
|
(eval "$ac_compile") 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } && {
|
||||||
|
test -z "$ac_c_werror_flag" ||
|
||||||
|
test ! -s conftest.err
|
||||||
|
} && test -s conftest.$ac_objext; then
|
||||||
|
ac_cv_type_ssize_t=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_type_ssize_t=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
|
||||||
|
if test $ac_cv_type_ssize_t = yes; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define ssize_t int
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
|
{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
|
||||||
echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
|
echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
|
||||||
if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
|
if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
|
||||||
|
@ -230,6 +230,7 @@ AC_TYPE_OFF_T
|
|||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
AC_TYPE_MODE_T
|
AC_TYPE_MODE_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
|
AC_TYPE_SSIZE_T
|
||||||
AC_STRUCT_ST_BLKSIZE
|
AC_STRUCT_ST_BLKSIZE
|
||||||
AC_HEADER_STAT
|
AC_HEADER_STAT
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
|
@ -44,7 +44,7 @@ struct sockaddr_in nntp_rem; /* For remote socket address */
|
|||||||
|
|
||||||
int nntp_connect(void)
|
int nntp_connect(void)
|
||||||
{
|
{
|
||||||
int addrlen;
|
socklen_t addrlen;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (nntpsock != -1)
|
if (nntpsock != -1)
|
||||||
|
@ -43,7 +43,7 @@ struct sockaddr_in pop3_rem; /* For remote socket address */
|
|||||||
|
|
||||||
int pop3_connect(void)
|
int pop3_connect(void)
|
||||||
{
|
{
|
||||||
int addrlen;
|
socklen_t addrlen;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (!strlen(CFG.popnode)) {
|
if (!strlen(CFG.popnode)) {
|
||||||
|
@ -43,7 +43,7 @@ struct sockaddr_in smtp_rem; /* For remote socket address */
|
|||||||
|
|
||||||
int smtp_connect(void)
|
int smtp_connect(void)
|
||||||
{
|
{
|
||||||
int addrlen;
|
socklen_t addrlen;
|
||||||
char *p, temp[40];
|
char *p, temp[40];
|
||||||
|
|
||||||
if (smtpsock != -1)
|
if (smtpsock != -1)
|
||||||
|
@ -1805,7 +1805,7 @@ int binkp_send_frame(int cmd, char *buf, int len)
|
|||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
int rcz, last;
|
int rcz, last;
|
||||||
uLongf zlen;
|
uLongf zlen;
|
||||||
char *zbuf;
|
Bytef *zbuf;
|
||||||
|
|
||||||
if ((len >= BINKP_PLZ_BLOCK) && (bp.PLZwe == Active)) {
|
if ((len >= BINKP_PLZ_BLOCK) && (bp.PLZwe == Active)) {
|
||||||
WriteError("Can't send block of %d bytes in PLZ mode", len);
|
WriteError("Can't send block of %d bytes in PLZ mode", len);
|
||||||
@ -1841,7 +1841,7 @@ int binkp_send_frame(int cmd, char *buf, int len)
|
|||||||
if ((bp.PLZwe == Active) && (len > 20) && (!cmd) && (bp.tmode != CompGZ) && (bp.tmode != CompBZ2)) {
|
if ((bp.PLZwe == Active) && (len > 20) && (!cmd) && (bp.tmode != CompGZ) && (bp.tmode != CompBZ2)) {
|
||||||
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
||||||
zlen = BINKP_PLZ_BLOCK -1;
|
zlen = BINKP_PLZ_BLOCK -1;
|
||||||
rcz = compress2(zbuf, &zlen, buf, len, 9);
|
rcz = compress2(zbuf, &zlen, (Bytef *)buf, (uLong)len, 9);
|
||||||
if (rcz == Z_OK) {
|
if (rcz == Z_OK) {
|
||||||
Syslog('b', "Binkp: compressed OK, srclen=%d, destlen=%d, will send compressed=%s",
|
Syslog('b', "Binkp: compressed OK, srclen=%d, destlen=%d, will send compressed=%s",
|
||||||
len, zlen, (zlen < len) ?"yes":"no");
|
len, zlen, (zlen < len) ?"yes":"no");
|
||||||
@ -1867,7 +1867,7 @@ int binkp_send_frame(int cmd, char *buf, int len)
|
|||||||
if (!rc)
|
if (!rc)
|
||||||
rc = PUTCHAR(header & 0x00ff);
|
rc = PUTCHAR(header & 0x00ff);
|
||||||
if (zlen && !rc)
|
if (zlen && !rc)
|
||||||
rc = PUT(zbuf, zlen);
|
rc = PUT((char *)zbuf, (int)zlen);
|
||||||
} else {
|
} else {
|
||||||
rc = PUTCHAR((header >> 8) & 0x00ff);
|
rc = PUTCHAR((header >> 8) & 0x00ff);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
@ -2357,7 +2357,7 @@ int binkp_poll_frame(void)
|
|||||||
if ((bp.PLZthey == Active) && (bp.header & BINKP_PLZ_BLOCK) && (bp.rmode == CompNone) && bp.blklen) {
|
if ((bp.PLZthey == Active) && (bp.header & BINKP_PLZ_BLOCK) && (bp.rmode == CompNone) && bp.blklen) {
|
||||||
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
||||||
zlen = BINKP_PLZ_BLOCK -1;
|
zlen = BINKP_PLZ_BLOCK -1;
|
||||||
rc = uncompress(zbuf, &zlen, bp.rxbuf, bp.rxlen -1);
|
rc = uncompress((Bytef *)zbuf, &zlen, (Bytef *)bp.rxbuf, bp.rxlen -1);
|
||||||
if (rc == Z_OK) {
|
if (rc == Z_OK) {
|
||||||
bp.rxcompressed += (zlen - (bp.rxlen -1));
|
bp.rxcompressed += (zlen - (bp.rxlen -1));
|
||||||
memmove(bp.rxbuf, zbuf, zlen);
|
memmove(bp.rxbuf, zbuf, zlen);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MD5 for binkp protocol driver
|
* Purpose ...............: MD5 for binkp protocol driver
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2004
|
* Copyright (C) 1997-2007
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -514,7 +514,7 @@ char *MD_buildDigest(char *pw, unsigned char *challenge)
|
|||||||
if ((!pw) || (!challenge))
|
if ((!pw) || (!challenge))
|
||||||
return rs;
|
return rs;
|
||||||
|
|
||||||
hmac_md5(challenge+1, challenge[0], pw, strlen(pw), digest);
|
hmac_md5(challenge+1, challenge[0], (unsigned char *)pw, strlen(pw), digest);
|
||||||
rs = (char *)xmalloc(MD5_DIGEST_LEN * 2 + 10);
|
rs = (char *)xmalloc(MD5_DIGEST_LEN * 2 + 10);
|
||||||
MD_toString(rs, MD5_DIGEST_LEN, digest);
|
MD_toString(rs, MD5_DIGEST_LEN, digest);
|
||||||
return rs;
|
return rs;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Fidonet mailer
|
* Purpose ...............: Fidonet mailer
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2005
|
* Copyright (C) 1997-2007
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -356,7 +356,7 @@ SM_STATE(recvblk)
|
|||||||
|
|
||||||
if (crcmode && (header != SYN)) {
|
if (crcmode && (header != SYN)) {
|
||||||
remotecrc = (short)xmblk.c1 << 8 | xmblk.c2;
|
remotecrc = (short)xmblk.c1 << 8 | xmblk.c2;
|
||||||
localcrc = crc16xmodem(xmblk.data, sizeof(xmblk.data));
|
localcrc = crc16xmodem((char *)xmblk.data, sizeof(xmblk.data));
|
||||||
if (remotecrc != localcrc) {
|
if (remotecrc != localcrc) {
|
||||||
Syslog('x', "bad crc: 0x%04x/0x%04x",remotecrc,localcrc);
|
Syslog('x', "bad crc: 0x%04x/0x%04x",remotecrc,localcrc);
|
||||||
if (recv_blk == (ackd_blk+1)) {
|
if (recv_blk == (ackd_blk+1)) {
|
||||||
@ -367,7 +367,7 @@ SM_STATE(recvblk)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
remotecs = xmblk.c1;
|
remotecs = xmblk.c1;
|
||||||
localcs = checksum(xmblk.data, sizeof(xmblk.data));
|
localcs = checksum((char *)xmblk.data, sizeof(xmblk.data));
|
||||||
if (remotecs != localcs) {
|
if (remotecs != localcs) {
|
||||||
Syslog('x', "bad checksum: 0x%02x/0x%02x",remotecs,localcs);
|
Syslog('x', "bad checksum: 0x%02x/0x%02x",remotecs,localcs);
|
||||||
if (recv_blk == (ackd_blk+1)) {
|
if (recv_blk == (ackd_blk+1)) {
|
||||||
@ -394,7 +394,7 @@ SM_STATE(recvblk)
|
|||||||
SM_PROCEED(waitblk);
|
SM_PROCEED(waitblk);
|
||||||
}
|
}
|
||||||
|
|
||||||
Syslog('X', "received block %ld \"%s\"", recv_blk,printable(xmblk.data,128));
|
Syslog('X', "received block %d \"%s\"", recv_blk,printable((char *)xmblk.data,128));
|
||||||
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
if ((fp = openfile(tmpfname,remtime,remsize,&resofs,resync)) == NULL) {
|
if ((fp = openfile(tmpfname,remtime,remsize,&resofs,resync)) == NULL) {
|
||||||
@ -434,9 +434,9 @@ SM_STATE(recvblk)
|
|||||||
|
|
||||||
SM_STATE(checktelink)
|
SM_STATE(checktelink)
|
||||||
|
|
||||||
Syslog('x', "checktelink got \"%s\"",printable(xmblk.data,45));
|
Syslog('x', "checktelink got \"%s\"",printable((char *)xmblk.data,45));
|
||||||
if (tmpfname[0] == '\0') {
|
if (tmpfname[0] == '\0') {
|
||||||
strncpy(tmpfname,xmblk.data+8,16);
|
strncpy(tmpfname,(char *)xmblk.data+8,16);
|
||||||
/*
|
/*
|
||||||
* Some systems fill the rest of the filename with spaces, sigh.
|
* Some systems fill the rest of the filename with spaces, sigh.
|
||||||
*/
|
*/
|
||||||
@ -447,8 +447,8 @@ SM_STATE(checktelink)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Syslog('+', "Remote uses %s",printable(xmblk.data+25,-14));
|
Syslog('+', "Remote uses %s",printable((char *)xmblk.data+25,-14));
|
||||||
Syslog('x', "Remote file name \"%s\" discarded", printable(xmblk.data+8,-16));
|
Syslog('x', "Remote file name \"%s\" discarded", printable((char *)xmblk.data+8,-16));
|
||||||
}
|
}
|
||||||
remsize = ((off_t)xmblk.data[0]) + ((off_t)xmblk.data[1]<<8) + ((off_t)xmblk.data[2]<<16) + ((off_t)xmblk.data[3]<<24);
|
remsize = ((off_t)xmblk.data[0]) + ((off_t)xmblk.data[1]<<8) + ((off_t)xmblk.data[2]<<16) + ((off_t)xmblk.data[3]<<24);
|
||||||
last_blk = (remsize-1)/XMBLKSIZ+1;
|
last_blk = (remsize-1)/XMBLKSIZ+1;
|
||||||
|
Reference in New Issue
Block a user