77 * | (__| |_| | _ <| |___
88 * \___|\___/|_| \_\_____|
99 *
10- * Copyright (C) 1998 - 2018 , Daniel Stenberg, <daniel@haxx.se>, et al.
10+ * Copyright (C) 1998 - 2019 , Daniel Stenberg, <daniel@haxx.se>, et al.
1111 *
1212 * This software is licensed as described in the file COPYING, which
1313 * you should have received as part of this distribution. The terms
9191#include <support/SupportDefs.h>
9292#endif
9393
94+ /* Compatibility for non-Clang compilers */
95+ #ifndef __has_declspec_attribute
96+ # define __has_declspec_attribute (x ) 0
97+ #endif
98+
9499#ifdef __cplusplus
95100extern "C" {
96101#endif
@@ -109,7 +114,9 @@ typedef void CURLSH;
109114
110115#ifdef CURL_STATICLIB
111116# define CURL_EXTERN
112- #elif defined(WIN32 ) || defined(_WIN32 ) || defined(__SYMBIAN32__ )
117+ #elif defined(WIN32 ) || defined(_WIN32 ) || defined(__SYMBIAN32__ ) || \
118+ (__has_declspec_attribute (dllexport ) && \
119+ __has_declspec_attribute (dllimport ))
113120# if defined(BUILDING_LIBCURL )
114121# define CURL_EXTERN __declspec(dllexport)
115122# else
@@ -144,7 +151,7 @@ typedef enum {
144151 CURLSSLBACKEND_POLARSSL = 6 ,
145152 CURLSSLBACKEND_WOLFSSL = 7 ,
146153 CURLSSLBACKEND_SCHANNEL = 8 ,
147- CURLSSLBACKEND_DARWINSSL = 9 ,
154+ CURLSSLBACKEND_SECURETRANSPORT = 9 ,
148155 CURLSSLBACKEND_AXTLS = 10 , /* never used since 7.63.0 */
149156 CURLSSLBACKEND_MBEDTLS = 11 ,
150157 CURLSSLBACKEND_MESALINK = 12
@@ -153,7 +160,10 @@ typedef enum {
153160/* aliases for library clones and renames */
154161#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
155162#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
163+
164+ /* deprecated names: */
156165#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
166+ #define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT
157167
158168struct curl_httppost {
159169 struct curl_httppost * next ; /* next entry in the list */
@@ -871,6 +881,14 @@ typedef enum {
871881#define CURLHEADER_UNIFIED 0
872882#define CURLHEADER_SEPARATE (1<<0)
873883
884+ /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
885+ #define CURLALTSVC_IMMEDIATELY (1<<0)
886+ #define CURLALTSVC_ALTUSED (1<<1)
887+ #define CURLALTSVC_READONLYFILE (1<<2)
888+ #define CURLALTSVC_H1 (1<<3)
889+ #define CURLALTSVC_H2 (1<<4)
890+ #define CURLALTSVC_H3 (1<<5)
891+
874892/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
875893#define CURLPROTO_HTTP (1<<0)
876894#define CURLPROTO_HTTPS (1<<1)
@@ -1894,6 +1912,12 @@ typedef enum {
18941912 /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */
18951913 CINIT (HTTP09_ALLOWED , LONG , 285 ),
18961914
1915+ /* alt-svc control bitmask */
1916+ CINIT (ALTSVC_CTRL , LONG , 286 ),
1917+
1918+ /* alt-svc cache file name to possibly read from/write to */
1919+ CINIT (ALTSVC , STRINGPOINT , 287 ),
1920+
18971921 CURLOPT_LASTENTRY /* the last unused */
18981922} CURLoption ;
18991923
@@ -2756,6 +2780,7 @@ typedef struct {
27562780#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */
27572781#define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */
27582782#define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */
2783+ #define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */
27592784
27602785 /*
27612786 * NAME curl_version_info()
0 commit comments