1 /***************************************************************************
2 * _ _ ____ _
3 * Project ___| | | | _ \| |
4 * / __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
7 *
8 * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
9 *
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at https://curl.haxx.se/docs/copyright.html.
13 *
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ***************************************************************************/
22
23 #include <stdlib.h>
24 #pragma enum(int)
25 #include "curl_setup.h"
26 #include "urldata.h"
27
28 /* The following defines indicate the expected dupstring enum values
29 * in curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c. If a
30 * mismatch is flagged during the build, it indicates that curl_easy_setopt_ccsid()
31 * may need updating to perform data EBCDIC to ASCII data conversion on
32 * the string.
33 * Once any applicable changes to curl_easy_setopt_ccsid() have been
34 * made, the EXPECTED_STRING_LASTZEROTERMINATED/EXPECTED_STRING_LAST
35 * values can be updated to match the latest enum values in urldata.h.
36 */
37 #define EXPECTED_STRING_LASTZEROTERMINATED (STRING_DNS_LOCAL_IP6 + 1)
38 #define EXPECTED_STRING_LAST (STRING_COPYPOSTFIELDS + 1)
39
main(int argc,char * argv[])40 int main(int argc, char *argv[])
41 {
42 int rc = 0;
43
44 if (STRING_LASTZEROTERMINATED != EXPECTED_STRING_LASTZEROTERMINATED)
45 {
46 fprintf(stderr,"STRING_LASTZEROTERMINATED(%d) is not expected value(%d).\n",
47 STRING_LASTZEROTERMINATED, EXPECTED_STRING_LASTZEROTERMINATED);
48 rc += 1;
49 }
50 if (STRING_LAST != EXPECTED_STRING_LAST)
51 {
52 fprintf(stderr,"STRING_LAST(%d) is not expected value(%d).\n",
53 STRING_LAST, EXPECTED_STRING_LAST);
54 rc += 2;
55 }
56 if (rc != 0)
57 {
58 fprintf(stderr,"curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c"
59 " may need updating if new strings are provided as input via the curl API.\n");
60 }
61 return rc;
62 }
63