From 821d108fc9adfb70faf9bc7c31b7e8d028188de6 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Fri, 11 Aug 2023 01:03:37 +0200 Subject: [PATCH] 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 --- packages/Makefile.am | 1 - packages/OS400/chkstrings.c | 64 ------------------------------------- packages/OS400/make-lib.sh | 18 ----------- 3 files changed, 83 deletions(-) delete mode 100644 packages/OS400/chkstrings.c diff --git a/packages/Makefile.am b/packages/Makefile.am index 1da49f68b8..5c262dd5e1 100644 --- a/packages/Makefile.am +++ b/packages/Makefile.am @@ -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 \ diff --git a/packages/OS400/chkstrings.c b/packages/OS400/chkstrings.c deleted file mode 100644 index 9841ec938a..0000000000 --- a/packages/OS400/chkstrings.c +++ /dev/null @@ -1,64 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) Daniel Stenberg, , 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 -#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; -} diff --git a/packages/OS400/make-lib.sh b/packages/OS400/make-lib.sh index 66e45fbb6e..55e7b6feb0 100755 --- a/packages/OS400/make-lib.sh +++ b/packages/OS400/make-lib.sh @@ -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"