os400: do not check translatable options at build time

Now that there is a test for this, the build time check is not needed
anymore.

Closes #11650
This commit is contained in:
Patrick Monnerat 2023-08-11 01:03:37 +02:00 коммит произвёл Daniel Stenberg
Родитель ae806395ab
Коммит 821d108fc9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 5CC908FDB71E12C2
3 изменённых файлов: 0 добавлений и 83 удалений

Просмотреть файл

@ -28,7 +28,6 @@ EXTRA_DIST = README.md \
OS400/rpg-examples \
OS400/ccsidcurl.c \
OS400/ccsidcurl.h \
OS400/chkstrings.c \
OS400/curl.inc.in \
OS400/initscript.sh \
OS400/make-include.sh \

Просмотреть файл

@ -1,64 +0,0 @@
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* SPDX-License-Identifier: curl
*
***************************************************************************/
#include <stdlib.h>
#pragma enum(int)
#include "curl_setup.h"
#include "urldata.h"
/* The following defines indicate the expected dupstring enum values in
* curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c. If a mismatch is
* flagged during the build, it indicates that curl_easy_setopt_ccsid() may
* need updating to perform data EBCDIC to ASCII data conversion on the
* string.
*
* Once any applicable changes to curl_easy_setopt_ccsid() have been
* made, the EXPECTED_STRING_LASTZEROTERMINATED/EXPECTED_STRING_LAST
* values can be updated to match the latest enum values in urldata.h.
*/
#define EXPECTED_STRING_LASTZEROTERMINATED (STRING_HAPROXY_CLIENT_IP + 1)
#define EXPECTED_STRING_LAST (STRING_COPYPOSTFIELDS + 1)
int main(int argc, char *argv[])
{
int rc = 0;
if(STRING_LASTZEROTERMINATED != EXPECTED_STRING_LASTZEROTERMINATED) {
fprintf(stderr,
"STRING_LASTZEROTERMINATED(%d) is not expected value(%d).\n",
STRING_LASTZEROTERMINATED, EXPECTED_STRING_LASTZEROTERMINATED);
rc += 1;
}
if(STRING_LAST != EXPECTED_STRING_LAST) {
fprintf(stderr, "STRING_LAST(%d) is not expected value(%d).\n",
STRING_LAST, EXPECTED_STRING_LAST);
rc += 2;
}
if(rc) {
fprintf(stderr, "curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c"
" may need updating if new strings are provided as"
" input via the curl API.\n");
}
return rc;
}

Просмотреть файл

@ -69,24 +69,6 @@ sed -e ':begin' \
INCLUDES="'`pwd`'"
# Create a small C program to check ccsidcurl.c is up to date
if action_needed "${LIBIFSNAME}/CHKSTRINGS.PGM" "${SCRIPTDIR}/chkstrings.c"
then CMD="CRTBNDC PGM(${TARGETLIB}/CHKSTRINGS)"
CMD="${CMD} SRCSTMF('${SCRIPTDIR}/chkstrings.c')"
CMD="${CMD} INCDIR('${TOPDIR}/include/curl' '${TOPDIR}/include'"
CMD="${CMD} '${SRCDIR}' ${INCLUDES})"
CMD="${CMD} TGTCCSID(${TGTCCSID})"
if CLcommand -i "${CMD}"
then if "${LIBIFSNAME}/CHKSTRINGS.PGM"
then :
else echo "ERROR: CHKSTRINGS failed!"
exit 2
fi
else echo "ERROR: Failed to build CHKSTRINGS *PGM object!"
exit 2
fi
fi
make_module OS400SYS "${SCRIPTDIR}/os400sys.c"
make_module CCSIDCURL "${SCRIPTDIR}/ccsidcurl.c"