OS400: make it compilable again. Make RPG binding up to date.

This commit is contained in:
Patrick Monnerat 2014-06-18 20:22:44 +02:00
parent fdee523452
commit ce656065ba
3 changed files with 67 additions and 25 deletions

View File

@ -717,6 +717,11 @@
d CURLFTPMETHOD_SINGLECWD... d CURLFTPMETHOD_SINGLECWD...
d c 3 d c 3
* *
d CURLHEADER_UNIFIED...
d c X'00000000'
d CURLHEADER_SEPARATE...
d c X'00000001'
*
d CURLPROTO_HTTP... d CURLPROTO_HTTP...
d c X'00000001' d c X'00000001'
d CURLPROTO_HTTPS... d CURLPROTO_HTTPS...
@ -771,7 +776,6 @@
d c X'02000000' d c X'02000000'
* *
d CURLoption s 10i 0 based(######ptr######) Enum d CURLoption s 10i 0 based(######ptr######) Enum
d CURLOPT_FILE c 10001
d CURLOPT_WRITEDATA... d CURLOPT_WRITEDATA...
d c 10001 d c 10001
d CURLOPT_URL c 10002 d CURLOPT_URL c 10002
@ -782,8 +786,6 @@
d CURLOPT_PROXYUSERPWD... d CURLOPT_PROXYUSERPWD...
d c 10006 d c 10006
d CURLOPT_RANGE c 10007 d CURLOPT_RANGE c 10007
d CURLOPT_INFILE...
d c 10009
d CURLOPT_READDATA... d CURLOPT_READDATA...
d c 10009 d c 10009
d CURLOPT_ERRORBUFFER... d CURLOPT_ERRORBUFFER...
@ -824,8 +826,6 @@
d c 10026 d c 10026
d CURLOPT_CRLF c 00027 d CURLOPT_CRLF c 00027
d CURLOPT_QUOTE c 10028 d CURLOPT_QUOTE c 10028
d CURLOPT_WRITEHEADER...
d c 10029
d CURLOPT_HEADERDATA... d CURLOPT_HEADERDATA...
d c 10029 d c 10029
d CURLOPT_COOKIEFILE... d CURLOPT_COOKIEFILE...
@ -842,8 +842,6 @@
d c 10037 d c 10037
d CURLOPT_POSTQUOTE... d CURLOPT_POSTQUOTE...
d c 10039 d c 10039
d CURLOPT_WRITEINFO...
d c 10040
d CURLOPT_VERBOSE... d CURLOPT_VERBOSE...
d c 00041 d c 00041
d CURLOPT_HEADER... d CURLOPT_HEADER...
@ -897,8 +895,6 @@
d c 10070 d c 10070
d CURLOPT_MAXCONNECTS... d CURLOPT_MAXCONNECTS...
d c 00071 d c 00071
d CURLOPT_CLOSEPOLICY...
d c 00072
d CURLOPT_FRESH_CONNECT... d CURLOPT_FRESH_CONNECT...
d c 00074 d c 00074
d CURLOPT_FORBID_REUSE... d CURLOPT_FORBID_REUSE...
@ -1188,16 +1184,29 @@
d c 00226 d c 00226
d CURLOPT_EXPECT_100_TIMEOUT_MS... d CURLOPT_EXPECT_100_TIMEOUT_MS...
d c 00227 d c 00227
d CURLOPT_PROXYHEADER...
d c 10228
d CURLOPT_HEADEROPT...
d c 00229
* *
/if not defined(CURL_NO_OLDIES) /if not defined(CURL_NO_OLDIES)
d CURLOPT_FILE c 10001
d CURLOPT_INFILE...
d c 10009
d CURLOPT_SSLKEYPASSWD... d CURLOPT_SSLKEYPASSWD...
d c 10026 d c 10026
d CURLOPT_SSLCERTPASSWD... d CURLOPT_SSLCERTPASSWD...
d c 10026 d c 10026
d CURLOPT_WRITEHEADER...
d c 10029
d CURLOPT_WRITEINFO...
d c 10040
d CURLOPT_FTPLISTONLY... d CURLOPT_FTPLISTONLY...
d c 00048 d c 00048
d CURLOPT_FTPAPPEND... d CURLOPT_FTPAPPEND...
d c 00050 d c 00050
d CURLOPT_CLOSEPOLICY...
d c 00072
d CURLOPT_KRB4LEVEL... d CURLOPT_KRB4LEVEL...
d c 10063 d c 10063
d CURLOPT_ENCODING... d CURLOPT_ENCODING...

View File

@ -119,6 +119,41 @@ action_needed()
} }
# canonicalize_path path
#
# Return canonicalized path as:
# - Absolute
# - No . or .. component.
canonicalize_path()
{
if expr "${1}" : '^/' > /dev/null
then P="${1}"
else P="`pwd`/${1}"
fi
R=
IFSSAVE="${IFS}"
IFS="/"
for C in ${P}
do IFS="${IFSSAVE}"
case "${C}" in
.) ;;
..) R=`expr "${R}" : '^\(.*/\)..*'`
;;
?*) R="${R}${C}/"
;;
*) ;;
esac
done
IFS="${IFSSAVE}"
echo "/`expr "${R}" : '^\(.*\)/'`"
}
# make_module module_name source_name [additional_definitions] # make_module module_name source_name [additional_definitions]
# #
# Compile source name into ASCII module if needed. # Compile source name into ASCII module if needed.
@ -131,6 +166,7 @@ make_module()
MODULES="${MODULES} ${1}" MODULES="${MODULES} ${1}"
MODIFSNAME="${LIBIFSNAME}/${1}.MODULE" MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
action_needed "${MODIFSNAME}" "${2}" || return 0; action_needed "${MODIFSNAME}" "${2}" || return 0;
SRCDIR=`dirname \`canonicalize_path "${2}"\``
# #pragma convert has to be in the source file itself, i.e. # #pragma convert has to be in the source file itself, i.e.
# putting it in an include file makes it only active # putting it in an include file makes it only active
@ -147,7 +183,7 @@ make_module()
CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST)" CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST)"
CMD="${CMD} LOCALETYPE(*LOCALE)" CMD="${CMD} LOCALETYPE(*LOCALE)"
CMD="${CMD} INCDIR('/qibm/proddata/qadrt/include'" CMD="${CMD} INCDIR('/qibm/proddata/qadrt/include'"
CMD="${CMD} '${TOPDIR}/include/curl' '${TOPDIR}/include'" CMD="${CMD} '${TOPDIR}/include/curl' '${TOPDIR}/include' '${SRCDIR}'"
CMD="${CMD} '${TOPDIR}/packages/OS400'" CMD="${CMD} '${TOPDIR}/packages/OS400'"
if [ "${WITH_ZLIB}" != "0" ] if [ "${WITH_ZLIB}" != "0" ]

View File

@ -21,21 +21,18 @@ MODULES=
# Get source list. # Get source list.
CSOURCES() sed -e ':begin' \
-e '/\\$/{' \
{ -e 's/\\$/ /' \
shift # Drop the equal sign. -e 'N' \
CSOURCES="$*" # Get the file names. -e 'bbegin' \
} -e '}' \
-e 's/\n//g' \
HHEADERS() -e 's/[[:space:]]*$//' \
-e 's/^\([A-Za-z][A-Za-z0-9_]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1="\2"/' \
{ -e 's/\$(\([A-Za-z][A-Za-z0-9_]*\))/${\1}/g' \
shift # Drop the equal sign. < Makefile.inc > tmpscript.sh
HHEADERS="$*" # Get the file names. . ./tmpscript.sh
}
. Makefile.inc
# Compile the sources into modules. # Compile the sources into modules.