• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /***************************************************************************
2  *                                  _   _ ____  _
3  *  Project                     ___| | | |  _ \| |
4  *                             / __| | | | |_) | |
5  *                            | (__| |_| |  _ <| |___
6  *                             \___|\___/|_| \_\_____|
7  *
8  * Copyright (C) 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.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  * SPDX-License-Identifier: curl
22  *
23  ***************************************************************************/
24 
25 #include <stdlib.h>
26 #pragma enum(int)
27 #include "curl_setup.h"
28 #include "urldata.h"
29 
30 /* The following defines indicate the expected dupstring enum values in
31  * curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c. If a mismatch is
32  * flagged during the build, it indicates that curl_easy_setopt_ccsid() may
33  * need updating to perform data EBCDIC to ASCII data conversion on the
34  * string.
35  *
36  * Once any applicable changes to curl_easy_setopt_ccsid() have been
37  * made, the EXPECTED_STRING_LASTZEROTERMINATED/EXPECTED_STRING_LAST
38  * values can be updated to match the latest enum values in urldata.h.
39  */
40 #define EXPECTED_STRING_LASTZEROTERMINATED  (STRING_SSL_EC_CURVES + 1)
41 #define EXPECTED_STRING_LAST                (STRING_AWS_SIGV4 + 1)
42 
main(int argc,char * argv[])43 int main(int argc, char *argv[])
44 {
45   int rc = 0;
46 
47   if(STRING_LASTZEROTERMINATED != EXPECTED_STRING_LASTZEROTERMINATED) {
48     fprintf(stderr,
49             "STRING_LASTZEROTERMINATED(%d) is not expected value(%d).\n",
50             STRING_LASTZEROTERMINATED, EXPECTED_STRING_LASTZEROTERMINATED);
51     rc += 1;
52   }
53   if(STRING_LAST != EXPECTED_STRING_LAST) {
54     fprintf(stderr, "STRING_LAST(%d) is not expected value(%d).\n",
55             STRING_LAST, EXPECTED_STRING_LAST);
56     rc += 2;
57   }
58   if(rc) {
59     fprintf(stderr, "curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c"
60             " may need updating if new strings are provided as"
61             " input via the curl API.\n");
62   }
63   return rc;
64 }
65