1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Changed some nonportable types

This commit is contained in:
Dan Fandrich 2011-04-05 22:30:09 -07:00
parent 6eb484942b
commit c22c258029
4 changed files with 15 additions and 15 deletions

View File

@ -131,7 +131,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
gss_buffer_desc* gss_token = GSS_C_NO_BUFFER; gss_buffer_desc* gss_token = GSS_C_NO_BUFFER;
gss_name_t server = GSS_C_NO_NAME; gss_name_t server = GSS_C_NO_NAME;
gss_name_t gss_client_name = GSS_C_NO_NAME; gss_name_t gss_client_name = GSS_C_NO_NAME;
u_short us_length; unsigned short us_length;
char *user=NULL; char *user=NULL;
unsigned char socksreq[4]; /* room for gssapi exchange header only */ unsigned char socksreq[4]; /* room for gssapi exchange header only */
char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE]; char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];

View File

@ -180,7 +180,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
SecPkgCredentials_Names names; SecPkgCredentials_Names names;
TimeStamp expiry; TimeStamp expiry;
char *service_name=NULL; char *service_name=NULL;
u_short us_length; unsigned short us_length;
ULONG qop; ULONG qop;
unsigned char socksreq[4]; /* room for gssapi exchange header only */ unsigned char socksreq[4]; /* room for gssapi exchange header only */
char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE]; char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];

View File

@ -31,7 +31,7 @@
versions instead */ versions instead */
#include "curlx.h" /* from the private lib dir */ #include "curlx.h" /* from the private lib dir */
/* just to please base64.h we create a fake struct */ /* just to please curl_base64.h we create a fake struct */
struct SessionHandle { struct SessionHandle {
int fake; int fake;
}; };

View File

@ -1132,8 +1132,8 @@ static void sendtftp(struct testcase *test, struct formats *pf)
nak(ERRNO + 100); nak(ERRNO + 100);
return; return;
} }
sdp->th_opcode = htons((u_short)opcode_DATA); sdp->th_opcode = htons((unsigned short)opcode_DATA);
sdp->th_block = htons((u_short)sendblock); sdp->th_block = htons(sendblock);
timeout = 0; timeout = 0;
#ifdef HAVE_SIGSETJMP #ifdef HAVE_SIGSETJMP
(void) sigsetjmp(timeoutbuf, 1); (void) sigsetjmp(timeoutbuf, 1);
@ -1158,8 +1158,8 @@ static void sendtftp(struct testcase *test, struct formats *pf)
logmsg("read: fail"); logmsg("read: fail");
return; return;
} }
sap->th_opcode = ntohs((u_short)sap->th_opcode); sap->th_opcode = ntohs((unsigned short)sap->th_opcode);
sap->th_block = ntohs((u_short)sap->th_block); sap->th_block = ntohs(sap->th_block);
if (sap->th_opcode == opcode_ERROR) { if (sap->th_opcode == opcode_ERROR) {
logmsg("got ERROR"); logmsg("got ERROR");
@ -1196,8 +1196,8 @@ static void recvtftp(struct testcase *test, struct formats *pf)
rap = &ackbuf.hdr; rap = &ackbuf.hdr;
do { do {
timeout = 0; timeout = 0;
rap->th_opcode = htons((u_short)opcode_ACK); rap->th_opcode = htons((unsigned short)opcode_ACK);
rap->th_block = htons((u_short)recvblock); rap->th_block = htons(recvblock);
recvblock++; recvblock++;
#ifdef HAVE_SIGSETJMP #ifdef HAVE_SIGSETJMP
(void) sigsetjmp(timeoutbuf, 1); (void) sigsetjmp(timeoutbuf, 1);
@ -1222,8 +1222,8 @@ send_ack:
logmsg("read: fail\n"); logmsg("read: fail\n");
goto abort; goto abort;
} }
rdp->th_opcode = ntohs((u_short)rdp->th_opcode); rdp->th_opcode = ntohs((unsigned short)rdp->th_opcode);
rdp->th_block = ntohs((u_short)rdp->th_block); rdp->th_block = ntohs(rdp->th_block);
if (rdp->th_opcode == opcode_ERROR) if (rdp->th_opcode == opcode_ERROR)
goto abort; goto abort;
if (rdp->th_opcode == opcode_DATA) { if (rdp->th_opcode == opcode_DATA) {
@ -1248,8 +1248,8 @@ send_ack:
} while (size == SEGSIZE); } while (size == SEGSIZE);
write_behind(test, pf->f_convert); write_behind(test, pf->f_convert);
rap->th_opcode = htons((u_short)opcode_ACK); /* send the "final" ack */ rap->th_opcode = htons((unsigned short)opcode_ACK); /* send the "final" ack */
rap->th_block = htons((u_short)recvblock); rap->th_block = htons(recvblock);
(void) swrite(peer, &ackbuf.storage[0], 4); (void) swrite(peer, &ackbuf.storage[0], 4);
#if defined(HAVE_ALARM) && defined(SIGALRM) #if defined(HAVE_ALARM) && defined(SIGALRM)
mysignal(SIGALRM, justtimeout); /* just abort read on timeout */ mysignal(SIGALRM, justtimeout); /* just abort read on timeout */
@ -1282,8 +1282,8 @@ static void nak(int error)
struct errmsg *pe; struct errmsg *pe;
tp = &buf.hdr; tp = &buf.hdr;
tp->th_opcode = htons((u_short)opcode_ERROR); tp->th_opcode = htons((unsigned short)opcode_ERROR);
tp->th_code = htons((u_short)error); tp->th_code = htons((unsigned short)error);
for (pe = errmsgs; pe->e_code >= 0; pe++) for (pe = errmsgs; pe->e_code >= 0; pe++)
if (pe->e_code == error) if (pe->e_code == error)
break; break;