cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Porting to OS/400: 4th patch release

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 20 Aug 2007 11:32:16 -0700

As an experiment, I tried compiling the two new OS/400 files on a Linux
system with compile warnings enabled. After applying the following two
patches (to get rid of the most obvious warnings) and commenting out the
SSL parts, the the result is below. It looks like most of them could be
fixed pretty easily.

--- ccsidcurl.c.orig Mon Aug 20 11:03:40 2007
+++ ccsidcurl.c Mon Aug 20 11:18:47 2007
@@ -34,7 +34,9 @@
 
 #include <curl/curl.h>
 #include "urldata.h"
+#include "url.h"
 #include "getinfo.h"
+#include "ccsidcurl.h"
 
 #include "os400sys.h"
 
--- os400sys.c.orig Mon Aug 20 11:03:40 2007
+++ os400sys.c Mon Aug 20 11:23:52 2007
@@ -27,6 +27,7 @@
 #include <sys/socket.h>
 
 #include <stdlib.h>
+#include <string.h>
 #include <pthread.h>
 #include <netdb.h>
 #include <qadrt.h>

ccsidcurl.c: In function `dynconvert':
ccsidcurl.c:182: warning: signed and unsigned type in conditional expression
ccsidcurl.c:198: warning: comparison between signed and unsigned
ccsidcurl.c:175: warning: unused variable `cstr'
ccsidcurl.c: In function `curl_easy_escape_ccsid':
ccsidcurl.c:235: warning: unused variable `l'
ccsidcurl.c: In function `curl_easy_unescape_ccsid':
ccsidcurl.c:267: warning: unused variable `l'
ccsidcurl.c: In function `Curl_is_formadd_string':
ccsidcurl.c:645: warning: enumeration value `CURLFORM_NOTHING' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_NAMELENGTH' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_PTRCONTENTS' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_CONTENTSLENGTH' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_ARRAY' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_OBSOLETE' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_BUFFERPTR' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_BUFFERLENGTH' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_CONTENTHEADER' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_END' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_OBSOLETE2' not handled in switch
ccsidcurl.c:645: warning: enumeration value `CURLFORM_LASTENTRY' not handled in switch
ccsidcurl.c: In function `curl_formadd_ccsid':
ccsidcurl.c:924: warning: enumeration value `CURLFORM_NOTHING' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_COPYNAME' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_PTRNAME' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_COPYCONTENTS' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_FILECONTENT' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_OBSOLETE' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_FILE' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_BUFFER' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_CONTENTTYPE' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_FILENAME' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_END' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_OBSOLETE2' not handled in switch
ccsidcurl.c:924: warning: enumeration value `CURLFORM_LASTENTRY' not handled in switch
ccsidcurl.c:714: warning: unused variable `cp'
ccsidcurl.c: In function `Curl_formget_callback_ccsid':
ccsidcurl.c:986: warning: comparison between signed and unsigned
ccsidcurl.c:986: warning: signed and unsigned type in conditional expression

os400sys.c:49: warning: ignoring pragma:
os400sys.c: In function `get_buffer':
os400sys.c:129: warning: comparison between signed and unsigned
os400sys.c: At top level:
os400sys.c:219: warning: no previous prototype for `Curl_getnameinfo_a'
os400sys.c: In function `Curl_getnameinfo_a':
os400sys.c:246: warning: implicit declaration of function `QadrtConvertE2A'
os400sys.c: At top level:
os400sys.c:272: warning: no previous prototype for `Curl_getaddrinfo_a'
os400sys.c: In function `Curl_getaddrinfo_a':
os400sys.c:287: warning: implicit declaration of function `QadrtConvertA2E'
os400sys.c: At top level:
os400sys.c:321: warning: no previous prototype for `Curl_inet_ntoa_r_a'
os400sys.c: In function `Curl_inet_ntoa_r_a':
os400sys.c:327: warning: implicit declaration of function `inet_ntoa_r'
os400sys.c: At top level:
os400sys.c:635: warning: no previous prototype for `Curl_ldap_init_a'
os400sys.c:659: warning: no previous prototype for `Curl_ldap_simple_bind_s_a'
os400sys.c:707: warning: no previous prototype for `Curl_ldap_search_s_a'
os400sys.c:790: warning: no previous prototype for `Curl_ldap_get_values_len_a'
os400sys.c: In function `Curl_ldap_get_values_len_a':
os400sys.c:801: warning: implicit declaration of function `ldap_set_lderrno'
os400sys.c: At top level:
os400sys.c:825: warning: no previous prototype for `Curl_ldap_err2string_a'
os400sys.c:849: warning: no previous prototype for `Curl_ldap_get_dn_a'
os400sys.c:880: warning: no previous prototype for `Curl_ldap_first_attribute_a'
os400sys.c:911: warning: no previous prototype for `Curl_ldap_next_attribute_a'

>>> Dan
Received on 2007-08-20