113498266Sopenharmony_ci
213498266Sopenharmony_ciImplementation notes:
313498266Sopenharmony_ci
413498266Sopenharmony_ci  This is a true OS/400 ILE implementation, not a PASE implementation (for
513498266Sopenharmony_ciPASE, use AIX implementation).
613498266Sopenharmony_ci
713498266Sopenharmony_ci  The biggest problem with OS/400 is EBCDIC. Libcurl implements an internal
813498266Sopenharmony_ciconversion mechanism, but it has been designed for computers that have a
913498266Sopenharmony_cisingle native character set. OS/400 default native character set varies
1013498266Sopenharmony_cidepending on the country for which it has been localized. And more, a job
1113498266Sopenharmony_cimay dynamically alter its "native" character set.
1213498266Sopenharmony_ci  Several characters that do not have fixed code in EBCDIC variants are
1313498266Sopenharmony_ciused in libcurl strings. As a consequence, using the existing conversion
1413498266Sopenharmony_cimechanism would have lead in a localized binary library - not portable across
1513498266Sopenharmony_cicountries.
1613498266Sopenharmony_ci  For this reason, and because libcurl was originally designed for ASCII based
1713498266Sopenharmony_cioperating systems, the current OS/400 implementation uses ASCII as internal
1813498266Sopenharmony_cicharacter set. This has been accomplished using the QADRT library and
1913498266Sopenharmony_ciinclude files, a C and system procedures ASCII wrapper library. See IBM QADRT
2013498266Sopenharmony_cidescription for more information.
2113498266Sopenharmony_ci  This then results in libcurl being an ASCII library: any function string
2213498266Sopenharmony_ciargument is taken/returned in ASCII and a C/C++ calling program built around
2313498266Sopenharmony_ciQADRT may use libcurl functions as on any other platform.
2413498266Sopenharmony_ci  QADRT does not define ASCII wrappers for all C/system procedures: the
2513498266Sopenharmony_ciOS/400 configuration header file and an additional module (os400sys.c) define
2613498266Sopenharmony_cisome more of them, that are used by libcurl and that QADRT left out.
2713498266Sopenharmony_ci  To support all the different variants of EBCDIC, non-standard wrapper
2813498266Sopenharmony_ciprocedures have been added to libcurl on OS/400: they provide an additional
2913498266Sopenharmony_ciCCSID (numeric Coded Character Set ID specific to OS/400) parameter for each
3013498266Sopenharmony_cistring argument. Callback procedures arguments giving access to strings are
3113498266Sopenharmony_ciNOT converted, so text gathered this way is (probably !) ASCII.
3213498266Sopenharmony_ci
3313498266Sopenharmony_ci  Another OS/400 problem comes from the fact that the last fixed argument of a
3413498266Sopenharmony_civararg procedure may not be of type char, unsigned char, short or unsigned
3513498266Sopenharmony_cishort. Enums that are internally implemented by the C compiler as one of these
3613498266Sopenharmony_citypes are also forbidden. Libcurl uses enums as vararg procedure tagfields...
3713498266Sopenharmony_ciHappily, there is a pragma forcing enums to type "int". The original libcurl
3813498266Sopenharmony_ciheader files are thus altered during build process to use this pragma, in
3913498266Sopenharmony_ciorder to force libcurl enums of being type int (the pragma disposition in use
4013498266Sopenharmony_cibefore inclusion is restored before resuming the including unit compilation).
4113498266Sopenharmony_ci
4213498266Sopenharmony_ci  Non-standard EBCDIC wrapper prototypes are defined in an additional header
4313498266Sopenharmony_cifile: ccsidcurl.h. These should be self-explanatory to an OS/400-aware
4413498266Sopenharmony_cidesigner. CCSID 0 can be used to select the current job's CCSID.
4513498266Sopenharmony_ci  Wrapper procedures with variable arguments are described below:
4613498266Sopenharmony_ci
4713498266Sopenharmony_ci_ curl_easy_setopt_ccsid()
4813498266Sopenharmony_ci  Variable arguments are a string pointer and a CCSID (unsigned int) for
4913498266Sopenharmony_cioptions:
5013498266Sopenharmony_ci        CURLOPT_ABSTRACT_UNIX_SOCKET
5113498266Sopenharmony_ci        CURLOPT_ACCEPT_ENCODING
5213498266Sopenharmony_ci        CURLOPT_ALTSVC
5313498266Sopenharmony_ci        CURLOPT_AWS_SIGV4
5413498266Sopenharmony_ci        CURLOPT_CAINFO
5513498266Sopenharmony_ci        CURLOPT_CAPATH
5613498266Sopenharmony_ci        CURLOPT_COOKIE
5713498266Sopenharmony_ci        CURLOPT_COOKIEFILE
5813498266Sopenharmony_ci        CURLOPT_COOKIEJAR
5913498266Sopenharmony_ci        CURLOPT_COOKIELIST
6013498266Sopenharmony_ci        CURLOPT_CRLFILE
6113498266Sopenharmony_ci        CURLOPT_CUSTOMREQUEST
6213498266Sopenharmony_ci        CURLOPT_DEFAULT_PROTOCOL
6313498266Sopenharmony_ci        CURLOPT_DNS_INTERFACE
6413498266Sopenharmony_ci        CURLOPT_DNS_LOCAL_IP4
6513498266Sopenharmony_ci        CURLOPT_DNS_LOCAL_IP6
6613498266Sopenharmony_ci        CURLOPT_DNS_SERVERS
6713498266Sopenharmony_ci        CURLOPT_DOH_URL
6813498266Sopenharmony_ci        CURLOPT_EGDSOCKET
6913498266Sopenharmony_ci        CURLOPT_FTPPORT
7013498266Sopenharmony_ci        CURLOPT_FTP_ACCOUNT
7113498266Sopenharmony_ci        CURLOPT_FTP_ALTERNATIVE_TO_USER
7213498266Sopenharmony_ci        CURLOPT_HAPROXY_CLIENT_IP
7313498266Sopenharmony_ci        CURLOPT_HSTS
7413498266Sopenharmony_ci        CURLOPT_INTERFACE
7513498266Sopenharmony_ci        CURLOPT_ISSUERCERT
7613498266Sopenharmony_ci        CURLOPT_KEYPASSWD
7713498266Sopenharmony_ci        CURLOPT_KRBLEVEL
7813498266Sopenharmony_ci        CURLOPT_LOGIN_OPTIONS
7913498266Sopenharmony_ci        CURLOPT_MAIL_AUTH
8013498266Sopenharmony_ci        CURLOPT_MAIL_FROM
8113498266Sopenharmony_ci        CURLOPT_NETRC_FILE
8213498266Sopenharmony_ci        CURLOPT_NOPROXY
8313498266Sopenharmony_ci        CURLOPT_PASSWORD
8413498266Sopenharmony_ci        CURLOPT_PINNEDPUBLICKEY
8513498266Sopenharmony_ci        CURLOPT_PRE_PROXY
8613498266Sopenharmony_ci        CURLOPT_PROTOCOLS_STR
8713498266Sopenharmony_ci        CURLOPT_PROXY
8813498266Sopenharmony_ci        CURLOPT_PROXYPASSWORD
8913498266Sopenharmony_ci        CURLOPT_PROXYUSERNAME
9013498266Sopenharmony_ci        CURLOPT_PROXYUSERPWD
9113498266Sopenharmony_ci        CURLOPT_PROXY_CAINFO
9213498266Sopenharmony_ci        CURLOPT_PROXY_CAPATH
9313498266Sopenharmony_ci        CURLOPT_PROXY_CRLFILE
9413498266Sopenharmony_ci        CURLOPT_PROXY_ISSUERCERT
9513498266Sopenharmony_ci        CURLOPT_PROXY_KEYPASSWD
9613498266Sopenharmony_ci        CURLOPT_PROXY_PINNEDPUBLICKEY
9713498266Sopenharmony_ci        CURLOPT_PROXY_SERVICE_NAME
9813498266Sopenharmony_ci        CURLOPT_PROXY_SSLCERT
9913498266Sopenharmony_ci        CURLOPT_PROXY_SSLCERTTYPE
10013498266Sopenharmony_ci        CURLOPT_PROXY_SSLKEY
10113498266Sopenharmony_ci        CURLOPT_PROXY_SSLKEYTYPE
10213498266Sopenharmony_ci        CURLOPT_PROXY_SSL_CIPHER_LIST
10313498266Sopenharmony_ci        CURLOPT_PROXY_TLS13_CIPHERS
10413498266Sopenharmony_ci        CURLOPT_PROXY_TLSAUTH_PASSWORD
10513498266Sopenharmony_ci        CURLOPT_PROXY_TLSAUTH_TYPE
10613498266Sopenharmony_ci        CURLOPT_PROXY_TLSAUTH_USERNAME
10713498266Sopenharmony_ci        CURLOPT_RANDOM_FILE
10813498266Sopenharmony_ci        CURLOPT_RANGE
10913498266Sopenharmony_ci        CURLOPT_REDIR_PROTOCOLS_STR
11013498266Sopenharmony_ci        CURLOPT_REFERER
11113498266Sopenharmony_ci        CURLOPT_REQUEST_TARGET
11213498266Sopenharmony_ci        CURLOPT_RTSP_SESSION_ID
11313498266Sopenharmony_ci        CURLOPT_RTSP_STREAM_URI
11413498266Sopenharmony_ci        CURLOPT_RTSP_TRANSPORT
11513498266Sopenharmony_ci        CURLOPT_SASL_AUTHZID
11613498266Sopenharmony_ci        CURLOPT_SERVICE_NAME
11713498266Sopenharmony_ci        CURLOPT_SOCKS5_GSSAPI_SERVICE
11813498266Sopenharmony_ci        CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
11913498266Sopenharmony_ci        CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256
12013498266Sopenharmony_ci        CURLOPT_SSH_KNOWNHOSTS
12113498266Sopenharmony_ci        CURLOPT_SSH_PRIVATE_KEYFILE
12213498266Sopenharmony_ci        CURLOPT_SSH_PUBLIC_KEYFILE
12313498266Sopenharmony_ci        CURLOPT_SSLCERT
12413498266Sopenharmony_ci        CURLOPT_SSLCERTTYPE
12513498266Sopenharmony_ci        CURLOPT_SSLENGINE
12613498266Sopenharmony_ci        CURLOPT_SSLKEY
12713498266Sopenharmony_ci        CURLOPT_SSLKEYTYPE
12813498266Sopenharmony_ci        CURLOPT_SSL_CIPHER_LIST
12913498266Sopenharmony_ci        CURLOPT_SSL_EC_CURVES
13013498266Sopenharmony_ci        CURLOPT_TLS13_CIPHERS
13113498266Sopenharmony_ci        CURLOPT_TLSAUTH_PASSWORD
13213498266Sopenharmony_ci        CURLOPT_TLSAUTH_TYPE
13313498266Sopenharmony_ci        CURLOPT_TLSAUTH_USERNAME
13413498266Sopenharmony_ci        CURLOPT_UNIX_SOCKET_PATH
13513498266Sopenharmony_ci        CURLOPT_URL
13613498266Sopenharmony_ci        CURLOPT_USERAGENT
13713498266Sopenharmony_ci        CURLOPT_USERNAME
13813498266Sopenharmony_ci        CURLOPT_USERPWD
13913498266Sopenharmony_ci        CURLOPT_XOAUTH2_BEARER
14013498266Sopenharmony_ci  All blob options are also supported.
14113498266Sopenharmony_ci  In all other cases, it ignores the ccsid parameter and behaves as
14213498266Sopenharmony_cicurl_easy_setopt().
14313498266Sopenharmony_ci  Note that CURLOPT_ERRORBUFFER is not in the list above, since it gives the
14413498266Sopenharmony_ciaddress of an (empty) character buffer, not the address of a string.
14513498266Sopenharmony_ciCURLOPT_POSTFIELDS stores the address of static binary data (of type void *)
14613498266Sopenharmony_ciand thus is not converted. If CURLOPT_COPYPOSTFIELDS is issued after
14713498266Sopenharmony_ciCURLOPT_POSTFIELDSIZE != -1, the data size is adjusted according to the
14813498266Sopenharmony_ciCCSID conversion result length.
14913498266Sopenharmony_ci
15013498266Sopenharmony_ci_ curl_formadd_ccsid()
15113498266Sopenharmony_ci  In the variable argument list, string pointers should be followed by a (long)
15213498266Sopenharmony_ciCCSID for the following options:
15313498266Sopenharmony_ci        CURLFORM_BUFFER
15413498266Sopenharmony_ci        CURLFORM_CONTENTTYPE
15513498266Sopenharmony_ci        CURLFORM_COPYCONTENTS
15613498266Sopenharmony_ci        CURLFORM_COPYNAME
15713498266Sopenharmony_ci        CURLFORM_FILE
15813498266Sopenharmony_ci        CURLFORM_FILECONTENT
15913498266Sopenharmony_ci        CURLFORM_FILENAME
16013498266Sopenharmony_ci        CURLFORM_PTRNAME
16113498266Sopenharmony_ci  If taken from an argument array, an additional array entry must follow each
16213498266Sopenharmony_cientry containing one of the above option. This additional entry holds the CCSID
16313498266Sopenharmony_ciin its value field, and the option field is meaningless.
16413498266Sopenharmony_ci  It is not possible to have a string pointer and its CCSID across a function
16513498266Sopenharmony_ciparameter/array boundary.
16613498266Sopenharmony_ci  Please note that CURLFORM_PTRCONTENTS and CURLFORM_BUFFERPTR are considered
16713498266Sopenharmony_ciunconvertible strings and thus are NOT followed by a CCSID.
16813498266Sopenharmony_ci
16913498266Sopenharmony_ci_ curl_easy_getinfo_ccsid()
17013498266Sopenharmony_ci  The following options are followed by a 'char * *' and a CCSID. Unlike
17113498266Sopenharmony_cicurl_easy_getinfo(), the value returned in the pointer should be released with
17213498266Sopenharmony_cicurl_free() after use:
17313498266Sopenharmony_ci        CURLINFO_CONTENT_TYPE
17413498266Sopenharmony_ci        CURLINFO_EFFECTIVE_URL
17513498266Sopenharmony_ci        CURLINFO_FTP_ENTRY_PATH
17613498266Sopenharmony_ci        CURLINFO_LOCAL_IP
17713498266Sopenharmony_ci        CURLINFO_PRIMARY_IP
17813498266Sopenharmony_ci        CURLINFO_REDIRECT_URL
17913498266Sopenharmony_ci        CURLINFO_REFERER
18013498266Sopenharmony_ci        CURLINFO_RTSP_SESSION_ID
18113498266Sopenharmony_ci        CURLINFO_SCHEME
18213498266Sopenharmony_ci  Likewise, the following options are followed by a struct curl_slist * * and a
18313498266Sopenharmony_ciCCSID.
18413498266Sopenharmony_ci        CURLINFO_COOKIELIST
18513498266Sopenharmony_ci        CURLINFO_SSL_ENGINES
18613498266Sopenharmony_ciLists returned should be released with curl_slist_free_all() after use.
18713498266Sopenharmony_ci  Option CURLINFO_CERTINFO is followed by a struct curl_certinfo * * and a
18813498266Sopenharmony_ciCCSID. Returned structures should be freed with curl_certinfo_free_all()
18913498266Sopenharmony_ciafter use.
19013498266Sopenharmony_ci  Other options are processed like in curl_easy_getinfo().
19113498266Sopenharmony_ci
19213498266Sopenharmony_ci_ curl_easy_strerror_ccsid(), curl_multi_strerror_ccsid(),
19313498266Sopenharmony_cicurl_share_strerror_ccsid() and curl_url_strerror_ccsid() work as their
19413498266Sopenharmony_cinon-ccsid version and return a string encoded in the additional ccsid
19513498266Sopenharmony_ciparameter. These strings belong to libcurl and may not be freed by the caller.
19613498266Sopenharmony_ciA subsequent call to the same procedure in the same thread invalidates the
19713498266Sopenharmony_ciprevious result.
19813498266Sopenharmony_ci
19913498266Sopenharmony_ci_ curl_pushheader_bynum_cssid() and curl_pushheader_byname_ccsid()
20013498266Sopenharmony_ci  Although the prototypes are self-explanatory, the returned string pointer
20113498266Sopenharmony_cishould be released with curl_free() after use, as opposite to the non-ccsid
20213498266Sopenharmony_civersions of these procedures.
20313498266Sopenharmony_ci  Please note that HTTP2 is not (yet) implemented on OS/400, thus these
20413498266Sopenharmony_cifunctions will always return NULL.
20513498266Sopenharmony_ci
20613498266Sopenharmony_ci_ curl_easy_option_by_name_ccsid() returns a pointer to an untranslated option
20713498266Sopenharmony_cimetadata structure. As each curl_easyoption structure holds the option name in
20813498266Sopenharmony_ciASCII, the curl_easy_option_get_name_ccsid() function allows getting it in any
20913498266Sopenharmony_cisupported ccsid. However the caller should release the returned pointer with
21013498266Sopenharmony_cicurl_free() after use.
21113498266Sopenharmony_ci
21213498266Sopenharmony_ci_ curl_easy_header_ccsid() works as its non-CCSID counterpart but requires an
21313498266Sopenharmony_ciadditional ccsid parameter specifying the name parameter encoding. The output
21413498266Sopenharmony_cihout parameter is kept in libcurl's encoding and should not be altered.
21513498266Sopenharmony_ci
21613498266Sopenharmony_ci_ curl_from_ccsid() and curl_to_ccsid() are string encoding conversion
21713498266Sopenharmony_cifunctions between ASCII (latin1) and the given CCSID. The first parameter is
21813498266Sopenharmony_cithe source string, the second is the CCSID and the returned value is a pointer
21913498266Sopenharmony_cito the dynamically allocated string. These functions do not impact on Curl's
22013498266Sopenharmony_cibehavior and are only provided for user convenience. After use, returned values
22113498266Sopenharmony_cimust be released with curl_free().
22213498266Sopenharmony_ci
22313498266Sopenharmony_ci
22413498266Sopenharmony_ci  Standard compilation environment does support neither autotools nor make;
22513498266Sopenharmony_ciin fact, very few common utilities are available. As a consequence, the
22613498266Sopenharmony_ciconfig-os400.h has been coded manually and the compilation scripts are
22713498266Sopenharmony_cia set of shell scripts stored in subdirectory packages/OS400.
22813498266Sopenharmony_ci
22913498266Sopenharmony_ci  The "curl" command and the test environment are currently not supported on
23013498266Sopenharmony_ciOS/400.
23113498266Sopenharmony_ci
23213498266Sopenharmony_ci
23313498266Sopenharmony_ciProtocols currently implemented on OS/400:
23413498266Sopenharmony_ci_ DICT
23513498266Sopenharmony_ci_ FILE
23613498266Sopenharmony_ci_ FTP
23713498266Sopenharmony_ci_ FTPS
23813498266Sopenharmony_ci_ FTP with secure transmission
23913498266Sopenharmony_ci_ GOPHER
24013498266Sopenharmony_ci_ HTTP
24113498266Sopenharmony_ci_ HTTPS
24213498266Sopenharmony_ci_ IMAP
24313498266Sopenharmony_ci_ IMAPS
24413498266Sopenharmony_ci_ IMAP with secure transmission
24513498266Sopenharmony_ci_ LDAP
24613498266Sopenharmony_ci_ POP3
24713498266Sopenharmony_ci_ POP3S
24813498266Sopenharmony_ci_ POP3 with secure transmission
24913498266Sopenharmony_ci_ RTSP
25013498266Sopenharmony_ci_ SCP if libssh2 is enabled
25113498266Sopenharmony_ci_ SFTP if libssh2 is enabled
25213498266Sopenharmony_ci_ SMTP
25313498266Sopenharmony_ci_ SMTPS
25413498266Sopenharmony_ci_ SMTP with secure transmission
25513498266Sopenharmony_ci_ TELNET
25613498266Sopenharmony_ci_ TFTP
25713498266Sopenharmony_ci
25813498266Sopenharmony_ci
25913498266Sopenharmony_ci
26013498266Sopenharmony_ciCompiling on OS/400:
26113498266Sopenharmony_ci
26213498266Sopenharmony_ci  These instructions targets people who knows about OS/400, compiling, IFS and
26313498266Sopenharmony_ciarchive extraction. Do not ask questions about these subjects if you're not
26413498266Sopenharmony_cifamiliar with.
26513498266Sopenharmony_ci
26613498266Sopenharmony_ci_ As a prerequisite, QADRT development environment must be installed.
26713498266Sopenharmony_ci  For more information on downloading and installing the QADRT development kit,
26813498266Sopenharmony_ci  please see https://www.ibm.com/support/pages/node/6258183
26913498266Sopenharmony_ci_ If data compression has to be supported, ZLIB development environment must
27013498266Sopenharmony_ci  be installed.
27113498266Sopenharmony_ci_ Likewise, if SCP and SFTP protocols have to be compiled in, LIBSSH2
27213498266Sopenharmony_ci  developent environment must be installed.
27313498266Sopenharmony_ci_ Install the curl source directory in IFS. Do NOT install it in the
27413498266Sopenharmony_ci  installation target directory (which defaults to /curl).
27513498266Sopenharmony_ci_ Enter Qshell (QSH, not PASE)
27613498266Sopenharmony_ci_ Change current directory to the curl installation directory
27713498266Sopenharmony_ci_ Change current directory to ./packages/OS400
27813498266Sopenharmony_ci- If you want to change the default configuration parameters like debug info
27913498266Sopenharmony_ci  generation, optimization level, listing option, target library, ZLIB/LIBSSH2
28013498266Sopenharmony_ci  availability and location, etc., copy file config400.default to
28113498266Sopenharmony_ci  config400.override and edit the latter. Do not edit the original default file
28213498266Sopenharmony_ci  as it might be overwritten by a subsequent source installation.
28313498266Sopenharmony_ci_ Copy any file in the current directory to makelog (i.e.:
28413498266Sopenharmony_ci  cp initscript.sh makelog): this is intended to create the makelog file with
28513498266Sopenharmony_ci  an ASCII CCSID!
28613498266Sopenharmony_ci_ Enter the command "sh makefile.sh > makelog 2>&1"
28713498266Sopenharmony_ci_ Examine the makelog file to check for compilation errors. CZM0383 warnings on
28813498266Sopenharmony_ci  C or system standard API come from QADRT inlining and can safely be ignored.
28913498266Sopenharmony_ci
29013498266Sopenharmony_ci  Without configuration parameters override, this will produce the following
29113498266Sopenharmony_ciOS/400 objects:
29213498266Sopenharmony_ci_ Library CURL. All other objects will be stored in this library.
29313498266Sopenharmony_ci_ Modules for all libcurl units.
29413498266Sopenharmony_ci_ Binding directory CURL_A, to be used at calling program link time for
29513498266Sopenharmony_ci  statically binding the modules (specify BNDSRVPGM(QADRTTS QGLDCLNT QGLDBRDR)
29613498266Sopenharmony_ci  when creating a program using CURL_A).
29713498266Sopenharmony_ci_ Service program CURL.<soname>, where <soname> is extracted from the
29813498266Sopenharmony_ci  lib/Makefile.am VERSION variable. To be used at calling program run-time
29913498266Sopenharmony_ci  when this program has dynamically bound curl at link time.
30013498266Sopenharmony_ci_ Binding directory CURL. To be used to dynamically bind libcurl when linking a
30113498266Sopenharmony_ci  calling program.
30213498266Sopenharmony_ci- CLI tool bound program CURL.
30313498266Sopenharmony_ci- CLI command CURL.
30413498266Sopenharmony_ci_ Source file H. It contains all the include members needed to compile a C/C++
30513498266Sopenharmony_ci  module using libcurl, and an ILE/RPG /copy member for support in this
30613498266Sopenharmony_ci  language.
30713498266Sopenharmony_ci_ Standard C/C++ libcurl include members in file H.
30813498266Sopenharmony_ci_ CCSIDCURL member in file H. This defines the non-standard EBCDIC wrappers for
30913498266Sopenharmony_ci  C and C++.
31013498266Sopenharmony_ci_ CURL.INC member in file H. This defines everything needed by an ILE/RPG
31113498266Sopenharmony_ci  program using libcurl.
31213498266Sopenharmony_ci_ IFS directory /curl/include/curl containing the C header files for IFS source
31313498266Sopenharmony_ci  C/C++ compilation and curl.inc.rpgle for IFS source ILE/RPG compilation.
31413498266Sopenharmony_ci- IFS link /curl/bin/curl to CLI tool program.
31513498266Sopenharmony_ci
31613498266Sopenharmony_ci
31713498266Sopenharmony_ciSpecial programming consideration:
31813498266Sopenharmony_ci
31913498266Sopenharmony_ciQADRT being used, the following points must be considered:
32013498266Sopenharmony_ci_ If static binding is used, service program QADRTTS must be linked too.
32113498266Sopenharmony_ci_ The EBCDIC CCSID used by QADRT is 37 by default, NOT THE JOB'S CCSID. If
32213498266Sopenharmony_ci  another EBCDIC CCSID is required, it must be set via a locale through a call
32313498266Sopenharmony_ci  to setlocale_a (QADRT's setlocale() ASCII wrapper) with category LC_ALL or
32413498266Sopenharmony_ci  LC_CTYPE, or by setting environment variable QADRT_ENV_LOCALE to the locale
32513498266Sopenharmony_ci  object path before executing the program.
32613498266Sopenharmony_ci_ Do not use original source include files unless you know what you are doing.
32713498266Sopenharmony_ci  Use the installed members instead (in /QSYS.LIB/CURL.LIB/H.FILE and
32813498266Sopenharmony_ci  /curl/include/curl).
32913498266Sopenharmony_ci
33013498266Sopenharmony_ci
33113498266Sopenharmony_ci
33213498266Sopenharmony_ciILE/RPG support:
33313498266Sopenharmony_ci
33413498266Sopenharmony_ci  Since most of the ILE OS/400 programmers use ILE/RPG exclusively, a
33513498266Sopenharmony_cidefinition /INCLUDE member is provided for this language. To include all
33613498266Sopenharmony_cilibcurl definitions in an ILE/RPG module, line
33713498266Sopenharmony_ci
33813498266Sopenharmony_ci     h bnddir('CURL/CURL')
33913498266Sopenharmony_ci
34013498266Sopenharmony_cimust figure in the program header, and line
34113498266Sopenharmony_ci
34213498266Sopenharmony_ci     d/include curl/h,curl.inc
34313498266Sopenharmony_ci
34413498266Sopenharmony_ciin the global data section of the module's source code.
34513498266Sopenharmony_ci
34613498266Sopenharmony_ci  No vararg procedure support exists in ILE/RPG: for this reason, the following
34713498266Sopenharmony_ciconsiderations apply:
34813498266Sopenharmony_ci_ Procedures curl_easy_setopt_long(), curl_easy_setopt_object(),
34913498266Sopenharmony_ci  curl_easy_setopt_function(), curl_easy_setopt_offset() and
35013498266Sopenharmony_ci  curl_easy_setopt_blob() are all alias prototypes to curl_easy_setopt(), but
35113498266Sopenharmony_ci  with different parameter lists.
35213498266Sopenharmony_ci_ Procedures curl_easy_getinfo_string(), curl_easy_getinfo_long(),
35313498266Sopenharmony_ci  curl_easy_getinfo_double(), curl_easy_getinfo_slist(),
35413498266Sopenharmony_ci  curl_easy_getinfo_ptr(), curl_easy_getinfo_socket() and
35513498266Sopenharmony_ci  curl_easy_getinfo_off_t() are all alias prototypes to curl_easy_getinfo(),
35613498266Sopenharmony_ci  but with different parameter lists.
35713498266Sopenharmony_ci_ Procedures curl_multi_setopt_long(), curl_multi_setopt_object(),
35813498266Sopenharmony_ci  curl_multi_setopt_function() and curl_multi_setopt_offset() are all alias
35913498266Sopenharmony_ci  prototypes to curl_multi_setopt(), but with different parameter lists.
36013498266Sopenharmony_ci_ Procedures curl_share_setopt_int(), curl_share_setopt_ptr() and
36113498266Sopenharmony_ci  curl_share_setopt_proc() are all alias prototypes to curl_share_setopt,
36213498266Sopenharmony_ci  but with different parameter lists.
36313498266Sopenharmony_ci_ Procedure curl_easy_setopt_blob_ccsid() is an alias of
36413498266Sopenharmony_ci  curl_easy_setopt_ccsid() supporting blob encoding conversion.
36513498266Sopenharmony_ci_ The prototype of procedure curl_formadd() allows specifying a pointer option
36613498266Sopenharmony_ci  and the CURLFORM_END option. This makes possible to use an option array
36713498266Sopenharmony_ci  without any additional definition. If some specific incompatible argument
36813498266Sopenharmony_ci  list is used in the ILE/RPG program, the latter must define a specialised
36913498266Sopenharmony_ci  alias. The same applies to curl_formadd_ccsid() too.
37013498266Sopenharmony_ci_ Since V7R4M0, procedure overloading is used to emulate limited "vararg-like"
37113498266Sopenharmony_ci  definitions of curl_easy_setopt(), curl_multi_setopt(), curl_share_setopt()
37213498266Sopenharmony_ci  and curl_easy_getinfo(). Blob and CCSID alternatives are NOT included in
37313498266Sopenharmony_ci  overloading.
37413498266Sopenharmony_ci
37513498266Sopenharmony_ci  Since RPG cannot cast a long to a pointer, procedure curl_form_long_value()
37613498266Sopenharmony_ciis provided for that purpose: this allows storing a long value in the
37713498266Sopenharmony_cicurl_forms array. Please note the form API is deprecated and the MIME API
37813498266Sopenharmony_cishould be used instead.
37913498266Sopenharmony_ci
38013498266Sopenharmony_ci
38113498266Sopenharmony_ciCLI tool:
38213498266Sopenharmony_ci
38313498266Sopenharmony_ci  The build system provides it as a bound program, an IFS link to it and a
38413498266Sopenharmony_cisimple CL command. The latter however is not able to provide a different
38513498266Sopenharmony_ciparameter for each option since there are too many of those; instead,
38613498266Sopenharmony_ciparameters are entered in a single field subject to quoting and escaping, in
38713498266Sopenharmony_cithe same form as expected by the standard CLI program.
38813498266Sopenharmony_ci  Care must be taken about the program output encoding: by default, it is sent
38913498266Sopenharmony_cito the standard output and is thus subject to transcoding. It is therefore
39013498266Sopenharmony_cirecommended to use option "--output" to redirect output to a specific IFS file.
39113498266Sopenharmony_ciSimilar problems may occur about the standard input encoding.
392