Adapting last changes to OS400:

_ Updated packages/OS400/curl.inc.in with new definitions.
_ New connect/bind/sendto/recvfrom wrappers to support AF_UNIX sockets.
_ Include files line length shortened below 100 chars.
_ Const parameter in lib/qssl.[ch].
_ Typos in packages/OS400/initscript.sh.
This commit is contained in:
Patrick Monnerat
2008-05-20 10:21:50 +00:00
parent 862049c490
commit 24bf52bc69
11 changed files with 230 additions and 28 deletions

View File

@@ -322,6 +322,9 @@
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H
/* Define if you have the <sys/un.h> header file. */
#define HAVE_SYS_UN_H
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H
@@ -379,6 +382,9 @@
#define SIZEOF_CURL_OFF_T 8
/* Define this if you have struct sockaddr_storage */
#define HAVE_STRUCT_SOCKADDR_STORAGE
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS

View File

@@ -372,15 +372,15 @@ int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex)
}
ssize_t Curl_qsossl_send(struct connectdata * conn, int sockindex, void * mem,
size_t len)
ssize_t Curl_qsossl_send(struct connectdata * conn, int sockindex,
const void * mem, size_t len)
{
/* SSL_Write() is said to return 'int' while write() and send() returns
'size_t' */
int rc;
rc = SSL_Write(conn->ssl[sockindex].handle, mem, (int) len);
rc = SSL_Write(conn->ssl[sockindex].handle, (void *) mem, (int) len);
if(rc < 0) {
switch(rc) {

View File

@@ -38,7 +38,7 @@ int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex);
ssize_t Curl_qsossl_send(struct connectdata * conn,
int sockindex,
void * mem,
const void * mem,
size_t len);
ssize_t Curl_qsossl_recv(struct connectdata * conn, /* connection data */
int num, /* socketindex */

View File

@@ -137,4 +137,20 @@ extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
#define ldap_first_attribute Curl_ldap_first_attribute_a
#define ldap_next_attribute Curl_ldap_next_attribute_a
/* Some socket functions must be wrapped to process textual addresses
like AF_UNIX. */
extern int Curl_os400_connect(int sd, struct sockaddr * destaddr, int addrlen);
extern int Curl_os400_bind(int sd, struct sockaddr * localaddr, int addrlen);
extern int Curl_os400_sendto(int sd, char * buffer, int buflen, int flags,
struct sockaddr * dstaddr, int addrlen);
extern int Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
struct sockaddr * fromaddr, int * addrlen);
#define connect Curl_os400_connect
#define bind Curl_os400_bind
#define sendto Curl_os400_sendto
#define recvfrom Curl_os400_recvfrom
#endif /* __SETUP_OS400_H */