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 c 3
*
d CURLHEADER_UNIFIED...
d c X'00000000'
d CURLHEADER_SEPARATE...
d c X'00000001'
*
d CURLPROTO_HTTP...
d c X'00000001'
d CURLPROTO_HTTPS...
@ -771,7 +776,6 @@
d c X'02000000'
*
d CURLoption s 10i 0 based(######ptr######) Enum
d CURLOPT_FILE c 10001
d CURLOPT_WRITEDATA...
d c 10001
d CURLOPT_URL c 10002
@ -782,8 +786,6 @@
d CURLOPT_PROXYUSERPWD...
d c 10006
d CURLOPT_RANGE c 10007
d CURLOPT_INFILE...
d c 10009
d CURLOPT_READDATA...
d c 10009
d CURLOPT_ERRORBUFFER...
@ -824,8 +826,6 @@
d c 10026
d CURLOPT_CRLF c 00027
d CURLOPT_QUOTE c 10028
d CURLOPT_WRITEHEADER...
d c 10029
d CURLOPT_HEADERDATA...
d c 10029
d CURLOPT_COOKIEFILE...
@ -842,8 +842,6 @@
d c 10037
d CURLOPT_POSTQUOTE...
d c 10039
d CURLOPT_WRITEINFO...
d c 10040
d CURLOPT_VERBOSE...
d c 00041
d CURLOPT_HEADER...
@ -897,8 +895,6 @@
d c 10070
d CURLOPT_MAXCONNECTS...
d c 00071
d CURLOPT_CLOSEPOLICY...
d c 00072
d CURLOPT_FRESH_CONNECT...
d c 00074
d CURLOPT_FORBID_REUSE...
@ -1188,16 +1184,29 @@
d c 00226
d CURLOPT_EXPECT_100_TIMEOUT_MS...
d c 00227
d CURLOPT_PROXYHEADER...
d c 10228
d CURLOPT_HEADEROPT...
d c 00229
*
/if not defined(CURL_NO_OLDIES)
d CURLOPT_FILE c 10001
d CURLOPT_INFILE...
d c 10009
d CURLOPT_SSLKEYPASSWD...
d c 10026
d CURLOPT_SSLCERTPASSWD...
d c 10026
d CURLOPT_WRITEHEADER...
d c 10029
d CURLOPT_WRITEINFO...
d c 10040
d CURLOPT_FTPLISTONLY...
d c 00048
d CURLOPT_FTPAPPEND...
d c 00050
d CURLOPT_CLOSEPOLICY...
d c 00072
d CURLOPT_KRB4LEVEL...
d c 10063
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]
#
# Compile source name into ASCII module if needed.
@ -131,6 +166,7 @@ make_module()
MODULES="${MODULES} ${1}"
MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
action_needed "${MODIFSNAME}" "${2}" || return 0;
SRCDIR=`dirname \`canonicalize_path "${2}"\``
# #pragma convert has to be in the source file itself, i.e.
# putting it in an include file makes it only active
@ -147,7 +183,7 @@ make_module()
CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST)"
CMD="${CMD} LOCALETYPE(*LOCALE)"
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'"
if [ "${WITH_ZLIB}" != "0" ]

View File

@ -21,21 +21,18 @@ MODULES=
# Get source list.
CSOURCES()
{
shift # Drop the equal sign.
CSOURCES="$*" # Get the file names.
}
HHEADERS()
{
shift # Drop the equal sign.
HHEADERS="$*" # Get the file names.
}
. Makefile.inc
sed -e ':begin' \
-e '/\\$/{' \
-e 's/\\$/ /' \
-e 'N' \
-e 'bbegin' \
-e '}' \
-e 's/\n//g' \
-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' \
< Makefile.inc > tmpscript.sh
. ./tmpscript.sh
# Compile the sources into modules.