Skip to content

Commit

Permalink
os400: alt-svc support.
Browse files Browse the repository at this point in the history
Although experimental, enable it in the platform config file.
Upgrade ILE/RPG binding.
  • Loading branch information
monnerat committed Mar 17, 2019
1 parent e3a53e3 commit 520f0b4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/config-os400.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2019, 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
Expand Down Expand Up @@ -425,6 +425,9 @@
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME

/* to enable alt-svc */
#define USE_ALTSVC 1

/* Version number of package */
#undef VERSION

Expand Down
1 change: 1 addition & 0 deletions packages/OS400/README.OS400
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ _ curl_easy_setopt_ccsid()
Variable arguments are a string pointer and a CCSID (unsigned int) for
options:
CURLOPT_ABSTRACT_UNIX_SOCKET
CURLOPT_ALTSVC
CURLOPT_CAINFO
CURLOPT_CAPATH
CURLOPT_COOKIE
Expand Down
3 changes: 2 additions & 1 deletion packages/OS400/ccsidcurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
if(testwarn) {
testwarn = 0;

if((int) STRING_LASTZEROTERMINATED != (int) STRING_DOH + 1 ||
if((int) STRING_LASTZEROTERMINATED != (int) STRING_ALTSVC + 1 ||
(int) STRING_LAST != (int) STRING_COPYPOSTFIELDS + 1)
curl_mfprintf(stderr,
"*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n");
Expand All @@ -1144,6 +1144,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
switch (tag) {

case CURLOPT_ABSTRACT_UNIX_SOCKET:
case CURLOPT_ALTSVC:
case CURLOPT_CAINFO:
case CURLOPT_CAPATH:
case CURLOPT_COOKIE:
Expand Down
23 changes: 22 additions & 1 deletion packages/OS400/curl.inc.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2019, 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
Expand Down Expand Up @@ -134,6 +134,10 @@
d c X'00200000'
d CURL_VERSION_MULTI_SSL...
d c X'00400000'
d CURL_VERSION_BROTLI...
d c X'00800000'
d CURL_VERSION_ALTSVC...
d c X'01000000'
*
d CURL_HTTPPOST_FILENAME...
d c X'00000001'
Expand Down Expand Up @@ -814,6 +818,19 @@
d CURLHEADER_SEPARATE...
d c X'00000001'
*
d CURLALTSVC_IMMEDIATELY...
d c X'00000001'
d CURLALTSVC_ALTUSED...
d c X'00000002'
d CURLALTSVC_READONLYFILE...
d c X'00000004'
d CURLALTSVC_H1...
d c X'00000008'
d CURLALTSVC_H2...
d c X'00000010'
d CURLALTSVC_H3...
d c X'00000020'
*
d CURLPROTO_HTTP...
d c X'00000001'
d CURLPROTO_HTTPS...
Expand Down Expand Up @@ -1395,6 +1412,10 @@
d c 10284
d CURLOPT_HTTP09_ALLOWED...
d c 00285
d CURLOPT_ALTSVC_CTRL...
d c 00286
d CURLOPT_ALTSVC...
d c 10287
*
/if not defined(CURL_NO_OLDIES)
d CURLOPT_FILE c 10001
Expand Down

2 comments on commit 520f0b4

@jay
Copy link
Member

@jay jay commented on 520f0b4 Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Experimental features are supposed to be off by default

@monnerat
Copy link
Contributor Author

@monnerat monnerat commented on 520f0b4 Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no configure options on OS400. If we want to let a chance to use alt-svc on OS400, it's better to do it that way (no user will edit the config-os400.h file). I don't see any other way to eventually get feedback on it for that platform.
In addition, the conditional definition of STRING_ALTSVC will force a user changing the config-os400.h file to also edit packages/OS400/ccsidcurl.c, as I don't want the string test to become much compilcated.

Please sign in to comment.