zhaowenbo_branch
parent
34fd66cc84
commit
f345b585ce
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"enableCMake": false
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"CurrentProjectSetting": "无配置"
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ExpandedNodes": [
|
||||||
|
"",
|
||||||
|
"\\curl-8.1.2\\include",
|
||||||
|
"\\curl-8.1.2\\include\\curl",
|
||||||
|
"\\fire"
|
||||||
|
],
|
||||||
|
"PreviewInSolutionExplorer": false
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.1",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"taskLabel": "任务-fire",
|
||||||
|
"appliesTo": "fire/fire.cpp",
|
||||||
|
"type": "launch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
@CMAKE_CONFIGURABLE_FILE_CONTENT@
|
@ -0,0 +1,78 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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(CheckCSourceCompiles)
|
||||||
|
|
||||||
|
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
|
||||||
|
mark_as_advanced(CURL_HIDDEN_SYMBOLS)
|
||||||
|
|
||||||
|
if(CURL_HIDDEN_SYMBOLS)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING FALSE)
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
|
||||||
|
# note: this is considered buggy prior to 4.0 but the autotools don't care, so let's ignore that fact
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__global")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-xldscope=hidden")
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
|
||||||
|
# note: this should probably just check for version 9.1.045 but I'm not 100% sure
|
||||||
|
# so let's do it the same way autotools do.
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
check_c_source_compiles("#include <stdio.h>
|
||||||
|
int main (void) { printf(\"icc fvisibility bug test\"); return 0; }" _no_bug)
|
||||||
|
if(NOT _no_bug)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING FALSE)
|
||||||
|
set(_SYMBOL_EXTERN "")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "")
|
||||||
|
endif()
|
||||||
|
elseif(MSVC)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS ${SUPPORTS_SYMBOL_HIDING})
|
||||||
|
elseif(MSVC)
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS 3.7)
|
||||||
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) #present since 3.4.3 but broken
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS FALSE)
|
||||||
|
else()
|
||||||
|
message(WARNING "Hiding private symbols regardless CURL_HIDDEN_SYMBOLS being disabled.")
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS TRUE)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CURL_CFLAG_SYMBOLS_HIDE ${_CFLAG_SYMBOLS_HIDE})
|
||||||
|
set(CURL_EXTERN_SYMBOL ${_SYMBOL_EXTERN})
|
@ -0,0 +1,532 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 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
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#ifdef TIME_WITH_SYS_TIME
|
||||||
|
/* Time with sys/time test */
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((struct tm *) 0)
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_O_NONBLOCK
|
||||||
|
|
||||||
|
/* headers for FCNTL_O_NONBLOCK test */
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
/* */
|
||||||
|
#if defined(sun) || defined(__sun__) || \
|
||||||
|
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||||
|
# if defined(__SVR4) || defined(__srv4__)
|
||||||
|
# define PLATFORM_SOLARIS
|
||||||
|
# else
|
||||||
|
# define PLATFORM_SUNOS4
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
|
||||||
|
# define PLATFORM_AIX_V3
|
||||||
|
#endif
|
||||||
|
/* */
|
||||||
|
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3)
|
||||||
|
#error "O_NONBLOCK does not work on this platform"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
/* O_NONBLOCK source test */
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* tests for gethostbyname_r */
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
# define _REENTRANT
|
||||||
|
/* no idea whether _REENTRANT is always set, just invent a new flag */
|
||||||
|
# define TEST_GETHOSTBYFOO_REENTRANT
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(TEST_GETHOSTBYFOO_REENTRANT)
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
char *address = "example.com";
|
||||||
|
int length = 0;
|
||||||
|
int type = 0;
|
||||||
|
struct hostent h;
|
||||||
|
int rc = 0;
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||||
|
struct hostent_data hdata;
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
char buffer[8192];
|
||||||
|
int h_errnop;
|
||||||
|
struct hostent *hp;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, &hdata);
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
|
||||||
|
(void)hp; /* not used for test */
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
(void)length;
|
||||||
|
(void)type;
|
||||||
|
(void)rc;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SOCKLEN_T
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#else
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((socklen_t *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (socklen_t))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IN_ADDR_T
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((in_addr_t *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (in_addr_t))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_BOOL_T
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STDBOOL_H
|
||||||
|
#include <stdbool.h>
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if (sizeof (bool *) )
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STDC_HEADERS
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <float.h>
|
||||||
|
int main() { return 0; }
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FILE_OFFSET_BITS
|
||||||
|
#ifdef _FILE_OFFSET_BITS
|
||||||
|
#undef _FILE_OFFSET_BITS
|
||||||
|
#endif
|
||||||
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
#include <sys/types.h>
|
||||||
|
/* Check that off_t can represent 2**63 - 1 correctly.
|
||||||
|
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||||
|
since some C++ compilers masquerading as C compilers
|
||||||
|
incorrectly reject 9223372036854775807. */
|
||||||
|
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||||
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
|
? 1 : -1];
|
||||||
|
int main () { ; return 0; }
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* ioctlsocket source code */
|
||||||
|
int socket;
|
||||||
|
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_CAMEL
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* IoctlSocket source code */
|
||||||
|
if(0 != IoctlSocket(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* IoctlSocket source code */
|
||||||
|
long flags = 0;
|
||||||
|
if(0 != IoctlSocket(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_FIONBIO
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTL_FIONBIO
|
||||||
|
/* headers for FIONBIO test */
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STROPTS_H
|
||||||
|
# include <stropts.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != ioctl(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTL_SIOCGIFADDR
|
||||||
|
/* headers for FIONBIO test */
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STROPTS_H
|
||||||
|
# include <stropts.h>
|
||||||
|
#endif
|
||||||
|
#include <net/if.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct ifreq ifr;
|
||||||
|
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
/* includes end */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GLIBC_STRERROR_R
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
void check(char c) {}
|
||||||
|
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024];
|
||||||
|
/* This will not compile if strerror_r does not return a char* */
|
||||||
|
check(strerror_r(EACCES, buffer, sizeof(buffer))[0]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_POSIX_STRERROR_R
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
/* float, because a pointer can't be implicitly cast to float */
|
||||||
|
void check(float f) {}
|
||||||
|
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024];
|
||||||
|
/* This will not compile if strerror_r does not return an int */
|
||||||
|
check(strerror_r(EACCES, buffer, sizeof(buffer)));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FSETXATTR_6
|
||||||
|
#include <sys/xattr.h> /* header from libc, not from libattr */
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
fsetxattr(0, 0, 0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FSETXATTR_5
|
||||||
|
#include <sys/xattr.h> /* header from libc, not from libattr */
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
fsetxattr(0, 0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_CLOCK_GETTIME_MONOTONIC
|
||||||
|
#include <time.h>
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
struct timespec ts = {0, 0};
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_BUILTIN_AVAILABLE
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
if(__builtin_available(macOS 10.12, *)) {}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VARIADIC_MACROS_C99
|
||||||
|
#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
|
||||||
|
#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3);
|
||||||
|
int fun2(int arg1, int arg2);
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3) {
|
||||||
|
return arg1 + arg2 + arg3;
|
||||||
|
}
|
||||||
|
int fun2(int arg1, int arg2) {
|
||||||
|
return arg1 + arg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
int res3 = c99_vmacro3(1, 2, 3);
|
||||||
|
int res2 = c99_vmacro2(1, 2);
|
||||||
|
(void)res3;
|
||||||
|
(void)res2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VARIADIC_MACROS_GCC
|
||||||
|
#define gcc_vmacro3(first, args...) fun3(first, args)
|
||||||
|
#define gcc_vmacro2(first, args...) fun2(first, args)
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3);
|
||||||
|
int fun2(int arg1, int arg2);
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3) {
|
||||||
|
return arg1 + arg2 + arg3;
|
||||||
|
}
|
||||||
|
int fun2(int arg1, int arg2) {
|
||||||
|
return arg1 + arg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
int res3 = gcc_vmacro3(1, 2, 3);
|
||||||
|
int res2 = gcc_vmacro2(1, 2);
|
||||||
|
(void)res3;
|
||||||
|
(void)res2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ATOMIC
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STDATOMIC_H
|
||||||
|
# include <stdatomic.h>
|
||||||
|
#endif
|
||||||
|
/* includes end */
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
_Atomic int i = 1;
|
||||||
|
i = 0; // Force an atomic-write operation.
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_WIN32_WINNT
|
||||||
|
/* includes start */
|
||||||
|
#ifdef WIN32
|
||||||
|
# include "../lib/setup-win32.h"
|
||||||
|
#endif
|
||||||
|
/* includes end */
|
||||||
|
|
||||||
|
#define enquote(x) #x
|
||||||
|
#define expand(x) enquote(x)
|
||||||
|
#pragma message("_WIN32_WINNT=" expand(_WIN32_WINNT))
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
@ -0,0 +1,32 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(BEARSSL_INCLUDE_DIRS bearssl.h)
|
||||||
|
|
||||||
|
find_library(BEARSSL_LIBRARY bearssl)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(BEARSSL DEFAULT_MSG
|
||||||
|
BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
|
||||||
|
|
||||||
|
mark_as_advanced(BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
|
@ -0,0 +1,43 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
|
||||||
|
|
||||||
|
find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon)
|
||||||
|
find_library(BROTLIDEC_LIBRARY NAMES brotlidec)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Brotli
|
||||||
|
FOUND_VAR
|
||||||
|
BROTLI_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
BROTLIDEC_LIBRARY
|
||||||
|
BROTLICOMMON_LIBRARY
|
||||||
|
BROTLI_INCLUDE_DIR
|
||||||
|
FAIL_MESSAGE
|
||||||
|
"Could NOT find Brotli"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
|
||||||
|
set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
|
@ -0,0 +1,47 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Find c-ares
|
||||||
|
# Find the c-ares includes and library
|
||||||
|
# This module defines
|
||||||
|
# CARES_INCLUDE_DIR, where to find ares.h, etc.
|
||||||
|
# CARES_LIBRARIES, the libraries needed to use c-ares.
|
||||||
|
# CARES_FOUND, If false, do not try to use c-ares.
|
||||||
|
# also defined, but not for general use are
|
||||||
|
# CARES_LIBRARY, where to find the c-ares library.
|
||||||
|
|
||||||
|
find_path(CARES_INCLUDE_DIR ares.h)
|
||||||
|
|
||||||
|
set(CARES_NAMES ${CARES_NAMES} cares)
|
||||||
|
find_library(CARES_LIBRARY
|
||||||
|
NAMES ${CARES_NAMES}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(CARES
|
||||||
|
REQUIRED_VARS CARES_LIBRARY CARES_INCLUDE_DIR)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
CARES_LIBRARY
|
||||||
|
CARES_INCLUDE_DIR
|
||||||
|
)
|
@ -0,0 +1,312 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the GSS Kerberos library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# GSS_ROOT_DIR - Set this variable to the root installation of GSS
|
||||||
|
#
|
||||||
|
# Read-Only variables:
|
||||||
|
# GSS_FOUND - system has the Heimdal library
|
||||||
|
# GSS_FLAVOUR - "MIT" or "Heimdal" if anything found.
|
||||||
|
# GSS_INCLUDE_DIR - the Heimdal include directory
|
||||||
|
# GSS_LIBRARIES - The libraries needed to use GSS
|
||||||
|
# GSS_LINK_DIRECTORIES - Directories to add to linker search path
|
||||||
|
# GSS_LINKER_FLAGS - Additional linker flags
|
||||||
|
# GSS_COMPILER_FLAGS - Additional compiler flags
|
||||||
|
# GSS_VERSION - This is set to version advertised by pkg-config or read from manifest.
|
||||||
|
# In case the library is found but no version info available it'll be set to "unknown"
|
||||||
|
|
||||||
|
set(_MIT_MODNAME mit-krb5-gssapi)
|
||||||
|
set(_HEIMDAL_MODNAME heimdal-gssapi)
|
||||||
|
|
||||||
|
include(CheckIncludeFile)
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
include(CheckTypeSize)
|
||||||
|
|
||||||
|
set(_GSS_ROOT_HINTS
|
||||||
|
"${GSS_ROOT_DIR}"
|
||||||
|
"$ENV{GSS_ROOT_DIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find library using system pkg-config if user didn't specify root dir
|
||||||
|
if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}")
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(_GSS_PKG ${_MIT_MODNAME} ${_HEIMDAL_MODNAME})
|
||||||
|
list(APPEND _GSS_ROOT_HINTS "${_GSS_PKG_PREFIX}")
|
||||||
|
elseif(WIN32)
|
||||||
|
list(APPEND _GSS_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos;InstallDir]")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT _GSS_FOUND) #not found by pkg-config. Let's take more traditional approach.
|
||||||
|
find_file(_GSS_CONFIGURE_SCRIPT
|
||||||
|
NAMES
|
||||||
|
"krb5-config"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
bin
|
||||||
|
NO_CMAKE_PATH
|
||||||
|
NO_CMAKE_ENVIRONMENT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# if not found in user-supplied directories, maybe system knows better
|
||||||
|
find_file(_GSS_CONFIGURE_SCRIPT
|
||||||
|
NAMES
|
||||||
|
"krb5-config"
|
||||||
|
PATH_SUFFIXES
|
||||||
|
bin
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_CONFIGURE_SCRIPT)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--cflags" "gssapi"
|
||||||
|
OUTPUT_VARIABLE _GSS_CFLAGS
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message(STATUS "CFLAGS: ${_GSS_CFLAGS}")
|
||||||
|
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||||
|
# should also work in an odd case when multiple directories are given
|
||||||
|
string(STRIP "${_GSS_CFLAGS}" _GSS_CFLAGS)
|
||||||
|
string(REGEX REPLACE " +-I" ";" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||||
|
string(REGEX REPLACE " +-([^I][^ \\t;]*)" ";-\\1" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||||
|
|
||||||
|
foreach(_flag ${_GSS_CFLAGS})
|
||||||
|
if(_flag MATCHES "^-I.*")
|
||||||
|
string(REGEX REPLACE "^-I" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_INCLUDE_DIR "${_val}")
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_COMPILER_FLAGS "${_flag}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--libs" "gssapi"
|
||||||
|
OUTPUT_VARIABLE _GSS_LIB_FLAGS
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}")
|
||||||
|
|
||||||
|
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||||
|
# this script gives us libraries and link directories. Blah. We have to deal with it.
|
||||||
|
string(STRIP "${_GSS_LIB_FLAGS}" _GSS_LIB_FLAGS)
|
||||||
|
string(REGEX REPLACE " +-(L|l)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||||
|
string(REGEX REPLACE " +-([^Ll][^ \\t;]*)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||||
|
|
||||||
|
foreach(_flag ${_GSS_LIB_FLAGS})
|
||||||
|
if(_flag MATCHES "^-l.*")
|
||||||
|
string(REGEX REPLACE "^-l" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_LIBRARIES "${_val}")
|
||||||
|
elseif(_flag MATCHES "^-L.*")
|
||||||
|
string(REGEX REPLACE "^-L" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_LINK_DIRECTORIES "${_val}")
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LINKER_FLAGS "${_flag}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--version"
|
||||||
|
OUTPUT_VARIABLE _GSS_VERSION
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# older versions may not have the "--version" parameter. In this case we just don't care.
|
||||||
|
if(_GSS_CONFIGURE_FAILED)
|
||||||
|
set(_GSS_VERSION 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--vendor"
|
||||||
|
OUTPUT_VARIABLE _GSS_VENDOR
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# older versions may not have the "--vendor" parameter. In this case we just don't care.
|
||||||
|
if(_GSS_CONFIGURE_FAILED)
|
||||||
|
set(GSS_FLAVOUR "Heimdal") # most probably, shouldn't really matter
|
||||||
|
else()
|
||||||
|
if(_GSS_VENDOR MATCHES ".*H|heimdal.*")
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
else()
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
else() # either there is no config script or we are on a platform that doesn't provide one (Windows?)
|
||||||
|
|
||||||
|
find_path(_GSS_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
"gssapi/gssapi.h"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include
|
||||||
|
inc
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_INCLUDE_DIR) #jay, we've found something
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIR}")
|
||||||
|
check_include_files( "gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS)
|
||||||
|
|
||||||
|
if(_GSS_HAVE_MIT_HEADERS)
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
else()
|
||||||
|
# prevent compiling the header - just check if we can include it
|
||||||
|
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D__ROKEN_H__)
|
||||||
|
check_include_file( "roken.h" _GSS_HAVE_ROKEN_H)
|
||||||
|
|
||||||
|
check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||||
|
if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
endif()
|
||||||
|
list(REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D__ROKEN_H__)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# I'm not convinced if this is the right way but this is what autotools do at the moment
|
||||||
|
find_path(_GSS_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
"gssapi.h"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include
|
||||||
|
inc
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_INCLUDE_DIR)
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# if we have headers, check if we can link libraries
|
||||||
|
if(GSS_FLAVOUR)
|
||||||
|
set(_GSS_LIBDIR_SUFFIXES "")
|
||||||
|
set(_GSS_LIBDIR_HINTS ${_GSS_ROOT_HINTS})
|
||||||
|
get_filename_component(_GSS_CALCULATED_POTENTIAL_ROOT "${_GSS_INCLUDE_DIR}" PATH)
|
||||||
|
list(APPEND _GSS_LIBDIR_HINTS ${_GSS_CALCULATED_POTENTIAL_ROOT})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/AMD64")
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi64")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "libgssapi")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/i386")
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi32")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "libgssapi")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib;lib64") # those suffixes are not checked for HINTS
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi_krb5")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "gssapi")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(_GSS_LIBRARIES
|
||||||
|
NAMES
|
||||||
|
${_GSS_LIBNAME}
|
||||||
|
HINTS
|
||||||
|
${_GSS_LIBDIR_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
${_GSS_LIBDIR_SUFFIXES}
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(_GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
set(_GSS_VERSION _GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||||
|
else()
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
set(_GSS_VERSION _GSS_PKG_${_MIT_HEIMDAL}_VERSION)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(GSS_INCLUDE_DIR ${_GSS_INCLUDE_DIR})
|
||||||
|
set(GSS_LIBRARIES ${_GSS_LIBRARIES})
|
||||||
|
set(GSS_LINK_DIRECTORIES ${_GSS_LINK_DIRECTORIES})
|
||||||
|
set(GSS_LINKER_FLAGS ${_GSS_LINKER_FLAGS})
|
||||||
|
set(GSS_COMPILER_FLAGS ${_GSS_COMPILER_FLAGS})
|
||||||
|
set(GSS_VERSION ${_GSS_VERSION})
|
||||||
|
|
||||||
|
if(GSS_FLAVOUR)
|
||||||
|
if(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "Heimdal")
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.amd64.manifest")
|
||||||
|
else()
|
||||||
|
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.x86.manifest")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EXISTS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}")
|
||||||
|
file(STRINGS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}" heimdal_version_str
|
||||||
|
REGEX "^.*version=\"[0-9]\\.[^\"]+\".*$")
|
||||||
|
|
||||||
|
string(REGEX MATCH "[0-9]\\.[^\"]+"
|
||||||
|
GSS_VERSION "${heimdal_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT GSS_VERSION)
|
||||||
|
set(GSS_VERSION "Heimdal Unknown")
|
||||||
|
endif()
|
||||||
|
elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
get_filename_component(_MIT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE)
|
||||||
|
if(WIN32 AND _MIT_VERSION)
|
||||||
|
set(GSS_VERSION "${_MIT_VERSION}")
|
||||||
|
else()
|
||||||
|
set(GSS_VERSION "MIT Unknown")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
set(_GSS_REQUIRED_VARS GSS_LIBRARIES GSS_FLAVOUR)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(GSS
|
||||||
|
REQUIRED_VARS
|
||||||
|
${_GSS_REQUIRED_VARS}
|
||||||
|
VERSION_VAR
|
||||||
|
GSS_VERSION
|
||||||
|
FAIL_MESSAGE
|
||||||
|
"Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR"
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES)
|
@ -0,0 +1,45 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the libpsl library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBPSL_FOUND - system has the libpsl library
|
||||||
|
# LIBPSL_INCLUDE_DIR - the libpsl include directory
|
||||||
|
# LIBPSL_LIBRARY - the libpsl library name
|
||||||
|
|
||||||
|
find_path(LIBPSL_INCLUDE_DIR libpsl.h)
|
||||||
|
|
||||||
|
find_library(LIBPSL_LIBRARY NAMES psl libpsl)
|
||||||
|
|
||||||
|
if(LIBPSL_INCLUDE_DIR)
|
||||||
|
file(STRINGS "${LIBPSL_INCLUDE_DIR}/libpsl.h" libpsl_version_str REGEX "^#define[\t ]+PSL_VERSION[\t ]+\"(.*)\"")
|
||||||
|
string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBPSL_VERSION "${libpsl_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibPSL
|
||||||
|
REQUIRED_VARS LIBPSL_LIBRARY LIBPSL_INCLUDE_DIR
|
||||||
|
VERSION_VAR LIBPSL_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBPSL_INCLUDE_DIR LIBPSL_LIBRARY)
|
@ -0,0 +1,45 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the libssh2 library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBSSH2_FOUND - system has the libssh2 library
|
||||||
|
# LIBSSH2_INCLUDE_DIR - the libssh2 include directory
|
||||||
|
# LIBSSH2_LIBRARY - the libssh2 library name
|
||||||
|
|
||||||
|
find_path(LIBSSH2_INCLUDE_DIR libssh2.h)
|
||||||
|
|
||||||
|
find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2)
|
||||||
|
|
||||||
|
if(LIBSSH2_INCLUDE_DIR)
|
||||||
|
file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION[\t ]+\"(.*)\"")
|
||||||
|
string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBSSH2_VERSION "${libssh2_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibSSH2
|
||||||
|
REQUIRED_VARS LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR
|
||||||
|
VERSION_VAR LIBSSH2_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
|
@ -0,0 +1,70 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindMSH3
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the msh3 library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``MSH3_FOUND``
|
||||||
|
System has msh3
|
||||||
|
``MSH3_INCLUDE_DIRS``
|
||||||
|
The msh3 include directories.
|
||||||
|
``MSH3_LIBRARIES``
|
||||||
|
The libraries needed to use msh3
|
||||||
|
#]=======================================================================]
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_MSH3 libmsh3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(MSH3_INCLUDE_DIR msh3.h
|
||||||
|
HINTS
|
||||||
|
${PC_MSH3_INCLUDEDIR}
|
||||||
|
${PC_MSH3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(MSH3_LIBRARY NAMES msh3
|
||||||
|
HINTS
|
||||||
|
${PC_MSH3_LIBDIR}
|
||||||
|
${PC_MSH3_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(MSH3
|
||||||
|
REQUIRED_VARS
|
||||||
|
MSH3_LIBRARY
|
||||||
|
MSH3_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(MSH3_FOUND)
|
||||||
|
set(MSH3_LIBRARIES ${MSH3_LIBRARY})
|
||||||
|
set(MSH3_INCLUDE_DIRS ${MSH3_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(MSH3_INCLUDE_DIRS MSH3_LIBRARIES)
|
@ -0,0 +1,36 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h)
|
||||||
|
|
||||||
|
find_library(MBEDTLS_LIBRARY mbedtls)
|
||||||
|
find_library(MBEDX509_LIBRARY mbedx509)
|
||||||
|
find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
|
||||||
|
|
||||||
|
set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(MbedTLS DEFAULT_MSG
|
||||||
|
MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||||
|
|
||||||
|
mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
@ -0,0 +1,41 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_path(NGHTTP2_INCLUDE_DIR "nghttp2/nghttp2.h")
|
||||||
|
|
||||||
|
find_library(NGHTTP2_LIBRARY NAMES nghttp2)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(NGHTTP2
|
||||||
|
FOUND_VAR
|
||||||
|
NGHTTP2_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGHTTP2_LIBRARY
|
||||||
|
NGHTTP2_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
set(NGHTTP2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR})
|
||||||
|
set(NGHTTP2_LIBRARIES ${NGHTTP2_LIBRARY})
|
||||||
|
|
||||||
|
mark_as_advanced(NGHTTP2_INCLUDE_DIRS NGHTTP2_LIBRARIES)
|
@ -0,0 +1,78 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindNGHTTP3
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the nghttp3 library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``NGHTTP3_FOUND``
|
||||||
|
System has nghttp3
|
||||||
|
``NGHTTP3_INCLUDE_DIRS``
|
||||||
|
The nghttp3 include directories.
|
||||||
|
``NGHTTP3_LIBRARIES``
|
||||||
|
The libraries needed to use nghttp3
|
||||||
|
``NGHTTP3_VERSION``
|
||||||
|
version of nghttp3.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NGHTTP3 libnghttp3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(NGHTTP3_INCLUDE_DIR nghttp3/nghttp3.h
|
||||||
|
HINTS
|
||||||
|
${PC_NGHTTP3_INCLUDEDIR}
|
||||||
|
${PC_NGHTTP3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(NGHTTP3_LIBRARY NAMES nghttp3
|
||||||
|
HINTS
|
||||||
|
${PC_NGHTTP3_LIBDIR}
|
||||||
|
${PC_NGHTTP3_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PC_NGHTTP3_VERSION)
|
||||||
|
set(NGHTTP3_VERSION ${PC_NGHTTP3_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NGHTTP3
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGHTTP3_LIBRARY
|
||||||
|
NGHTTP3_INCLUDE_DIR
|
||||||
|
VERSION_VAR NGHTTP3_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NGHTTP3_FOUND)
|
||||||
|
set(NGHTTP3_LIBRARIES ${NGHTTP3_LIBRARY})
|
||||||
|
set(NGHTTP3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(NGHTTP3_INCLUDE_DIRS NGHTTP3_LIBRARIES)
|
@ -0,0 +1,115 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindNGTCP2
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the ngtcp2 library
|
||||||
|
|
||||||
|
This module accepts optional COMPONENTS to control the crypto library (these are
|
||||||
|
mutually exclusive)::
|
||||||
|
|
||||||
|
OpenSSL: Use libngtcp2_crypto_openssl
|
||||||
|
GnuTLS: Use libngtcp2_crypto_gnutls
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``NGTCP2_FOUND``
|
||||||
|
System has ngtcp2
|
||||||
|
``NGTCP2_INCLUDE_DIRS``
|
||||||
|
The ngtcp2 include directories.
|
||||||
|
``NGTCP2_LIBRARIES``
|
||||||
|
The libraries needed to use ngtcp2
|
||||||
|
``NGTCP2_VERSION``
|
||||||
|
version of ngtcp2.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NGTCP2 libngtcp2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(NGTCP2_INCLUDE_DIR ngtcp2/ngtcp2.h
|
||||||
|
HINTS
|
||||||
|
${PC_NGTCP2_INCLUDEDIR}
|
||||||
|
${PC_NGTCP2_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(NGTCP2_LIBRARY NAMES ngtcp2
|
||||||
|
HINTS
|
||||||
|
${PC_NGTCP2_LIBDIR}
|
||||||
|
${PC_NGTCP2_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PC_NGTCP2_VERSION)
|
||||||
|
set(NGTCP2_VERSION ${PC_NGTCP2_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NGTCP2_FIND_COMPONENTS)
|
||||||
|
set(NGTCP2_CRYPTO_BACKEND "")
|
||||||
|
foreach(component IN LISTS NGTCP2_FIND_COMPONENTS)
|
||||||
|
if(component MATCHES "^(BoringSSL|OpenSSL|wolfSSL|GnuTLS)")
|
||||||
|
if(NGTCP2_CRYPTO_BACKEND)
|
||||||
|
message(FATAL_ERROR "NGTCP2: Only one crypto library can be selected")
|
||||||
|
endif()
|
||||||
|
set(NGTCP2_CRYPTO_BACKEND ${component})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NGTCP2_CRYPTO_BACKEND)
|
||||||
|
string(TOLOWER "ngtcp2_crypto_${NGTCP2_CRYPTO_BACKEND}" _crypto_library)
|
||||||
|
if(UNIX)
|
||||||
|
pkg_search_module(PC_${_crypto_library} lib${_crypto_library})
|
||||||
|
endif()
|
||||||
|
find_library(${_crypto_library}_LIBRARY
|
||||||
|
NAMES
|
||||||
|
${_crypto_library}
|
||||||
|
HINTS
|
||||||
|
${PC_${_crypto_library}_LIBDIR}
|
||||||
|
${PC_${_crypto_library}_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
if(${_crypto_library}_LIBRARY)
|
||||||
|
set(NGTCP2_${NGTCP2_CRYPTO_BACKEND}_FOUND TRUE)
|
||||||
|
set(NGTCP2_CRYPTO_LIBRARY ${${_crypto_library}_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NGTCP2
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGTCP2_LIBRARY
|
||||||
|
NGTCP2_INCLUDE_DIR
|
||||||
|
VERSION_VAR NGTCP2_VERSION
|
||||||
|
HANDLE_COMPONENTS
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NGTCP2_FOUND)
|
||||||
|
set(NGTCP2_LIBRARIES ${NGTCP2_LIBRARY} ${NGTCP2_CRYPTO_LIBRARY})
|
||||||
|
set(NGTCP2_INCLUDE_DIRS ${NGTCP2_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(NGTCP2_INCLUDE_DIRS NGTCP2_LIBRARIES)
|
@ -0,0 +1,40 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NSS nss)
|
||||||
|
endif()
|
||||||
|
if(NOT PC_NSS_FOUND)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(NSS_LIBRARIES ${PC_NSS_LINK_LIBRARIES})
|
||||||
|
set(NSS_INCLUDE_DIRS ${PC_NSS_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NSS
|
||||||
|
REQUIRED_VARS NSS_LIBRARIES NSS_INCLUDE_DIRS
|
||||||
|
VERSION_VAR PC_NSS_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(NSS_INCLUDE_DIRS NSS_LIBRARIES)
|
@ -0,0 +1,70 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindQUICHE
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the quiche library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``QUICHE_FOUND``
|
||||||
|
System has quiche
|
||||||
|
``QUICHE_INCLUDE_DIRS``
|
||||||
|
The quiche include directories.
|
||||||
|
``QUICHE_LIBRARIES``
|
||||||
|
The libraries needed to use quiche
|
||||||
|
#]=======================================================================]
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_QUICHE quiche)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(QUICHE_INCLUDE_DIR quiche.h
|
||||||
|
HINTS
|
||||||
|
${PC_QUICHE_INCLUDEDIR}
|
||||||
|
${PC_QUICHE_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(QUICHE_LIBRARY NAMES quiche
|
||||||
|
HINTS
|
||||||
|
${PC_QUICHE_LIBDIR}
|
||||||
|
${PC_QUICHE_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(QUICHE
|
||||||
|
REQUIRED_VARS
|
||||||
|
QUICHE_LIBRARY
|
||||||
|
QUICHE_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(QUICHE_FOUND)
|
||||||
|
set(QUICHE_LIBRARIES ${QUICHE_LIBRARY})
|
||||||
|
set(QUICHE_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(QUICHE_INCLUDE_DIRS QUICHE_LIBRARIES)
|
@ -0,0 +1,36 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(WolfSSL_INCLUDE_DIR NAMES wolfssl/ssl.h)
|
||||||
|
find_library(WolfSSL_LIBRARY NAMES wolfssl)
|
||||||
|
mark_as_advanced(WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(WolfSSL
|
||||||
|
REQUIRED_VARS WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WolfSSL_FOUND)
|
||||||
|
set(WolfSSL_INCLUDE_DIRS ${WolfSSL_INCLUDE_DIR})
|
||||||
|
set(WolfSSL_LIBRARIES ${WolfSSL_LIBRARY})
|
||||||
|
endif()
|
@ -0,0 +1,71 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindZstd
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the zstd library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``Zstd_FOUND``
|
||||||
|
System has zstd
|
||||||
|
``Zstd_INCLUDE_DIRS``
|
||||||
|
The zstd include directories.
|
||||||
|
``Zstd_LIBRARIES``
|
||||||
|
The libraries needed to use zstd
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_Zstd libzstd)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(Zstd_INCLUDE_DIR zstd.h
|
||||||
|
HINTS
|
||||||
|
${PC_Zstd_INCLUDEDIR}
|
||||||
|
${PC_Zstd_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(Zstd_LIBRARY NAMES zstd
|
||||||
|
HINTS
|
||||||
|
${PC_Zstd_LIBDIR}
|
||||||
|
${PC_Zstd_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Zstd
|
||||||
|
REQUIRED_VARS
|
||||||
|
Zstd_LIBRARY
|
||||||
|
Zstd_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(Zstd_FOUND)
|
||||||
|
set(Zstd_LIBRARIES ${Zstd_LIBRARY})
|
||||||
|
set(Zstd_INCLUDE_DIRS ${Zstd_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(Zstd_INCLUDE_DIRS Zstd_LIBRARIES)
|
@ -0,0 +1,122 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
#File defines convenience macros for available feature testing
|
||||||
|
|
||||||
|
# This macro checks if the symbol exists in the library and if it
|
||||||
|
# does, it prepends library to the list. It is intended to be called
|
||||||
|
# multiple times with a sequence of possibly dependent libraries in
|
||||||
|
# order of least-to-most-dependent. Some libraries depend on others
|
||||||
|
# to link correctly.
|
||||||
|
macro(check_library_exists_concat LIBRARY SYMBOL VARIABLE)
|
||||||
|
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||||
|
${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Check if header file exists and add it to the list.
|
||||||
|
# This macro is intended to be called multiple times with a sequence of
|
||||||
|
# possibly dependent header files. Some headers depend on others to be
|
||||||
|
# compiled correctly.
|
||||||
|
macro(check_include_file_concat FILE VARIABLE)
|
||||||
|
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||||
|
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# For other curl specific tests, use this macro.
|
||||||
|
macro(curl_internal_test CURL_TEST)
|
||||||
|
if(NOT DEFINED "${CURL_TEST}")
|
||||||
|
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
|
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
set(CURL_TEST_ADD_LIBRARIES
|
||||||
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||||
|
try_compile(${CURL_TEST}
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||||
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||||
|
"${CURL_TEST_ADD_LIBRARIES}"
|
||||||
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
if(${CURL_TEST})
|
||||||
|
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
else()
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||||
|
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(curl_nroff_check)
|
||||||
|
find_program(NROFF NAMES gnroff nroff)
|
||||||
|
if(NROFF)
|
||||||
|
# Need a way to write to stdin, this will do
|
||||||
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test")
|
||||||
|
# Tests for a valid nroff option to generate a manpage
|
||||||
|
foreach(_MANOPT "-man" "-mandoc")
|
||||||
|
execute_process(COMMAND "${NROFF}" ${_MANOPT}
|
||||||
|
OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT
|
||||||
|
INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt"
|
||||||
|
ERROR_QUIET)
|
||||||
|
# Save the option if it was valid
|
||||||
|
if(NROFF_MANOPT_OUTPUT)
|
||||||
|
message("Found *nroff option: -- ${_MANOPT}")
|
||||||
|
set(NROFF_MANOPT ${_MANOPT})
|
||||||
|
set(NROFF_USEFUL ON)
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
# No need for the temporary file
|
||||||
|
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt")
|
||||||
|
if(NOT NROFF_USEFUL)
|
||||||
|
message(WARNING "Found no *nroff option to get plaintext from man pages")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(WARNING "Found no *nroff program")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(optional_dependency DEPENDENCY)
|
||||||
|
set(CURL_${DEPENDENCY} AUTO CACHE STRING "Build curl with ${DEPENDENCY} support (AUTO, ON or OFF)")
|
||||||
|
set_property(CACHE CURL_${DEPENDENCY} PROPERTY STRINGS AUTO ON OFF)
|
||||||
|
|
||||||
|
if(CURL_${DEPENDENCY} STREQUAL AUTO)
|
||||||
|
find_package(${DEPENDENCY})
|
||||||
|
elseif(CURL_${DEPENDENCY})
|
||||||
|
find_package(${DEPENDENCY} REQUIRED)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
@ -0,0 +1,136 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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(CheckCSourceCompiles)
|
||||||
|
# The begin of the sources (macros and includes)
|
||||||
|
set(_source_epilogue "#undef inline")
|
||||||
|
|
||||||
|
macro(add_header_include check header)
|
||||||
|
if(${check})
|
||||||
|
set(_source_epilogue "${_source_epilogue}\n#include <${header}>")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
set(signature_call_conv)
|
||||||
|
if(HAVE_WINDOWS_H)
|
||||||
|
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||||
|
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||||
|
set(_source_epilogue
|
||||||
|
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
|
||||||
|
set(signature_call_conv "PASCAL")
|
||||||
|
if(HAVE_LIBWS2_32)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||||
|
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
|
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
int flag = MSG_NOSIGNAL;
|
||||||
|
(void)flag;
|
||||||
|
return 0;
|
||||||
|
}" HAVE_MSG_NOSIGNAL)
|
||||||
|
|
||||||
|
if(NOT HAVE_WINDOWS_H)
|
||||||
|
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
||||||
|
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
||||||
|
add_header_include(HAVE_TIME_H "time.h")
|
||||||
|
endif()
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
struct timeval ts;
|
||||||
|
ts.tv_sec = 0;
|
||||||
|
ts.tv_usec = 0;
|
||||||
|
(void)ts;
|
||||||
|
return 0;
|
||||||
|
}" HAVE_STRUCT_TIMEVAL)
|
||||||
|
|
||||||
|
if(HAVE_WINDOWS_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
|
||||||
|
else()
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
if(HAVE_SYS_SOCKET_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
|
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
|
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
unset(CMAKE_TRY_COMPILE_TARGET_TYPE)
|
||||||
|
|
||||||
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
|
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "iOS")
|
||||||
|
# only try this on non-apple platforms
|
||||||
|
|
||||||
|
# if not cross-compilation...
|
||||||
|
include(CheckCSourceRuns)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "")
|
||||||
|
if(HAVE_SYS_POLL_H)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
|
||||||
|
elseif(HAVE_POLL_H)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-DHAVE_POLL_H")
|
||||||
|
endif()
|
||||||
|
check_c_source_runs("
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_POLL_H
|
||||||
|
# include <sys/poll.h>
|
||||||
|
#elif HAVE_POLL_H
|
||||||
|
# include <poll.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
if(0 != poll(0, 0, 10)) {
|
||||||
|
return 1; /* fail */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* detect the 10.12 poll() breakage */
|
||||||
|
struct timeval before, after;
|
||||||
|
int rc;
|
||||||
|
size_t us;
|
||||||
|
|
||||||
|
gettimeofday(&before, NULL);
|
||||||
|
rc = poll(NULL, 0, 500);
|
||||||
|
gettimeofday(&after, NULL);
|
||||||
|
|
||||||
|
us = (after.tv_sec - before.tv_sec) * 1000000 +
|
||||||
|
(after.tv_usec - before.tv_usec);
|
||||||
|
|
||||||
|
if(us < 400000) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}" HAVE_POLL_FINE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
@ -0,0 +1,197 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
if(PICKY_COMPILER)
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
|
||||||
|
# https://clang.llvm.org/docs/DiagnosticsReference.html
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||||
|
|
||||||
|
# WPICKY_ENABLE = Options we want to enable as-is.
|
||||||
|
# WPICKY_DETECT = Options we want to test first and enable if available.
|
||||||
|
|
||||||
|
# Prefer the -Wextra alias with clang.
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(WPICKY_ENABLE "-Wextra")
|
||||||
|
else()
|
||||||
|
set(WPICKY_ENABLE "-W")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wall -pedantic
|
||||||
|
)
|
||||||
|
|
||||||
|
# ----------------------------------
|
||||||
|
# Add new options here, if in doubt:
|
||||||
|
# ----------------------------------
|
||||||
|
set(WPICKY_DETECT
|
||||||
|
)
|
||||||
|
|
||||||
|
# Assume these options always exist with both clang and gcc.
|
||||||
|
# Require clang 3.0 / gcc 2.95 or later.
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wbad-function-cast # clang 3.0 gcc 2.95
|
||||||
|
-Wconversion # clang 3.0 gcc 2.95
|
||||||
|
-Winline # clang 1.0 gcc 1.0
|
||||||
|
-Wmissing-declarations # clang 1.0 gcc 2.7
|
||||||
|
-Wmissing-prototypes # clang 1.0 gcc 1.0
|
||||||
|
-Wnested-externs # clang 1.0 gcc 2.7
|
||||||
|
-Wno-long-long # clang 1.0 gcc 2.95
|
||||||
|
-Wno-multichar # clang 1.0 gcc 2.95
|
||||||
|
-Wpointer-arith # clang 1.0 gcc 1.4
|
||||||
|
-Wshadow # clang 1.0 gcc 2.95
|
||||||
|
-Wsign-compare # clang 1.0 gcc 2.95
|
||||||
|
-Wundef # clang 1.0 gcc 2.95
|
||||||
|
-Wunused # clang 1.1 gcc 2.95
|
||||||
|
-Wwrite-strings # clang 1.0 gcc 1.4
|
||||||
|
)
|
||||||
|
|
||||||
|
# Always enable with clang, version dependent with gcc
|
||||||
|
set(WPICKY_COMMON_OLD
|
||||||
|
-Wcast-align # clang 1.0 gcc 4.2
|
||||||
|
-Wdeclaration-after-statement # clang 1.0 gcc 3.4
|
||||||
|
-Wempty-body # clang 3.0 gcc 4.3
|
||||||
|
-Wendif-labels # clang 1.0 gcc 3.3
|
||||||
|
-Wfloat-equal # clang 1.0 gcc 2.96 (3.0)
|
||||||
|
-Wignored-qualifiers # clang 3.0 gcc 4.3
|
||||||
|
-Wno-format-nonliteral # clang 1.0 gcc 2.96 (3.0)
|
||||||
|
-Wno-sign-conversion # clang 3.0 gcc 4.3
|
||||||
|
-Wno-system-headers # clang 1.0 gcc 3.0
|
||||||
|
-Wstrict-prototypes # clang 1.0 gcc 3.3
|
||||||
|
-Wtype-limits # clang 3.0 gcc 4.3
|
||||||
|
-Wvla # clang 2.8 gcc 4.3
|
||||||
|
)
|
||||||
|
|
||||||
|
set(WPICKY_COMMON
|
||||||
|
-Wdouble-promotion # clang 3.6 gcc 4.6 appleclang 6.3
|
||||||
|
-Wenum-conversion # clang 3.2 gcc 10.0 appleclang 4.6 g++ 11.0
|
||||||
|
-Wunused-const-variable # clang 3.4 gcc 6.0 appleclang 5.1
|
||||||
|
)
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
${WPICKY_COMMON_OLD}
|
||||||
|
-Wshift-sign-overflow # clang 2.9
|
||||||
|
-Wshorten-64-to-32 # clang 1.0
|
||||||
|
)
|
||||||
|
# Enable based on compiler version
|
||||||
|
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6) OR
|
||||||
|
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.3))
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
${WPICKY_COMMON}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.9) OR
|
||||||
|
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.3))
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wcomma # clang 3.9 appleclang 8.3
|
||||||
|
-Wmissing-variable-declarations # clang 3.2 appleclang 4.6
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0) OR
|
||||||
|
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.3))
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wassign-enum # clang 7.0 appleclang 10.3
|
||||||
|
-Wextra-semi-stmt # clang 7.0 appleclang 10.3
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
else() # gcc
|
||||||
|
list(APPEND WPICKY_DETECT
|
||||||
|
${WPICKY_COMMON}
|
||||||
|
)
|
||||||
|
# Enable based on compiler version
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.3)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
${WPICKY_COMMON_OLD}
|
||||||
|
-Wmissing-parameter-type # gcc 4.3
|
||||||
|
-Wold-style-declaration # gcc 4.3
|
||||||
|
-Wstrict-aliasing=3 # gcc 4.0
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5 AND MINGW)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wno-pedantic-ms-format # gcc 4.5 (mingw-only)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wformat=2 # clang 3.0 gcc 4.8 (clang part-default, enabling it fully causes -Wformat-nonliteral warnings)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Warray-bounds=2 -ftree-vrp # clang 3.0 gcc 5.0 (clang default: -Warray-bounds)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wduplicated-cond # gcc 6.0
|
||||||
|
-Wnull-dereference # clang 3.0 gcc 6.0 (clang default)
|
||||||
|
-fdelete-null-pointer-checks
|
||||||
|
-Wshift-negative-value # clang 3.7 gcc 6.0 (clang default)
|
||||||
|
-Wshift-overflow=2 # clang 3.0 gcc 6.0 (clang default: -Wshift-overflow)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Walloc-zero # gcc 7.0
|
||||||
|
-Wduplicated-branches # gcc 7.0
|
||||||
|
-Wformat-overflow=2 # gcc 7.0
|
||||||
|
-Wformat-truncation=1 # gcc 7.0
|
||||||
|
-Wrestrict # gcc 7.0
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Warith-conversion # gcc 10.0
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
unset(WPICKY)
|
||||||
|
|
||||||
|
foreach(_CCOPT ${WPICKY_ENABLE})
|
||||||
|
set(WPICKY "${WPICKY} ${_CCOPT}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_CCOPT ${WPICKY_DETECT})
|
||||||
|
# surprisingly, CHECK_C_COMPILER_FLAG needs a new variable to store each new
|
||||||
|
# test result in.
|
||||||
|
string(MAKE_C_IDENTIFIER "OPT${_CCOPT}" _optvarname)
|
||||||
|
# GCC only warns about unknown -Wno- options if there are also other diagnostic messages,
|
||||||
|
# so test for the positive form instead
|
||||||
|
string(REPLACE "-Wno-" "-W" _CCOPT_ON "${_CCOPT}")
|
||||||
|
check_c_compiler_flag(${_CCOPT_ON} ${_optvarname})
|
||||||
|
if(${_optvarname})
|
||||||
|
set(WPICKY "${WPICKY} ${_CCOPT}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
message(STATUS "Picky compiler options:${WPICKY}")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WPICKY}")
|
||||||
|
endif()
|
||||||
|
endif()
|
@ -0,0 +1,91 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(NOT UNIX)
|
||||||
|
if(WIN32)
|
||||||
|
set(HAVE_LIBSOCKET 0)
|
||||||
|
set(HAVE_GETHOSTNAME 1)
|
||||||
|
set(HAVE_LIBZ 0)
|
||||||
|
|
||||||
|
set(HAVE_ARPA_INET_H 0)
|
||||||
|
set(HAVE_FCNTL_H 1)
|
||||||
|
set(HAVE_IO_H 1)
|
||||||
|
set(HAVE_NETDB_H 0)
|
||||||
|
set(HAVE_NETINET_IN_H 0)
|
||||||
|
set(HAVE_NET_IF_H 0)
|
||||||
|
set(HAVE_PWD_H 0)
|
||||||
|
set(HAVE_SETJMP_H 1)
|
||||||
|
set(HAVE_SIGNAL_H 1)
|
||||||
|
set(HAVE_STDLIB_H 1)
|
||||||
|
set(HAVE_STRINGS_H 0)
|
||||||
|
set(HAVE_STRING_H 1)
|
||||||
|
set(HAVE_SYS_PARAM_H 0)
|
||||||
|
set(HAVE_SYS_POLL_H 0)
|
||||||
|
set(HAVE_SYS_SELECT_H 0)
|
||||||
|
set(HAVE_SYS_SOCKET_H 0)
|
||||||
|
set(HAVE_SYS_SOCKIO_H 0)
|
||||||
|
set(HAVE_SYS_STAT_H 1)
|
||||||
|
set(HAVE_SYS_TIME_H 0)
|
||||||
|
set(HAVE_SYS_TYPES_H 1)
|
||||||
|
set(HAVE_SYS_UTIME_H 1)
|
||||||
|
set(HAVE_TERMIOS_H 0)
|
||||||
|
set(HAVE_TERMIO_H 0)
|
||||||
|
set(HAVE_TIME_H 1)
|
||||||
|
set(HAVE_UTIME_H 0)
|
||||||
|
|
||||||
|
set(HAVE_SOCKET 1)
|
||||||
|
set(HAVE_SELECT 1)
|
||||||
|
set(HAVE_STRDUP 1)
|
||||||
|
set(HAVE_STRICMP 1)
|
||||||
|
set(HAVE_STRCMPI 1)
|
||||||
|
set(HAVE_GETTIMEOFDAY 0)
|
||||||
|
set(HAVE_CLOSESOCKET 1)
|
||||||
|
set(HAVE_SIGSETJMP 0)
|
||||||
|
set(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1)
|
||||||
|
set(HAVE_GETPASS_R 0)
|
||||||
|
set(HAVE_GETPWUID 0)
|
||||||
|
set(HAVE_GETEUID 0)
|
||||||
|
set(HAVE_UTIME 1)
|
||||||
|
set(HAVE_RAND_EGD 0)
|
||||||
|
set(HAVE_GMTIME_R 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R 0)
|
||||||
|
set(HAVE_SIGNAL 1)
|
||||||
|
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_3 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_5 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_6 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
|
||||||
|
|
||||||
|
set(TIME_WITH_SYS_TIME 0)
|
||||||
|
set(HAVE_O_NONBLOCK 0)
|
||||||
|
set(HAVE_IN_ADDR_T 0)
|
||||||
|
set(STDC_HEADERS 1)
|
||||||
|
|
||||||
|
set(HAVE_SIGACTION 0)
|
||||||
|
set(HAVE_MACRO_SIGSETJMP 0)
|
||||||
|
else()
|
||||||
|
message("This file should be included on Windows platform only")
|
||||||
|
endif()
|
||||||
|
endif()
|
@ -0,0 +1,35 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# File containing various utilities
|
||||||
|
|
||||||
|
# Returns a list of arguments that evaluate to true
|
||||||
|
function(count_true output_count_var)
|
||||||
|
set(lst_len 0)
|
||||||
|
foreach(option_var IN LISTS ARGN)
|
||||||
|
if(${option_var})
|
||||||
|
math(EXPR lst_len "${lst_len} + 1")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
set(${output_count_var} ${lst_len} PARENT_SCOPE)
|
||||||
|
endfunction()
|
@ -0,0 +1,49 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||||
|
endif()
|
||||||
|
message(${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||||
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||||
|
foreach(file ${files})
|
||||||
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||||
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
exec_program(
|
||||||
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||||
|
OUTPUT_VARIABLE rm_out
|
||||||
|
RETURN_VALUE rm_retval
|
||||||
|
)
|
||||||
|
if(NOT "${rm_retval}" STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
@ -0,0 +1,35 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
if(@USE_OPENSSL@)
|
||||||
|
find_dependency(OpenSSL @OPENSSL_VERSION_MAJOR@)
|
||||||
|
endif()
|
||||||
|
if(@USE_ZLIB@)
|
||||||
|
find_dependency(ZLIB @ZLIB_VERSION_MAJOR@)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
|
||||||
|
check_required_components("@PROJECT_NAME@")
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@
|
|||||||
|
COPYRIGHT AND PERMISSION NOTICE
|
||||||
|
|
||||||
|
Copyright (c) 1996 - 2023, Daniel Stenberg, <daniel@haxx.se>, and many
|
||||||
|
contributors, see the THANKS file.
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software for any purpose
|
||||||
|
with or without fee is hereby granted, provided that the above copyright
|
||||||
|
notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||||
|
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||||
|
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of a copyright holder shall not
|
||||||
|
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
|
in this Software without prior written authorization of the copyright holder.
|
@ -0,0 +1,160 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# This script performs all of the steps needed to build a
|
||||||
|
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
||||||
|
#
|
||||||
|
# Hendrik Visage:
|
||||||
|
# Generalizations added since Snowleopard (10.6) do not include
|
||||||
|
# the 10.4u SDK.
|
||||||
|
#
|
||||||
|
# Also note:
|
||||||
|
# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
|
||||||
|
#If you need to have PPC64 support then change below to 1
|
||||||
|
PPC64_NEEDED=0
|
||||||
|
# Apple does not support building for PPC anymore in Xcode 4 and later.
|
||||||
|
# If you're using Xcode 3 or earlier and need PPC support, then change
|
||||||
|
# the setting below to 1
|
||||||
|
PPC_NEEDED=0
|
||||||
|
|
||||||
|
# For me the default is to develop for the platform I am on, and if you
|
||||||
|
#desire compatibility with older versions then change USE_OLD to 1 :)
|
||||||
|
USE_OLD=0
|
||||||
|
|
||||||
|
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
||||||
|
FRAMEWORK_VERSION=Versions/Release-$VERSION
|
||||||
|
|
||||||
|
#I also wanted to "copy over" the system, and thus the reason I added the
|
||||||
|
# version to Versions/Release-7.20.1 etc.
|
||||||
|
# now a simple rsync -vaP libcurl.framework /Library/Frameworks will install it
|
||||||
|
# and setup the right paths to this version, leaving the system version
|
||||||
|
# "intact", so you can "fix" it later with the links to Versions/A/...
|
||||||
|
|
||||||
|
DEVELOPER_PATH=`xcode-select --print-path`
|
||||||
|
# Around Xcode 4.3, SDKs were moved from the Developer folder into the
|
||||||
|
# MacOSX.platform folder
|
||||||
|
if test -d "$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"; then
|
||||||
|
SDK_PATH="$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"
|
||||||
|
else
|
||||||
|
SDK_PATH="$DEVELOPER_PATH/SDKs"
|
||||||
|
fi
|
||||||
|
OLD_SDK=`ls $SDK_PATH|head -1`
|
||||||
|
NEW_SDK=`ls -r $SDK_PATH|head -1`
|
||||||
|
|
||||||
|
if test "0"$USE_OLD -gt 0
|
||||||
|
then
|
||||||
|
SDK32=$OLD_SDK
|
||||||
|
else
|
||||||
|
SDK32=$NEW_SDK
|
||||||
|
fi
|
||||||
|
|
||||||
|
MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||||
|
|
||||||
|
SDK32_DIR=$SDK_PATH/$SDK32
|
||||||
|
MINVER32='-mmacosx-version-min='$MACVER
|
||||||
|
if test $PPC_NEEDED -gt 0; then
|
||||||
|
ARCHES32='-arch i386 -arch ppc'
|
||||||
|
else
|
||||||
|
ARCHES32='-arch i386'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $PPC64_NEEDED -gt 0
|
||||||
|
then
|
||||||
|
SDK64=10.5
|
||||||
|
ARCHES64='-arch x86_64 -arch ppc64'
|
||||||
|
SDK64=`ls $SDK_PATH | grep "10\.5" | head -1`
|
||||||
|
else
|
||||||
|
ARCHES64='-arch x86_64'
|
||||||
|
#We "know" that 10.4 and earlier do not support 64bit
|
||||||
|
OLD_SDK64=`ls $SDK_PATH | grep -v "10\.[0-4]" | head -1`
|
||||||
|
NEW_SDK64=`ls -r $SDK_PATH | grep -v "10\.[0-4][^0-9]" | head -1`
|
||||||
|
if test $USE_OLD -gt 0
|
||||||
|
then
|
||||||
|
SDK64=$OLD_SDK64
|
||||||
|
else
|
||||||
|
SDK64=$NEW_SDK64
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
SDK64_DIR=$SDK_PATH/$SDK64
|
||||||
|
MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||||
|
|
||||||
|
MINVER64='-mmacosx-version-min='$MACVER64
|
||||||
|
|
||||||
|
if test ! -z $SDK32; then
|
||||||
|
echo "----Configuring libcurl for 32 bit universal framework..."
|
||||||
|
make clean
|
||||||
|
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-secure-transport \
|
||||||
|
CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32" \
|
||||||
|
LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 -Wl,-headerpad_max_install_names" \
|
||||||
|
CC=$CC
|
||||||
|
|
||||||
|
echo "----Building 32 bit libcurl..."
|
||||||
|
make -j `sysctl -n hw.logicalcpu_max`
|
||||||
|
|
||||||
|
echo "----Creating 32 bit framework..."
|
||||||
|
rm -r libcurl.framework
|
||||||
|
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
|
||||||
|
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
cp lib/libcurl.plist libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
|
||||||
|
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||||
|
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||||
|
pushd libcurl.framework
|
||||||
|
ln -fs ${FRAMEWORK_VERSION}/libcurl libcurl
|
||||||
|
ln -fs ${FRAMEWORK_VERSION}/Resources Resources
|
||||||
|
ln -fs ${FRAMEWORK_VERSION}/Headers Headers
|
||||||
|
cd Versions
|
||||||
|
ln -fs $(basename "${FRAMEWORK_VERSION}") Current
|
||||||
|
|
||||||
|
echo Testing for SDK64
|
||||||
|
if test -d $SDK64_DIR; then
|
||||||
|
echo entering...
|
||||||
|
popd
|
||||||
|
make clean
|
||||||
|
echo "----Configuring libcurl for 64 bit universal framework..."
|
||||||
|
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-secure-transport \
|
||||||
|
CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64" \
|
||||||
|
LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 -Wl,-headerpad_max_install_names" \
|
||||||
|
CC=$CC
|
||||||
|
|
||||||
|
echo "----Building 64 bit libcurl..."
|
||||||
|
make -j `sysctl -n hw.logicalcpu_max`
|
||||||
|
|
||||||
|
echo "----Appending 64 bit framework to 32 bit framework..."
|
||||||
|
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
|
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
|
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
|
||||||
|
pwd
|
||||||
|
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
|
fi
|
||||||
|
|
||||||
|
pwd
|
||||||
|
lipo -info libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
echo "libcurl.framework is built and can now be included in other projects."
|
||||||
|
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
|
||||||
|
else
|
||||||
|
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4/5/6 SDK installed."
|
||||||
|
fi
|
@ -0,0 +1,92 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
all:
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
ssl:
|
||||||
|
./configure --with-openssl
|
||||||
|
make
|
||||||
|
|
||||||
|
mingw32:
|
||||||
|
$(MAKE) -C lib -f Makefile.mk
|
||||||
|
$(MAKE) -C src -f Makefile.mk
|
||||||
|
|
||||||
|
mingw32-clean:
|
||||||
|
$(MAKE) -C lib -f Makefile.mk clean
|
||||||
|
$(MAKE) -C src -f Makefile.mk clean
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.mk clean
|
||||||
|
|
||||||
|
mingw32-vclean mingw32-distclean:
|
||||||
|
$(MAKE) -C lib -f Makefile.mk vclean
|
||||||
|
$(MAKE) -C src -f Makefile.mk vclean
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.mk vclean
|
||||||
|
|
||||||
|
mingw32-examples%:
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.mk CFG=$@
|
||||||
|
|
||||||
|
mingw32%:
|
||||||
|
$(MAKE) -C lib -f Makefile.mk CFG=$@
|
||||||
|
$(MAKE) -C src -f Makefile.mk CFG=$@
|
||||||
|
|
||||||
|
vc:
|
||||||
|
cd winbuild
|
||||||
|
nmake /f Makefile.vc MACHINE=x86
|
||||||
|
|
||||||
|
vc-x64:
|
||||||
|
cd winbuild
|
||||||
|
nmake /f Makefile.vc MACHINE=x64
|
||||||
|
|
||||||
|
djgpp%:
|
||||||
|
$(MAKE) -C lib -f Makefile.mk CFG=$@ CROSSPREFIX=i586-pc-msdosdjgpp-
|
||||||
|
$(MAKE) -C src -f Makefile.mk CFG=$@ CROSSPREFIX=i586-pc-msdosdjgpp-
|
||||||
|
|
||||||
|
cygwin:
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
cygwin-ssl:
|
||||||
|
./configure --with-openssl
|
||||||
|
make
|
||||||
|
|
||||||
|
amiga%:
|
||||||
|
$(MAKE) -C lib -f Makefile.mk CFG=$@ CROSSPREFIX=m68k-amigaos-
|
||||||
|
$(MAKE) -C src -f Makefile.mk CFG=$@ CROSSPREFIX=m68k-amigaos-
|
||||||
|
|
||||||
|
unix: all
|
||||||
|
|
||||||
|
unix-ssl: ssl
|
||||||
|
|
||||||
|
linux: all
|
||||||
|
|
||||||
|
linux-ssl: ssl
|
||||||
|
|
||||||
|
ca-bundle: scripts/mk-ca-bundle.pl
|
||||||
|
@echo "generate a fresh ca-bundle.crt"
|
||||||
|
@perl $< -b -l -u lib/ca-bundle.crt
|
||||||
|
|
||||||
|
ca-firefox: lib/firefox-db2pem.sh
|
||||||
|
@echo "generate a fresh ca-bundle.crt"
|
||||||
|
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
@ -0,0 +1,614 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
CMAKE_DIST = \
|
||||||
|
CMake/cmake_uninstall.cmake.in \
|
||||||
|
CMake/CMakeConfigurableFile.in \
|
||||||
|
CMake/curl-config.cmake.in \
|
||||||
|
CMake/CurlSymbolHiding.cmake \
|
||||||
|
CMake/CurlTests.c \
|
||||||
|
CMake/FindBearSSL.cmake \
|
||||||
|
CMake/FindBrotli.cmake \
|
||||||
|
CMake/FindCARES.cmake \
|
||||||
|
CMake/FindGSS.cmake \
|
||||||
|
CMake/FindLibPSL.cmake \
|
||||||
|
CMake/FindLibSSH2.cmake \
|
||||||
|
CMake/FindMbedTLS.cmake \
|
||||||
|
CMake/FindMSH3.cmake \
|
||||||
|
CMake/FindNGHTTP2.cmake \
|
||||||
|
CMake/FindNGHTTP3.cmake \
|
||||||
|
CMake/FindNGTCP2.cmake \
|
||||||
|
CMake/FindNSS.cmake \
|
||||||
|
CMake/FindQUICHE.cmake \
|
||||||
|
CMake/FindWolfSSL.cmake \
|
||||||
|
CMake/FindZstd.cmake \
|
||||||
|
CMake/Macros.cmake \
|
||||||
|
CMake/OtherTests.cmake \
|
||||||
|
CMake/PickyWarnings.cmake \
|
||||||
|
CMake/Platforms/WindowsCache.cmake \
|
||||||
|
CMake/Utilities.cmake \
|
||||||
|
CMakeLists.txt
|
||||||
|
|
||||||
|
VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl
|
||||||
|
VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist
|
||||||
|
VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC10_SRCTMPL = projects/Windows/VC10/src/curl.tmpl
|
||||||
|
VC10_SRCVCXPROJ = projects/Windows/VC10/src/curl.vcxproj.dist
|
||||||
|
VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl
|
||||||
|
VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist
|
||||||
|
VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC11_SRCTMPL = projects/Windows/VC11/src/curl.tmpl
|
||||||
|
VC11_SRCVCXPROJ = projects/Windows/VC11/src/curl.vcxproj.dist
|
||||||
|
VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl
|
||||||
|
VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist
|
||||||
|
VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC12_SRCTMPL = projects/Windows/VC12/src/curl.tmpl
|
||||||
|
VC12_SRCVCXPROJ = projects/Windows/VC12/src/curl.vcxproj.dist
|
||||||
|
VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC14_LIBTMPL = projects/Windows/VC14/lib/libcurl.tmpl
|
||||||
|
VC14_LIBVCXPROJ = projects/Windows/VC14/lib/libcurl.vcxproj.dist
|
||||||
|
VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl
|
||||||
|
VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist
|
||||||
|
VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC14_10_LIBTMPL = projects/Windows/VC14.10/lib/libcurl.tmpl
|
||||||
|
VC14_10_LIBVCXPROJ = projects/Windows/VC14.10/lib/libcurl.vcxproj.dist
|
||||||
|
VC14_10_LIBVCXPROJ_DEPS = $(VC14_10_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC14_10_SRCTMPL = projects/Windows/VC14.10/src/curl.tmpl
|
||||||
|
VC14_10_SRCVCXPROJ = projects/Windows/VC14.10/src/curl.vcxproj.dist
|
||||||
|
VC14_10_SRCVCXPROJ_DEPS = $(VC14_10_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC14_30_LIBTMPL = projects/Windows/VC14.30/lib/libcurl.tmpl
|
||||||
|
VC14_30_LIBVCXPROJ = projects/Windows/VC14.30/lib/libcurl.vcxproj.dist
|
||||||
|
VC14_30_LIBVCXPROJ_DEPS = $(VC14_30_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC14_30_SRCTMPL = projects/Windows/VC14.30/src/curl.tmpl
|
||||||
|
VC14_30_SRCVCXPROJ = projects/Windows/VC14.30/src/curl.vcxproj.dist
|
||||||
|
VC14_30_SRCVCXPROJ_DEPS = $(VC14_30_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC_DIST = projects/README.md \
|
||||||
|
projects/build-openssl.bat \
|
||||||
|
projects/build-wolfssl.bat \
|
||||||
|
projects/checksrc.bat \
|
||||||
|
projects/Windows/VC10/curl-all.sln \
|
||||||
|
projects/Windows/VC10/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC10/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC10/src/curl.sln \
|
||||||
|
projects/Windows/VC10/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC11/curl-all.sln \
|
||||||
|
projects/Windows/VC11/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC11/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC11/src/curl.sln \
|
||||||
|
projects/Windows/VC11/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC12/curl-all.sln \
|
||||||
|
projects/Windows/VC12/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC12/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC12/src/curl.sln \
|
||||||
|
projects/Windows/VC12/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14/curl-all.sln \
|
||||||
|
projects/Windows/VC14/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC14/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14/src/curl.sln \
|
||||||
|
projects/Windows/VC14/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14.10/curl-all.sln \
|
||||||
|
projects/Windows/VC14.10/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC14.10/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14.10/src/curl.sln \
|
||||||
|
projects/Windows/VC14.10/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14.30/curl-all.sln \
|
||||||
|
projects/Windows/VC14.30/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC14.30/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14.30/src/curl.sln \
|
||||||
|
projects/Windows/VC14.30/src/curl.vcxproj.filters \
|
||||||
|
projects/generate.bat \
|
||||||
|
projects/wolfssl_options.h \
|
||||||
|
projects/wolfssl_override.props
|
||||||
|
|
||||||
|
WINBUILD_DIST = winbuild/README.md winbuild/gen_resp_file.bat \
|
||||||
|
winbuild/MakefileBuild.vc winbuild/Makefile.vc
|
||||||
|
|
||||||
|
PLAN9_DIST = plan9/include/mkfile \
|
||||||
|
plan9/include/mkfile \
|
||||||
|
plan9/mkfile.proto \
|
||||||
|
plan9/mkfile \
|
||||||
|
plan9/README \
|
||||||
|
plan9/lib/mkfile.inc \
|
||||||
|
plan9/lib/mkfile \
|
||||||
|
plan9/src/mkfile.inc \
|
||||||
|
plan9/src/mkfile
|
||||||
|
|
||||||
|
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||||
|
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework $(CMAKE_DIST) \
|
||||||
|
$(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) lib/libcurl.vers.in buildconf.bat
|
||||||
|
|
||||||
|
CLEANFILES = $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) $(VC11_LIBVCXPROJ) \
|
||||||
|
$(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) $(VC14_LIBVCXPROJ) \
|
||||||
|
$(VC14_SRCVCXPROJ) $(VC14_10_LIBVCXPROJ) $(VC14_10_SRCVCXPROJ) \
|
||||||
|
$(VC14_30_LIBVCXPROJ) $(VC14_30_SRCVCXPROJ)
|
||||||
|
|
||||||
|
bin_SCRIPTS = curl-config
|
||||||
|
|
||||||
|
SUBDIRS = lib src
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = libcurl.pc
|
||||||
|
|
||||||
|
# List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files
|
||||||
|
include lib/Makefile.inc
|
||||||
|
include src/Makefile.inc
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
rm -rf $(top_builddir)/tests/log
|
||||||
|
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||||
|
(distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
|
||||||
|
for file in $$distit; do \
|
||||||
|
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
||||||
|
cp -p $$file $(distdir)$$strip; \
|
||||||
|
done)
|
||||||
|
|
||||||
|
html:
|
||||||
|
cd docs && $(MAKE) html
|
||||||
|
|
||||||
|
pdf:
|
||||||
|
cd docs && $(MAKE) pdf
|
||||||
|
|
||||||
|
check: test examples check-docs
|
||||||
|
|
||||||
|
if CROSSCOMPILING
|
||||||
|
test-full: test
|
||||||
|
test-torture: test
|
||||||
|
|
||||||
|
test:
|
||||||
|
@echo "NOTICE: we can't run the tests when cross-compiling!"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
test:
|
||||||
|
@(cd tests; $(MAKE) all quiet-test)
|
||||||
|
|
||||||
|
test-full:
|
||||||
|
@(cd tests; $(MAKE) all full-test)
|
||||||
|
|
||||||
|
test-nonflaky:
|
||||||
|
@(cd tests; $(MAKE) all nonflaky-test)
|
||||||
|
|
||||||
|
test-torture:
|
||||||
|
@(cd tests; $(MAKE) all torture-test)
|
||||||
|
|
||||||
|
test-event:
|
||||||
|
@(cd tests; $(MAKE) all event-test)
|
||||||
|
|
||||||
|
test-am:
|
||||||
|
@(cd tests; $(MAKE) all am-test)
|
||||||
|
|
||||||
|
test-ci:
|
||||||
|
@(cd tests; $(MAKE) all ci-test)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
examples:
|
||||||
|
@(cd docs/examples; $(MAKE) check)
|
||||||
|
|
||||||
|
check-docs:
|
||||||
|
@(cd docs/libcurl; $(MAKE) check)
|
||||||
|
|
||||||
|
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||||
|
# must contain the following line:
|
||||||
|
# %_topdir /home/loic/local/rpm
|
||||||
|
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
|
||||||
|
#
|
||||||
|
# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
|
||||||
|
#
|
||||||
|
# If additional configure flags are needed to build the package, add the
|
||||||
|
# following in ~/.rpmmacros
|
||||||
|
# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
|
||||||
|
# and run make rpm in the following way:
|
||||||
|
# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
|
||||||
|
#
|
||||||
|
|
||||||
|
rpms:
|
||||||
|
$(MAKE) RPMDIST=curl rpm
|
||||||
|
$(MAKE) RPMDIST=curl-ssl rpm
|
||||||
|
|
||||||
|
rpm:
|
||||||
|
RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
|
||||||
|
cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
|
||||||
|
cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
|
||||||
|
rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
|
||||||
|
mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
|
||||||
|
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build a Solaris pkgadd format file
|
||||||
|
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
|
||||||
|
# file (which ends up back in this directory).
|
||||||
|
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
|
||||||
|
# pkgadd -d ./HAXXcurl-*
|
||||||
|
#
|
||||||
|
|
||||||
|
# gak - libtool requires an absolute directory, hence the pwd below...
|
||||||
|
pkgadd:
|
||||||
|
umask 022 ; \
|
||||||
|
$(MAKE) install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
|
||||||
|
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
|
||||||
|
cd $(srcdir)/packages/Solaris && $(MAKE) package
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build a cygwin binary tarball installation file
|
||||||
|
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
|
||||||
|
cygwinbin:
|
||||||
|
$(MAKE) -C packages/Win32/cygwin cygwinbin
|
||||||
|
|
||||||
|
# We extend the standard install with a custom hook:
|
||||||
|
install-data-hook:
|
||||||
|
(cd include && $(MAKE) install)
|
||||||
|
(cd docs && $(MAKE) install)
|
||||||
|
(cd docs/libcurl && $(MAKE) install)
|
||||||
|
|
||||||
|
# We extend the standard uninstall with a custom hook:
|
||||||
|
uninstall-hook:
|
||||||
|
(cd include && $(MAKE) uninstall)
|
||||||
|
(cd docs && $(MAKE) uninstall)
|
||||||
|
(cd docs/libcurl && $(MAKE) uninstall)
|
||||||
|
|
||||||
|
ca-bundle: $(srcdir)/scripts/mk-ca-bundle.pl
|
||||||
|
@echo "generating a fresh ca-bundle.crt"
|
||||||
|
@perl $(srcdir)/scripts/mk-ca-bundle.pl -b -l -u lib/ca-bundle.crt
|
||||||
|
|
||||||
|
ca-firefox: $(srcdir)/scripts/firefox-db2pem.sh
|
||||||
|
@echo "generating a fresh ca-bundle.crt"
|
||||||
|
$(srcdir)/scripts/firefox-db2pem.sh lib/ca-bundle.crt
|
||||||
|
|
||||||
|
checksrc:
|
||||||
|
(cd lib && $(MAKE) checksrc)
|
||||||
|
(cd src && $(MAKE) checksrc)
|
||||||
|
(cd tests && $(MAKE) checksrc)
|
||||||
|
(cd include/curl && $(MAKE) checksrc)
|
||||||
|
(cd docs/examples && $(MAKE) checksrc)
|
||||||
|
(cd packages && $(MAKE) checksrc)
|
||||||
|
|
||||||
|
.PHONY: vc-ide
|
||||||
|
|
||||||
|
vc-ide: $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \
|
||||||
|
$(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \
|
||||||
|
$(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) \
|
||||||
|
$(VC14_10_LIBVCXPROJ_DEPS) $(VC14_10_SRCVCXPROJ_DEPS) \
|
||||||
|
$(VC14_30_LIBVCXPROJ_DEPS) $(VC14_30_SRCVCXPROJ_DEPS)
|
||||||
|
@(win32_lib_srcs='$(LIB_CFILES)'; \
|
||||||
|
win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \
|
||||||
|
win32_lib_rc='$(LIB_RCFILES)'; \
|
||||||
|
win32_lib_vauth_srcs='$(LIB_VAUTH_CFILES)'; \
|
||||||
|
win32_lib_vauth_hdrs='$(LIB_VAUTH_HFILES)'; \
|
||||||
|
win32_lib_vquic_srcs='$(LIB_VQUIC_CFILES)'; \
|
||||||
|
win32_lib_vquic_hdrs='$(LIB_VQUIC_HFILES)'; \
|
||||||
|
win32_lib_vssh_srcs='$(LIB_VSSH_CFILES)'; \
|
||||||
|
win32_lib_vssh_hdrs='$(LIB_VSSH_HFILES)'; \
|
||||||
|
win32_lib_vtls_srcs='$(LIB_VTLS_CFILES)'; \
|
||||||
|
win32_lib_vtls_hdrs='$(LIB_VTLS_HFILES)'; \
|
||||||
|
win32_src_srcs='$(CURL_CFILES)'; \
|
||||||
|
win32_src_hdrs='$(CURL_HFILES)'; \
|
||||||
|
win32_src_rc='$(CURL_RCFILES)'; \
|
||||||
|
win32_src_x_srcs='$(CURLX_CFILES)'; \
|
||||||
|
win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \
|
||||||
|
\
|
||||||
|
sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vauth_srcs=`for file in $$win32_lib_vauth_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vauth_hdrs=`for file in $$win32_lib_vauth_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vquic_srcs=`for file in $$win32_lib_vquic_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vquic_hdrs=`for file in $$win32_lib_vquic_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vssh_srcs=`for file in $$win32_lib_vssh_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vssh_hdrs=`for file in $$win32_lib_vssh_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vtls_srcs=`for file in $$win32_lib_vtls_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \
|
||||||
|
\
|
||||||
|
awk_code='\
|
||||||
|
function gen_element(type, dir, file)\
|
||||||
|
{\
|
||||||
|
sub(/vauth\//, "", file);\
|
||||||
|
sub(/vquic\//, "", file);\
|
||||||
|
sub(/vssh\//, "", file);\
|
||||||
|
sub(/vtls\//, "", file);\
|
||||||
|
\
|
||||||
|
spaces=" ";\
|
||||||
|
if(dir == "lib\\vauth" ||\
|
||||||
|
dir == "lib\\vquic" ||\
|
||||||
|
dir == "lib\\vssh" ||\
|
||||||
|
dir == "lib\\vtls")\
|
||||||
|
tabs=" ";\
|
||||||
|
else\
|
||||||
|
tabs=" ";\
|
||||||
|
\
|
||||||
|
if(type == "dsp") {\
|
||||||
|
printf("# Begin Source File\r\n");\
|
||||||
|
printf("\r\n");\
|
||||||
|
printf("SOURCE=..\\..\\..\\..\\%s\\%s\r\n", dir, file);\
|
||||||
|
printf("# End Source File\r\n");\
|
||||||
|
}\
|
||||||
|
else if(type == "vcproj1") {\
|
||||||
|
printf("%s<File\r\n", tabs);\
|
||||||
|
printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\">\r\n",\
|
||||||
|
tabs, dir, file);\
|
||||||
|
printf("%s</File>\r\n", tabs);\
|
||||||
|
}\
|
||||||
|
else if(type == "vcproj2") {\
|
||||||
|
printf("%s<File\r\n", tabs);\
|
||||||
|
printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\"\r\n",\
|
||||||
|
tabs, dir, file);\
|
||||||
|
printf("%s>\r\n", tabs);\
|
||||||
|
printf("%s</File>\r\n", tabs);\
|
||||||
|
}\
|
||||||
|
else if(type == "vcxproj") {\
|
||||||
|
i = index(file, ".");\
|
||||||
|
ext = substr(file, i == 0 ? 0 : i + 1);\
|
||||||
|
\
|
||||||
|
if(ext == "c")\
|
||||||
|
printf("%s<ClCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||||
|
spaces, dir, file);\
|
||||||
|
else if(ext == "h")\
|
||||||
|
printf("%s<ClInclude Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||||
|
spaces, dir, file);\
|
||||||
|
else if(ext == "rc")\
|
||||||
|
printf("%s<ResourceCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||||
|
spaces, dir, file);\
|
||||||
|
}\
|
||||||
|
}\
|
||||||
|
\
|
||||||
|
{\
|
||||||
|
\
|
||||||
|
if($$0 == "CURL_LIB_C_FILES") {\
|
||||||
|
split(lib_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_H_FILES") {\
|
||||||
|
split(lib_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_RC_FILES") {\
|
||||||
|
split(lib_rc, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VAUTH_C_FILES") {\
|
||||||
|
split(lib_vauth_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VAUTH_H_FILES") {\
|
||||||
|
split(lib_vauth_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VQUIC_C_FILES") {\
|
||||||
|
split(lib_vquic_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VQUIC_H_FILES") {\
|
||||||
|
split(lib_vquic_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VSSH_C_FILES") {\
|
||||||
|
split(lib_vssh_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VSSH_H_FILES") {\
|
||||||
|
split(lib_vssh_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VTLS_C_FILES") {\
|
||||||
|
split(lib_vtls_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VTLS_H_FILES") {\
|
||||||
|
split(lib_vtls_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_C_FILES") {\
|
||||||
|
split(src_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_H_FILES") {\
|
||||||
|
split(src_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_RC_FILES") {\
|
||||||
|
split(src_rc, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_X_C_FILES") {\
|
||||||
|
split(src_x_srcs, arr);\
|
||||||
|
for(val in arr) {\
|
||||||
|
sub(/..\/lib\//, "", arr[val]);\
|
||||||
|
gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_X_H_FILES") {\
|
||||||
|
split(src_x_hdrs, arr);\
|
||||||
|
for(val in arr) {\
|
||||||
|
sub(/..\/lib\//, "", arr[val]);\
|
||||||
|
gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
}\
|
||||||
|
else\
|
||||||
|
printf("%s\r\n", $$0);\
|
||||||
|
}';\
|
||||||
|
\
|
||||||
|
echo "generating '$(VC10_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC10_LIBTMPL) > $(VC10_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC10_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC11_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC11_LIBTMPL) > $(VC11_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC11_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC12_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC12_LIBTMPL) > $(VC12_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC12_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_LIBTMPL) > $(VC14_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_10_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_10_LIBTMPL) > $(VC14_10_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_10_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_10_SRCTMPL) > $(VC14_10_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_30_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_30_LIBTMPL) > $(VC14_30_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_30_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_30_SRCTMPL) > $(VC14_30_SRCVCXPROJ) || { exit 1; };)
|
||||||
|
|
||||||
|
tidy:
|
||||||
|
(cd src && $(MAKE) tidy)
|
||||||
|
(cd lib && $(MAKE) tidy)
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,55 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
README
|
||||||
|
|
||||||
|
Curl is a command line tool for transferring data specified with URL
|
||||||
|
syntax. Find out how to use curl by reading the curl.1 man page or the
|
||||||
|
MANUAL document. Find out how to install Curl by reading the INSTALL
|
||||||
|
document.
|
||||||
|
|
||||||
|
libcurl is the library curl is using to do its job. It is readily
|
||||||
|
available to be used by your software. Read the libcurl.3 man page to
|
||||||
|
learn how.
|
||||||
|
|
||||||
|
You find answers to the most frequent questions we get in the FAQ document.
|
||||||
|
|
||||||
|
Study the COPYING file for distribution terms.
|
||||||
|
|
||||||
|
Those documents and more can be found in the docs/ directory.
|
||||||
|
|
||||||
|
CONTACT
|
||||||
|
|
||||||
|
If you have problems, questions, ideas or suggestions, please contact us
|
||||||
|
by posting to a suitable mailing list. See https://curl.se/mail/
|
||||||
|
|
||||||
|
All contributors to the project are listed in the THANKS document.
|
||||||
|
|
||||||
|
WEBSITE
|
||||||
|
|
||||||
|
Visit the curl website for the latest news and downloads:
|
||||||
|
|
||||||
|
https://curl.se/
|
||||||
|
|
||||||
|
GIT
|
||||||
|
|
||||||
|
To download the latest source code off the GIT server, do this:
|
||||||
|
|
||||||
|
git clone https://github.com/curl/curl.git
|
||||||
|
|
||||||
|
(you will get a directory named curl created, filled with the source code)
|
||||||
|
|
||||||
|
SECURITY PROBLEMS
|
||||||
|
|
||||||
|
Report suspected security problems via our HackerOne page and not in public.
|
||||||
|
|
||||||
|
https://hackerone.com/curl
|
||||||
|
|
||||||
|
NOTICE
|
||||||
|
|
||||||
|
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
||||||
|
Kungliga Tekniska Högskolan. This notice is included here to comply with the
|
||||||
|
distribution terms.
|
@ -0,0 +1,61 @@
|
|||||||
|
curl and libcurl 8.1.2
|
||||||
|
|
||||||
|
Public curl releases: 219
|
||||||
|
Command line options: 251
|
||||||
|
curl_easy_setopt() options: 302
|
||||||
|
Public functions in libcurl: 91
|
||||||
|
Contributors: 2888
|
||||||
|
|
||||||
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
|
o configure: quote the assignments for run-compiler [1]
|
||||||
|
o configure: without pkg-config and no custom path, use -lnghttp2 [8]
|
||||||
|
o curl: cache the --trace-time value for a second [9]
|
||||||
|
o http2: fix EOF handling on uploads with auth negotiation [7]
|
||||||
|
o http3: send EOF indicator early as possible [11]
|
||||||
|
o lib1560: verify more scheme guessing [5]
|
||||||
|
o lib: remove unused functions, make single-use static [3]
|
||||||
|
o libcurl.m4: remove trailing 'dnl' that causes this to break autoconf [10]
|
||||||
|
o libssh: when keyboard-interactive auth fails, try password [4]
|
||||||
|
o misc: fix spelling mistakes [2]
|
||||||
|
o page-header: mention curl version and how to figure out current release [13]
|
||||||
|
o page-header: minor wording polish in the URL segment [12]
|
||||||
|
o scripts/singleuse.pl: add more API calls
|
||||||
|
o urlapi: remove superfluous host name check [6]
|
||||||
|
|
||||||
|
This release includes the following known bugs:
|
||||||
|
|
||||||
|
o see docs/KNOWN_BUGS (https://curl.se/docs/knownbugs.html)
|
||||||
|
|
||||||
|
Planned upcoming removals include:
|
||||||
|
|
||||||
|
o gskit
|
||||||
|
o NSS
|
||||||
|
o support for space-separated NOPROXY patterns
|
||||||
|
o support for the original legacy mingw version 1
|
||||||
|
|
||||||
|
See https://curl.se/dev/deprecate.html for details
|
||||||
|
|
||||||
|
This release would not have looked like this without help, code, reports and
|
||||||
|
advice from friends like these:
|
||||||
|
|
||||||
|
Aleksander Mazur, Christian Hesse, correctmost on github, Dan Fandrich,
|
||||||
|
Daniel Stenberg, Emanuele Torre, Gisle Vanem, Kev Jackson,
|
||||||
|
musvaage on github, Sergey Fionov, Stefan Eissing, Viktor Szakats, 左潇峰
|
||||||
|
(13 contributors)
|
||||||
|
|
||||||
|
References to bug reports and discussions on issues:
|
||||||
|
|
||||||
|
[1] = https://curl.se/bug/?i=11179
|
||||||
|
[2] = https://curl.se/bug/?i=11171
|
||||||
|
[3] = https://curl.se/bug/?i=11174
|
||||||
|
[4] = https://curl.se/bug/?i=11196
|
||||||
|
[5] = https://curl.se/bug/?i=11219
|
||||||
|
[6] = https://curl.se/bug/?i=11195
|
||||||
|
[7] = https://curl.se/bug/?i=11194
|
||||||
|
[8] = https://curl.se/bug/?i=11186
|
||||||
|
[9] = https://curl.se/bug/?i=11211
|
||||||
|
[10] = https://curl.se/bug/?i=11212
|
||||||
|
[11] = https://curl.se/bug/?i=11205
|
||||||
|
[12] = https://curl.se/bug/?i=11217
|
||||||
|
[13] = https://curl.se/bug/?i=11216
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
echo "*** Do not use buildconf. Instead, just use: autoreconf -fi" >&2
|
||||||
|
exec ${AUTORECONF:-autoreconf} -fi "${@}"
|
@ -0,0 +1,319 @@
|
|||||||
|
@echo off
|
||||||
|
rem ***************************************************************************
|
||||||
|
rem * _ _ ____ _
|
||||||
|
rem * Project ___| | | | _ \| |
|
||||||
|
rem * / __| | | | |_) | |
|
||||||
|
rem * | (__| |_| | _ <| |___
|
||||||
|
rem * \___|\___/|_| \_\_____|
|
||||||
|
rem *
|
||||||
|
rem * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
rem *
|
||||||
|
rem * This software is licensed as described in the file COPYING, which
|
||||||
|
rem * you should have received as part of this distribution. The terms
|
||||||
|
rem * are also available at https://curl.se/docs/copyright.html.
|
||||||
|
rem *
|
||||||
|
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
rem * copies of the Software, and permit persons to whom the Software is
|
||||||
|
rem * furnished to do so, under the terms of the COPYING file.
|
||||||
|
rem *
|
||||||
|
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
rem * KIND, either express or implied.
|
||||||
|
rem *
|
||||||
|
rem * SPDX-License-Identifier: curl
|
||||||
|
rem *
|
||||||
|
rem ***************************************************************************
|
||||||
|
|
||||||
|
rem NOTES
|
||||||
|
rem
|
||||||
|
rem This batch file must be used to set up a git tree to build on systems where
|
||||||
|
rem there is no autotools support (i.e. DOS and Windows).
|
||||||
|
rem
|
||||||
|
|
||||||
|
:begin
|
||||||
|
rem Set our variables
|
||||||
|
if "%OS%" == "Windows_NT" setlocal
|
||||||
|
set MODE=GENERATE
|
||||||
|
|
||||||
|
rem Switch to this batch file's directory
|
||||||
|
cd /d "%~0\.." 1>NUL 2>&1
|
||||||
|
|
||||||
|
rem Check we are running from a curl git repository
|
||||||
|
if not exist GIT-INFO goto norepo
|
||||||
|
|
||||||
|
rem Detect programs. HAVE_<PROGNAME>
|
||||||
|
rem When not found the variable is set undefined. The undefined pattern
|
||||||
|
rem allows for statements like "if not defined HAVE_PERL (command)"
|
||||||
|
groff --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_GROFF=) else (set HAVE_GROFF=Y)
|
||||||
|
nroff --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_NROFF=) else (set HAVE_NROFF=Y)
|
||||||
|
perl --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_PERL=) else (set HAVE_PERL=Y)
|
||||||
|
gzip --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_GZIP=) else (set HAVE_GZIP=Y)
|
||||||
|
|
||||||
|
:parseArgs
|
||||||
|
if "%~1" == "" goto start
|
||||||
|
|
||||||
|
if /i "%~1" == "-clean" (
|
||||||
|
set MODE=CLEAN
|
||||||
|
) else if /i "%~1" == "-?" (
|
||||||
|
goto syntax
|
||||||
|
) else if /i "%~1" == "-h" (
|
||||||
|
goto syntax
|
||||||
|
) else if /i "%~1" == "-help" (
|
||||||
|
goto syntax
|
||||||
|
) else (
|
||||||
|
goto unknown
|
||||||
|
)
|
||||||
|
|
||||||
|
shift & goto parseArgs
|
||||||
|
|
||||||
|
:start
|
||||||
|
if "%MODE%" == "GENERATE" (
|
||||||
|
echo.
|
||||||
|
echo Generating prerequisite files
|
||||||
|
|
||||||
|
call :generate
|
||||||
|
if errorlevel 3 goto nogenhugehelp
|
||||||
|
if errorlevel 2 goto nogenmakefile
|
||||||
|
if errorlevel 1 goto warning
|
||||||
|
|
||||||
|
) else (
|
||||||
|
echo.
|
||||||
|
echo Removing prerequisite files
|
||||||
|
|
||||||
|
call :clean
|
||||||
|
if errorlevel 2 goto nocleanhugehelp
|
||||||
|
if errorlevel 1 goto nocleanmakefile
|
||||||
|
)
|
||||||
|
|
||||||
|
goto success
|
||||||
|
|
||||||
|
rem Main generate function.
|
||||||
|
rem
|
||||||
|
rem Returns:
|
||||||
|
rem
|
||||||
|
rem 0 - success
|
||||||
|
rem 1 - success with simplified tool_hugehelp.c
|
||||||
|
rem 2 - failed to generate Makefile
|
||||||
|
rem 3 - failed to generate tool_hugehelp.c
|
||||||
|
rem
|
||||||
|
:generate
|
||||||
|
if "%OS%" == "Windows_NT" setlocal
|
||||||
|
set BASIC_HUGEHELP=0
|
||||||
|
|
||||||
|
rem Create Makefile
|
||||||
|
echo * %CD%\Makefile
|
||||||
|
if exist Makefile.dist (
|
||||||
|
copy /Y Makefile.dist Makefile 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
rem Create tool_hugehelp.c
|
||||||
|
echo * %CD%\src\tool_hugehelp.c
|
||||||
|
call :genHugeHelp
|
||||||
|
if errorlevel 2 (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 3
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
set BASIC_HUGEHELP=1
|
||||||
|
)
|
||||||
|
cmd /c exit 0
|
||||||
|
|
||||||
|
rem Setup c-ares git tree
|
||||||
|
if exist ares\buildconf.bat (
|
||||||
|
echo.
|
||||||
|
echo Configuring c-ares build environment
|
||||||
|
cd ares
|
||||||
|
call buildconf.bat
|
||||||
|
cd ..
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%BASIC_HUGEHELP%" == "1" (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
|
rem Main clean function.
|
||||||
|
rem
|
||||||
|
rem Returns:
|
||||||
|
rem
|
||||||
|
rem 0 - success
|
||||||
|
rem 1 - failed to clean Makefile
|
||||||
|
rem 2 - failed to clean tool_hugehelp.c
|
||||||
|
rem
|
||||||
|
:clean
|
||||||
|
rem Remove Makefile
|
||||||
|
echo * %CD%\Makefile
|
||||||
|
if exist Makefile (
|
||||||
|
del Makefile 2>NUL
|
||||||
|
if exist Makefile (
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
rem Remove tool_hugehelp.c
|
||||||
|
echo * %CD%\src\tool_hugehelp.c
|
||||||
|
if exist src\tool_hugehelp.c (
|
||||||
|
del src\tool_hugehelp.c 2>NUL
|
||||||
|
if exist src\tool_hugehelp.c (
|
||||||
|
exit /B 2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
exit /B
|
||||||
|
|
||||||
|
rem Function to generate src\tool_hugehelp.c
|
||||||
|
rem
|
||||||
|
rem Returns:
|
||||||
|
rem
|
||||||
|
rem 0 - full tool_hugehelp.c generated
|
||||||
|
rem 1 - simplified tool_hugehelp.c
|
||||||
|
rem 2 - failure
|
||||||
|
rem
|
||||||
|
:genHugeHelp
|
||||||
|
if "%OS%" == "Windows_NT" setlocal
|
||||||
|
set LC_ALL=C
|
||||||
|
set ROFFCMD=
|
||||||
|
set BASIC=1
|
||||||
|
|
||||||
|
if defined HAVE_PERL (
|
||||||
|
if defined HAVE_GROFF (
|
||||||
|
set ROFFCMD=groff -mtty-char -Tascii -P-c -man
|
||||||
|
) else if defined HAVE_NROFF (
|
||||||
|
set ROFFCMD=nroff -c -Tascii -man
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if defined ROFFCMD (
|
||||||
|
echo #include "tool_setup.h"> src\tool_hugehelp.c
|
||||||
|
echo #include "tool_hugehelp.h">> src\tool_hugehelp.c
|
||||||
|
|
||||||
|
if defined HAVE_GZIP (
|
||||||
|
echo #ifndef HAVE_LIBZ>> src\tool_hugehelp.c
|
||||||
|
)
|
||||||
|
|
||||||
|
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl docs\MANUAL >> src\tool_hugehelp.c
|
||||||
|
if defined HAVE_GZIP (
|
||||||
|
echo #else>> src\tool_hugehelp.c
|
||||||
|
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl -c docs\MANUAL >> src\tool_hugehelp.c
|
||||||
|
echo #endif /^* HAVE_LIBZ ^*/>> src\tool_hugehelp.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set BASIC=0
|
||||||
|
) else (
|
||||||
|
if exist src\tool_hugehelp.c.cvs (
|
||||||
|
copy /Y src\tool_hugehelp.c.cvs src\tool_hugehelp.c 1>NUL 2>&1
|
||||||
|
) else (
|
||||||
|
echo #include "tool_setup.h"> src\tool_hugehelp.c
|
||||||
|
echo #include "tool_hugehelp.h">> src\tool_hugehelp.c
|
||||||
|
echo.>> src\tool_hugehelp.c
|
||||||
|
echo void hugehelp(void^)>> src\tool_hugehelp.c
|
||||||
|
echo {>> src\tool_hugehelp.c
|
||||||
|
echo #ifdef USE_MANUAL>> src\tool_hugehelp.c
|
||||||
|
echo fputs("Built-in manual not included\n", stdout^);>> src\tool_hugehelp.c
|
||||||
|
echo #endif>> src\tool_hugehelp.c
|
||||||
|
echo }>> src\tool_hugehelp.c
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
findstr "/C:void hugehelp(void)" src\tool_hugehelp.c 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 2
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%BASIC%" == "1" (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
|
rem Function to clean-up local variables under DOS, Windows 3.x and
|
||||||
|
rem Windows 9x as setlocal isn't available until Windows NT
|
||||||
|
rem
|
||||||
|
:dosCleanup
|
||||||
|
set MODE=
|
||||||
|
set HAVE_GROFF=
|
||||||
|
set HAVE_NROFF=
|
||||||
|
set HAVE_PERL=
|
||||||
|
set HAVE_GZIP=
|
||||||
|
set BASIC_HUGEHELP=
|
||||||
|
set LC_ALL
|
||||||
|
set ROFFCMD=
|
||||||
|
set BASIC=
|
||||||
|
|
||||||
|
exit /B
|
||||||
|
|
||||||
|
:syntax
|
||||||
|
rem Display the help
|
||||||
|
echo.
|
||||||
|
echo Usage: buildconf [-clean]
|
||||||
|
echo.
|
||||||
|
echo -clean - Removes the files
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:unknown
|
||||||
|
echo.
|
||||||
|
echo Error: Unknown argument '%1'
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:norepo
|
||||||
|
echo.
|
||||||
|
echo Error: This batch file should only be used with a curl git repository
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nogenmakefile
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to generate Makefile
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nogenhugehelp
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to generate src\tool_hugehelp.c
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nocleanmakefile
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to clean Makefile
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nocleanhugehelp
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to clean src\tool_hugehelp.c
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:warning
|
||||||
|
echo.
|
||||||
|
echo Warning: The curl manual could not be integrated in the source. This means when
|
||||||
|
echo you build curl the manual will not be available (curl --man^). Integration of
|
||||||
|
echo the manual is not required and a summary of the options will still be available
|
||||||
|
echo (curl --help^). To integrate the manual your PATH is required to have
|
||||||
|
echo groff/nroff, perl and optionally gzip for compression.
|
||||||
|
goto success
|
||||||
|
|
||||||
|
:error
|
||||||
|
if "%OS%" == "Windows_NT" (
|
||||||
|
endlocal
|
||||||
|
) else (
|
||||||
|
call :dosCleanup
|
||||||
|
)
|
||||||
|
exit /B 1
|
||||||
|
|
||||||
|
:success
|
||||||
|
if "%OS%" == "Windows_NT" (
|
||||||
|
endlocal
|
||||||
|
) else (
|
||||||
|
call :dosCleanup
|
||||||
|
)
|
||||||
|
exit /B 0
|
@ -0,0 +1,348 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
|
||||||
|
# We need space, tab and new line, in precisely that order. Quoting is
|
||||||
|
# there to prevent tools from complaining about whitespace usage.
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
file_conv=
|
||||||
|
|
||||||
|
# func_file_conv build_file lazy
|
||||||
|
# Convert a $build file to $host form and store it in $file
|
||||||
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
|
# take place.
|
||||||
|
func_file_conv ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
case $file in
|
||||||
|
/ | /[!/]*) # absolute file, and not a UNC file
|
||||||
|
if test -z "$file_conv"; then
|
||||||
|
# lazily determine how to convert abs files
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW*)
|
||||||
|
file_conv=mingw
|
||||||
|
;;
|
||||||
|
CYGWIN* | MSYS*)
|
||||||
|
file_conv=cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
file_conv=wine
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
case $file_conv/,$2, in
|
||||||
|
*,$file_conv,*)
|
||||||
|
;;
|
||||||
|
mingw/*)
|
||||||
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
|
;;
|
||||||
|
cygwin/* | msys/*)
|
||||||
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
wine/*)
|
||||||
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashL linkdir
|
||||||
|
# Make cl look for libraries in LINKDIR
|
||||||
|
func_cl_dashL ()
|
||||||
|
{
|
||||||
|
func_file_conv "$1"
|
||||||
|
if test -z "$lib_path"; then
|
||||||
|
lib_path=$file
|
||||||
|
else
|
||||||
|
lib_path="$lib_path;$file"
|
||||||
|
fi
|
||||||
|
linker_opts="$linker_opts -LIBPATH:$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashl library
|
||||||
|
# Do a library search-path lookup for cl
|
||||||
|
func_cl_dashl ()
|
||||||
|
{
|
||||||
|
lib=$1
|
||||||
|
found=no
|
||||||
|
save_IFS=$IFS
|
||||||
|
IFS=';'
|
||||||
|
for dir in $lib_path $LIB
|
||||||
|
do
|
||||||
|
IFS=$save_IFS
|
||||||
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.dll.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/$lib.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/lib$lib.a"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/lib$lib.a
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$save_IFS
|
||||||
|
|
||||||
|
if test "$found" != yes; then
|
||||||
|
lib=$lib.lib
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_wrapper cl arg...
|
||||||
|
# Adjust compile command to suit cl
|
||||||
|
func_cl_wrapper ()
|
||||||
|
{
|
||||||
|
# Assume a capable shell
|
||||||
|
lib_path=
|
||||||
|
shared=:
|
||||||
|
linker_opts=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.[oO][bB][jJ])
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fo"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fe"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-I)
|
||||||
|
eat=1
|
||||||
|
func_file_conv "$2" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-I*)
|
||||||
|
func_file_conv "${1#-I}" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashl "$2"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
func_cl_dashl "${1#-l}"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashL "$2"
|
||||||
|
;;
|
||||||
|
-L*)
|
||||||
|
func_cl_dashL "${1#-L}"
|
||||||
|
;;
|
||||||
|
-static)
|
||||||
|
shared=false
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
arg=${1#-Wl,}
|
||||||
|
save_ifs="$IFS"; IFS=','
|
||||||
|
for flag in $arg; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
linker_opts="$linker_opts $flag"
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
;;
|
||||||
|
-Xlinker)
|
||||||
|
eat=1
|
||||||
|
linker_opts="$linker_opts $2"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||||
|
func_file_conv "$1"
|
||||||
|
set x "$@" -Tp"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||||
|
func_file_conv "$1" mingw
|
||||||
|
set x "$@" "$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -n "$linker_opts"; then
|
||||||
|
linker_opts="-link$linker_opts"
|
||||||
|
fi
|
||||||
|
exec "$@" $linker_opts
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
eat=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||||
|
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||||
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
# So we strip '-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no '-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# '.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,196 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
prefix="@prefix@"
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
includedir=@includedir@
|
||||||
|
cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
Usage: curl-config [OPTION]
|
||||||
|
|
||||||
|
Available values for OPTION include:
|
||||||
|
|
||||||
|
--built-shared says 'yes' if libcurl was built shared
|
||||||
|
--ca ca bundle install path
|
||||||
|
--cc compiler
|
||||||
|
--cflags pre-processor and compiler flags
|
||||||
|
--checkfor [version] check for (lib)curl of the specified version
|
||||||
|
--configure the arguments given to configure when building curl
|
||||||
|
--features newline separated list of enabled features
|
||||||
|
--help display this help and exit
|
||||||
|
--libs library linking information
|
||||||
|
--prefix curl install prefix
|
||||||
|
--protocols newline separated list of enabled protocols
|
||||||
|
--ssl-backends output the SSL backends libcurl was built to support
|
||||||
|
--static-libs static libcurl library linking information
|
||||||
|
--version output version information
|
||||||
|
--vernum output the version information as a number (hexadecimal)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case "$1" in
|
||||||
|
# this deals with options in the style
|
||||||
|
# --option=value and extracts the value part
|
||||||
|
# [not currently used]
|
||||||
|
-*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||||
|
*) value= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--built-shared)
|
||||||
|
echo @ENABLE_SHARED@
|
||||||
|
;;
|
||||||
|
|
||||||
|
--ca)
|
||||||
|
echo @CURL_CA_BUNDLE@
|
||||||
|
;;
|
||||||
|
|
||||||
|
--cc)
|
||||||
|
echo "@CC@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
--prefix)
|
||||||
|
echo "$prefix"
|
||||||
|
;;
|
||||||
|
|
||||||
|
--feature|--features)
|
||||||
|
for feature in @SUPPORT_FEATURES@ ""; do
|
||||||
|
test -n "$feature" && echo "$feature"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
--protocols)
|
||||||
|
for protocol in @SUPPORT_PROTOCOLS@; do
|
||||||
|
echo "$protocol"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
--version)
|
||||||
|
echo libcurl @CURLVERSION@
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--checkfor)
|
||||||
|
checkfor=$2
|
||||||
|
cmajor=`echo $checkfor | cut -d. -f1`
|
||||||
|
cminor=`echo $checkfor | cut -d. -f2`
|
||||||
|
# when extracting the patch part we strip off everything after a
|
||||||
|
# dash as that's used for things like version 1.2.3-CVS
|
||||||
|
cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
|
||||||
|
|
||||||
|
vmajor=`echo @CURLVERSION@ | cut -d. -f1`
|
||||||
|
vminor=`echo @CURLVERSION@ | cut -d. -f2`
|
||||||
|
# when extracting the patch part we strip off everything after a
|
||||||
|
# dash as that's used for things like version 1.2.3-CVS
|
||||||
|
vpatch=`echo @CURLVERSION@ | cut -d. -f3 | cut -d- -f1`
|
||||||
|
|
||||||
|
if test "$vmajor" -gt "$cmajor"; then
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
if test "$vmajor" -eq "$cmajor"; then
|
||||||
|
if test "$vminor" -gt "$cminor"; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if test "$vminor" -eq "$cminor"; then
|
||||||
|
if test "$cpatch" -le "$vpatch"; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "requested version $checkfor is newer than existing @CURLVERSION@"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
--vernum)
|
||||||
|
echo @VERSIONNUM@
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--help)
|
||||||
|
usage 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--cflags)
|
||||||
|
if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
|
||||||
|
CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
|
||||||
|
else
|
||||||
|
CPPFLAG_CURL_STATICLIB=""
|
||||||
|
fi
|
||||||
|
if test "X@includedir@" = "X/usr/include"; then
|
||||||
|
echo "$CPPFLAG_CURL_STATICLIB"
|
||||||
|
else
|
||||||
|
echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
--libs)
|
||||||
|
if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
|
||||||
|
CURLLIBDIR="-L@libdir@ "
|
||||||
|
else
|
||||||
|
CURLLIBDIR=""
|
||||||
|
fi
|
||||||
|
if test "X@ENABLE_SHARED@" = "Xno"; then
|
||||||
|
echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
|
||||||
|
else
|
||||||
|
echo ${CURLLIBDIR}-lcurl
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--ssl-backends)
|
||||||
|
echo "@SSL_BACKENDS@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
--static-libs)
|
||||||
|
if test "X@ENABLE_STATIC@" != "Xno" ; then
|
||||||
|
echo "@libdir@/libcurl.@libext@" @LDFLAGS@ @LIBCURL_LIBS@
|
||||||
|
else
|
||||||
|
echo "curl was built with static libraries disabled" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
--configure)
|
||||||
|
echo @CONFIGURE_OPTIONS@
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "unknown option: $1"
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
@ -0,0 +1,791 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by 'PROGRAMS ARGS'.
|
||||||
|
object Object file output by 'PROGRAMS ARGS'.
|
||||||
|
DEPDIR directory where to store dependencies.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputting dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Get the directory component of the given path, and save it in the
|
||||||
|
# global variables '$dir'. Note that this directory component will
|
||||||
|
# be either empty or ending with a '/' character. This is deliberate.
|
||||||
|
set_dir_from ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||||
|
*) dir=;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the suffix-stripped basename of the given path, and save it the
|
||||||
|
# global variable '$base'.
|
||||||
|
set_base_from ()
|
||||||
|
{
|
||||||
|
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||||
|
}
|
||||||
|
|
||||||
|
# If no dependency file was actually created by the compiler invocation,
|
||||||
|
# we still have to create a dummy depfile, to avoid errors with the
|
||||||
|
# Makefile "include basename.Plo" scheme.
|
||||||
|
make_dummy_depfile ()
|
||||||
|
{
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Factor out some common post-processing of the generated depfile.
|
||||||
|
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||||
|
aix_post_process_depfile ()
|
||||||
|
{
|
||||||
|
# If the compiler actually managed to produce a dependency file,
|
||||||
|
# post-process it.
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form 'foo.o: dependency.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# $object: dependency.h
|
||||||
|
# and one to simply output
|
||||||
|
# dependency.h:
|
||||||
|
# which is needed to avoid the deleted-header problem.
|
||||||
|
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||||
|
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||||
|
} > "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# A tabulation character.
|
||||||
|
tab=' '
|
||||||
|
# A newline character.
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
# Character ranges might be problematic outside the C locale.
|
||||||
|
# These definitions help.
|
||||||
|
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
|
lower=abcdefghijklmnopqrstuvwxyz
|
||||||
|
digits=0123456789
|
||||||
|
alpha=${upper}${lower}
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||||
|
depfile=${depfile-`echo "$object" |
|
||||||
|
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Avoid interferences from the environment.
|
||||||
|
gccflag= dashmflag=
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
cygpath_u="cygpath -u -f -"
|
||||||
|
if test "$depmode" = msvcmsys; then
|
||||||
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = msvc7msys; then
|
||||||
|
# This is just like msvc7 but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvc7
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = xlc; then
|
||||||
|
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||||
|
gccflag=-qmakedep=gcc,-MF
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||||
|
## the command line argument order; so add the flags where they
|
||||||
|
## appear in depend2.am. Note that the slowdown incurred here
|
||||||
|
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||||
|
*) set fnord "$@" "$arg" ;;
|
||||||
|
esac
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
done
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||||
|
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||||
|
## (see the conditional assignment to $gccflag above).
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||||
|
## supported by the other compilers which use the 'gcc' depmode.
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The second -e expression handles DOS-style file names with drive
|
||||||
|
# letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the "deleted header file" problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
## Some versions of gcc put a space before the ':'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||||
|
## to the object. Take care to not repeat it in the output.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||||
|
| tr "$nl" ' ' >> "$depfile"
|
||||||
|
echo >> "$depfile"
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
xlc)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$base.u
|
||||||
|
tmpdepfile3=$dir.libs/$base.u
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$dir$base.u
|
||||||
|
tmpdepfile3=$dir$base.u
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
tcc)
|
||||||
|
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||||
|
# FIXME: That version still under development at the moment of writing.
|
||||||
|
# Make that this statement remains true also for stable, released
|
||||||
|
# versions.
|
||||||
|
# It will wrap lines (doesn't matter whether long or short) with a
|
||||||
|
# trailing '\', as in:
|
||||||
|
#
|
||||||
|
# foo.o : \
|
||||||
|
# foo.c \
|
||||||
|
# foo.h \
|
||||||
|
#
|
||||||
|
# It will put a trailing '\' even on the last line, and will use leading
|
||||||
|
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||||
|
# "Emit spaces for -MD").
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||||
|
# We have to change lines of the first kind to '$object: \'.
|
||||||
|
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||||
|
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||||
|
# dummy dependency, to avoid the deleted-header problem.
|
||||||
|
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
## The order of this option in the case statement is important, since the
|
||||||
|
## shell code in configure will try each of these formats in the order
|
||||||
|
## listed in this file. A plain '-MD' option would be understood by many
|
||||||
|
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||||
|
pgcc)
|
||||||
|
# Portland's C compiler understands '-MD'.
|
||||||
|
# Will always output deps to 'file.d' where file is the root name of the
|
||||||
|
# source file under compilation, even if file resides in a subdirectory.
|
||||||
|
# The object file name does not affect the name of the '.d' file.
|
||||||
|
# pgcc 10.2 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using '\' :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
set_dir_from "$object"
|
||||||
|
# Use the source, not the object, to determine the base name, since
|
||||||
|
# that's sadly what pgcc will do too.
|
||||||
|
set_base_from "$source"
|
||||||
|
tmpdepfile=$base.d
|
||||||
|
|
||||||
|
# For projects that build the same source file twice into different object
|
||||||
|
# files, the pgcc approach of using the *source* file root name can cause
|
||||||
|
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||||
|
# the same $tmpdepfile.
|
||||||
|
lockdir=$base.d-lock
|
||||||
|
trap "
|
||||||
|
echo '$0: caught signal, cleaning up...' >&2
|
||||||
|
rmdir '$lockdir'
|
||||||
|
exit 1
|
||||||
|
" 1 2 13 15
|
||||||
|
numtries=100
|
||||||
|
i=$numtries
|
||||||
|
while test $i -gt 0; do
|
||||||
|
# mkdir is a portable test-and-set.
|
||||||
|
if mkdir "$lockdir" 2>/dev/null; then
|
||||||
|
# This process acquired the lock.
|
||||||
|
"$@" -MD
|
||||||
|
stat=$?
|
||||||
|
# Release the lock.
|
||||||
|
rmdir "$lockdir"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
# If the lock is being held by a different process, wait
|
||||||
|
# until the winning process is done or we timeout.
|
||||||
|
while test -d "$lockdir" && test $i -gt 0; do
|
||||||
|
sleep 1
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
trap - 1 2 13 15
|
||||||
|
if test $i -le 0; then
|
||||||
|
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||||
|
echo "$0: check lockdir '$lockdir'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp2)
|
||||||
|
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||||
|
# compilers, which have integrated preprocessors. The correct option
|
||||||
|
# to use with these is +Maked; it writes dependencies to a file named
|
||||||
|
# 'foo.d', which lands next to the object file, wherever that
|
||||||
|
# happens to be.
|
||||||
|
# Much of this is similar to the tru64 case; see comments there.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir.libs/$base.d
|
||||||
|
"$@" -Wc,+Maked
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
"$@" +Maked
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
|
# Add 'dependent.h:' lines.
|
||||||
|
sed -ne '2,${
|
||||||
|
s/^ *//
|
||||||
|
s/ \\*$//
|
||||||
|
s/$/:/
|
||||||
|
p
|
||||||
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in 'foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||||
|
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||||
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
|
# one of the two compilations can be disabled. We should prefer
|
||||||
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
|
# the former would cause a distcleancheck panic.
|
||||||
|
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||||
|
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
tmpdepfile3=$dir$base.d
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
# Same post-processing that is required for AIX mode.
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
showIncludes=-Wc,-showIncludes
|
||||||
|
else
|
||||||
|
showIncludes=-showIncludes
|
||||||
|
fi
|
||||||
|
"$@" $showIncludes > "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The first sed program below extracts the file names and escapes
|
||||||
|
# backslashes for cygpath. The second sed program outputs the file
|
||||||
|
# name when reading, but also accumulates all include files in the
|
||||||
|
# hold buffer in order to output them again at the end. This only
|
||||||
|
# works with sed implementations that can handle large buffers.
|
||||||
|
sed < "$tmpdepfile" -n '
|
||||||
|
/^Note: including file: *\(.*\)/ {
|
||||||
|
s//\1/
|
||||||
|
s/\\/\\\\/g
|
||||||
|
p
|
||||||
|
}' | $cygpath_u | sort -u | sed -n '
|
||||||
|
s/ /\\ /g
|
||||||
|
s/\(.*\)/'"$tab"'\1 \\/p
|
||||||
|
s/.\(.*\) \\/\1:/
|
||||||
|
H
|
||||||
|
$ {
|
||||||
|
s/.*/'"$tab"'/
|
||||||
|
G
|
||||||
|
p
|
||||||
|
}' >> "$depfile"
|
||||||
|
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7msys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for ':'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no eat=no
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
if test $eat = yes; then
|
||||||
|
eat=no
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-arch)
|
||||||
|
eat=yes ;;
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
# makedepend may prepend the VPATH from the source file name to the object.
|
||||||
|
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||||
|
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed '1,2d' "$tmpdepfile" \
|
||||||
|
| tr ' ' "$nl" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E \
|
||||||
|
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E 2>/dev/null |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||||
|
echo "$tab" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvcmsys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
@ -0,0 +1,41 @@
|
|||||||
|
# Alt-Svc
|
||||||
|
|
||||||
|
curl features support for the Alt-Svc: HTTP header.
|
||||||
|
|
||||||
|
## Enable Alt-Svc in build
|
||||||
|
|
||||||
|
`./configure --enable-alt-svc`
|
||||||
|
|
||||||
|
(enabled by default since 7.73.0)
|
||||||
|
|
||||||
|
## Standard
|
||||||
|
|
||||||
|
[RFC 7838](https://datatracker.ietf.org/doc/html/rfc7838)
|
||||||
|
|
||||||
|
# Alt-Svc cache file format
|
||||||
|
|
||||||
|
This is a text based file with one line per entry and each line consists of nine
|
||||||
|
space separated fields.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
h2 quic.tech 8443 h3-22 quic.tech 8443 "20190808 06:18:37" 0 0
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
1. The ALPN id for the source origin
|
||||||
|
2. The host name for the source origin
|
||||||
|
3. The port number for the source origin
|
||||||
|
4. The ALPN id for the destination host
|
||||||
|
5. The host name for the destination host
|
||||||
|
6. The host number for the destination host
|
||||||
|
7. The expiration date and time of this entry within double quotes. The date format is "YYYYMMDD HH:MM:SS" and the time zone is GMT.
|
||||||
|
8. Boolean (1 or 0) if "persist" was set for this entry
|
||||||
|
9. Integer priority value (not currently used)
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
- handle multiple response headers, when one of them says `clear` (should
|
||||||
|
override them all)
|
||||||
|
- using `Age:` value for caching age as per spec
|
||||||
|
- `CURLALTSVC_IMMEDIATELY` support
|
@ -0,0 +1,136 @@
|
|||||||
|
libcurl bindings
|
||||||
|
================
|
||||||
|
|
||||||
|
Creative people have written bindings or interfaces for various environments
|
||||||
|
and programming languages. Using one of these allows you to take advantage of
|
||||||
|
curl powers from within your favourite language or system.
|
||||||
|
|
||||||
|
This is a list of all known interfaces as of this writing.
|
||||||
|
|
||||||
|
The bindings listed below are not part of the curl/libcurl distribution
|
||||||
|
archives, but must be downloaded and installed separately.
|
||||||
|
|
||||||
|
<!-- markdown-link-check-disable -->
|
||||||
|
|
||||||
|
[Ada95](https://web.archive.org/web/20070403105909/www.almroth.com/adacurl/index.html) Written by Andreas Almroth
|
||||||
|
|
||||||
|
[Basic](https://scriptbasic.com/) ScriptBasic bindings written by Peter Verhas
|
||||||
|
|
||||||
|
C++: [curlpp](https://github.com/jpbarrette/curlpp/) Written by Jean-Philippe Barrette-LaPierre,
|
||||||
|
[curlcpp](https://github.com/JosephP91/curlcpp) by Giuseppe Persico and [C++
|
||||||
|
Requests](https://github.com/libcpr/cpr) by Huu Nguyen
|
||||||
|
|
||||||
|
[Ch](https://chcurl.sourceforge.net/) Written by Stephen Nestinger and Jonathan Rogado
|
||||||
|
|
||||||
|
Cocoa: [BBHTTP](https://github.com/biasedbit/BBHTTP) written by Bruno de Carvalho
|
||||||
|
[curlhandle](https://github.com/karelia/curlhandle) Written by Dan Wood
|
||||||
|
|
||||||
|
Clojure: [clj-curl](https://github.com/lsevero/clj-curl) by Lucas Severo
|
||||||
|
|
||||||
|
[D](https://dlang.org/library/std/net/curl.html) Written by Kenneth Bogert
|
||||||
|
|
||||||
|
[Delphi](https://github.com/Mercury13/curl4delphi) Written by Mikhail Merkuryev
|
||||||
|
|
||||||
|
[Dylan](https://dylanlibs.sourceforge.net/) Written by Chris Double
|
||||||
|
|
||||||
|
[Eiffel](https://iron.eiffel.com/repository/20.11/package/ABEF6975-37AC-45FD-9C67-52D10BA0669B) Written by Eiffel Software
|
||||||
|
|
||||||
|
[Euphoria](https://web.archive.org/web/20050204080544/rays-web.com/eulibcurl.htm) Written by Ray Smith
|
||||||
|
|
||||||
|
[Falcon](http://www.falconpl.org/project_docs/curl/)
|
||||||
|
|
||||||
|
[Ferite](https://web.archive.org/web/20150102192018/ferite.org/) Written by Paul Querna
|
||||||
|
|
||||||
|
[Fortran](https://github.com/interkosmos/fortran-curl) Written by Philipp Engel
|
||||||
|
|
||||||
|
[Gambas](https://gambas.sourceforge.net/)
|
||||||
|
|
||||||
|
[glib/GTK+](https://web.archive.org/web/20100526203452/atterer.net/glibcurl) Written by Richard Atterer
|
||||||
|
|
||||||
|
Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang
|
||||||
|
|
||||||
|
[Guile](https://github.com/spk121/guile-curl) Written by Michael L. Gran
|
||||||
|
|
||||||
|
[Harbour](https://github.com/vszakats/hb/tree/main/contrib/hbcurl) Written by Viktor Szakats
|
||||||
|
|
||||||
|
[Haskell](https://hackage.haskell.org/package/curl) Written by Galois, Inc
|
||||||
|
|
||||||
|
[Hollywood](https://www.hollywood-mal.com/download.html) hURL by Andreas Falkenhahn
|
||||||
|
|
||||||
|
[Java](https://github.com/pjlegato/curl-java)
|
||||||
|
|
||||||
|
[Julia](https://github.com/JuliaWeb/LibCURL.jl) Written by Amit Murthy
|
||||||
|
|
||||||
|
[Kapito](https://github.com/puzza007/katipo) is an Erlang HTTP library around libcurl.
|
||||||
|
|
||||||
|
[Lisp](https://common-lisp.net/project/cl-curl/) Written by Liam Healy
|
||||||
|
|
||||||
|
Lua: [luacurl](https://web.archive.org/web/20201205052437/luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel
|
||||||
|
|
||||||
|
[Mono](https://web.archive.org/web/20070606064500/https://forge.novell.com/modules/xfmod/project/?libcurl-mono) Written by Jeffrey Phillips
|
||||||
|
|
||||||
|
[.NET](https://sourceforge.net/projects/libcurl-net/) libcurl-net by Jeffrey Phillips
|
||||||
|
|
||||||
|
[Nim](https://nimble.directory/pkg/libcurl) wrapper for libcurl
|
||||||
|
|
||||||
|
[node.js](https://github.com/JCMais/node-libcurl) node-libcurl by Jonathan Cardoso Machado
|
||||||
|
|
||||||
|
[Object-Pascal](https://web.archive.org/web/20020610214926/www.tekool.com/opcurl) Free Pascal, Delphi and Kylix binding written by Christophe Espern.
|
||||||
|
|
||||||
|
[OCaml](https://opam.ocaml.org/packages/ocurl/) Written by Lars Nilsson and ygrek
|
||||||
|
|
||||||
|
[Pascal](https://web.archive.org/web/20030804091414/houston.quik.com/jkp/curlpas/) Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer.
|
||||||
|
|
||||||
|
Perl: [WWW::Curl](https://github.com/szbalint/WWW--Curl) Maintained by Cris
|
||||||
|
Bailiff and Bálint Szilakszi,
|
||||||
|
[perl6-net-curl](https://github.com/azawawi/perl6-net-curl) by Ahmad M. Zawawi
|
||||||
|
[NET::Curl](https://metacpan.org/pod/Net::Curl) by Przemyslaw Iskra
|
||||||
|
|
||||||
|
[PHP](https://php.net/curl) Originally written by Sterling Hughes
|
||||||
|
|
||||||
|
[PostgreSQL](https://github.com/pramsey/pgsql-http) - HTTP client for PostgreSQL
|
||||||
|
|
||||||
|
[PostgreSQL](https://github.com/RekGRpth/pg_curl) - cURL client for PostgreSQL
|
||||||
|
|
||||||
|
[PureBasic](https://www.purebasic.com/documentation/http/index.html) uses libcurl in its "native" HTTP subsystem
|
||||||
|
|
||||||
|
[Python](http://pycurl.io/) PycURL by Kjetil Jacobsen
|
||||||
|
|
||||||
|
[Q](https://q-lang.sourceforge.net/) The libcurl module is part of the default install
|
||||||
|
|
||||||
|
[R](https://cran.r-project.org/package=curl)
|
||||||
|
|
||||||
|
[Rexx](https://rexxcurl.sourceforge.net/) Written Mark Hessling
|
||||||
|
|
||||||
|
[Ring](https://ring-lang.sourceforge.io/doc1.3/libcurl.html) RingLibCurl by Mahmoud Fayed
|
||||||
|
|
||||||
|
RPG, support for ILE/RPG on OS/400 is included in source distribution
|
||||||
|
|
||||||
|
Ruby: [curb](https://github.com/taf2/curb) written by Ross Bamford,
|
||||||
|
[ruby-curl-multi](https://github.com/kball/curl_multi.rb) by Kristjan Petursson and Keith Rarick
|
||||||
|
|
||||||
|
[Rust](https://github.com/alexcrichton/curl-rust) curl-rust - by Carl Lerche
|
||||||
|
|
||||||
|
[Scheme](http://www.metapaper.net/lisovsky/web/curl/) Bigloo binding by Kirill Lisovsky
|
||||||
|
|
||||||
|
[Scilab](https://help.scilab.org/docs/current/fr_FR/getURL.html) binding by Sylvestre Ledru
|
||||||
|
|
||||||
|
[S-Lang](https://www.jedsoft.org/slang/modules/curl.html) by John E Davis
|
||||||
|
|
||||||
|
[Smalltalk](https://www.squeaksource.com/CurlPlugin/) Written by Danil Osipchuk
|
||||||
|
|
||||||
|
[SP-Forth](https://sourceforge.net/p/spf/spf/ci/master/tree/devel/~ac/lib/lin/curl/) Written by Andrey Cherezov
|
||||||
|
|
||||||
|
[SPL](https://web.archive.org/web/20210203022158/www.clifford.at/spl/spldoc/curl.html) Written by Clifford Wolf
|
||||||
|
|
||||||
|
[Tcl](https://web.archive.org/web/20160826011806/mirror.yellow5.com/tclcurl/) Tclcurl by Andrés García
|
||||||
|
|
||||||
|
[Visual Basic](https://sourceforge.net/projects/libcurl-vb/) libcurl-vb by Jeffrey Phillips
|
||||||
|
|
||||||
|
[Visual Foxpro](https://web.archive.org/web/20130730181523/www.ctl32.com.ar/libcurl.asp) by Carlos Alloatti
|
||||||
|
|
||||||
|
[wxWidgets](https://wxcode.sourceforge.net/components/wxcurl/) Written by Casey O'Donnell
|
||||||
|
|
||||||
|
[XBLite](https://web.archive.org/web/20060426150418/perso.wanadoo.fr/xblite/libraries.html) Written by David Szafranski
|
||||||
|
|
||||||
|
[Xojo](https://github.com/charonn0/RB-libcURL) Written by Andrew Lambert
|
@ -0,0 +1,81 @@
|
|||||||
|
# bufref
|
||||||
|
|
||||||
|
This is an internal module for handling buffer references. A referenced
|
||||||
|
buffer is associated with its destructor function that is implicitly called
|
||||||
|
when the reference is invalidated. Once referenced, a buffer cannot be
|
||||||
|
reallocated.
|
||||||
|
|
||||||
|
A data length is stored within the reference for binary data handling
|
||||||
|
purposes; it is not used by the bufref API.
|
||||||
|
|
||||||
|
The `struct bufref` is used to hold data referencing a buffer. The members of
|
||||||
|
that structure **MUST NOT** be accessed or modified without using the dedicated
|
||||||
|
bufref API.
|
||||||
|
|
||||||
|
## `init`
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_bufref_init(struct bufref *br);
|
||||||
|
```
|
||||||
|
|
||||||
|
Initializes a `bufref` structure. This function **MUST** be called before any
|
||||||
|
other operation is performed on the structure.
|
||||||
|
|
||||||
|
Upon completion, the referenced buffer is `NULL` and length is zero.
|
||||||
|
|
||||||
|
This function may also be called to bypass referenced buffer destruction while
|
||||||
|
invalidating the current reference.
|
||||||
|
|
||||||
|
## `free`
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_bufref_free(struct bufref *br);
|
||||||
|
```
|
||||||
|
|
||||||
|
Destroys the previously referenced buffer using its destructor and
|
||||||
|
reinitializes the structure for a possible subsequent reuse.
|
||||||
|
|
||||||
|
## `set`
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_bufref_set(struct bufref *br, const void *buffer, size_t length,
|
||||||
|
void (*destructor)(void *));
|
||||||
|
```
|
||||||
|
|
||||||
|
Releases the previously referenced buffer, then assigns the new `buffer` to
|
||||||
|
the structure, associated with its `destructor` function. The latter can be
|
||||||
|
specified as `NULL`: this will be the case when the referenced buffer is
|
||||||
|
static.
|
||||||
|
|
||||||
|
if `buffer` is NULL, `length` must be zero.
|
||||||
|
|
||||||
|
## `memdup`
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_bufref_memdup(struct bufref *br, const void *data, size_t length);
|
||||||
|
```
|
||||||
|
|
||||||
|
Releases the previously referenced buffer, then duplicates the `length`-byte
|
||||||
|
`data` into a buffer allocated via `malloc()` and references the latter
|
||||||
|
associated with destructor `curl_free()`.
|
||||||
|
|
||||||
|
An additional trailing byte is allocated and set to zero as a possible string
|
||||||
|
null-terminator; it is not counted in the stored length.
|
||||||
|
|
||||||
|
Returns `CURLE_OK` if successful, else `CURLE_OUT_OF_MEMORY`.
|
||||||
|
|
||||||
|
## `ptr`
|
||||||
|
|
||||||
|
```c
|
||||||
|
const unsigned char *Curl_bufref_ptr(const struct bufref *br);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns a `const unsigned char *` to the referenced buffer.
|
||||||
|
|
||||||
|
## `len`
|
||||||
|
|
||||||
|
```c
|
||||||
|
size_t Curl_bufref_len(const struct bufref *br);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns the stored length of the referenced buffer.
|
@ -0,0 +1,78 @@
|
|||||||
|
# The curl bug bounty
|
||||||
|
|
||||||
|
The curl project runs a bug bounty program in association with
|
||||||
|
[HackerOne](https://www.hackerone.com) and the [Internet Bug
|
||||||
|
Bounty](https://internetbugbounty.org).
|
||||||
|
|
||||||
|
## How does it work?
|
||||||
|
|
||||||
|
Start out by posting your suspected security vulnerability directly to [curl's
|
||||||
|
HackerOne program](https://hackerone.com/curl).
|
||||||
|
|
||||||
|
After you have reported a security issue, it has been deemed credible, and a
|
||||||
|
patch and advisory has been made public, you may be eligible for a bounty from
|
||||||
|
this program. See the [SECURITY-PROCESS](SECURITY-PROCESS.md) document for how
|
||||||
|
we work with security issues.
|
||||||
|
|
||||||
|
## What are the reward amounts?
|
||||||
|
|
||||||
|
The curl project offers monetary compensation for reported and published
|
||||||
|
security vulnerabilities. The amount of money that is rewarded depends on how
|
||||||
|
serious the flaw is determined to be.
|
||||||
|
|
||||||
|
Since 2021, the Bug Bounty is managed in association with the Internet Bug
|
||||||
|
Bounty and they will set the reward amounts. If it would turn out that they
|
||||||
|
set amounts that are way lower than we can accept, the curl project intends to
|
||||||
|
"top up" rewards.
|
||||||
|
|
||||||
|
In 2022, typical "Medium" rated vulnerabilities have been rewarded 2,400 USD
|
||||||
|
each.
|
||||||
|
|
||||||
|
## Who is eligible for a reward?
|
||||||
|
|
||||||
|
Everyone and anyone who reports a security problem in a released curl version
|
||||||
|
that has not already been reported can ask for a bounty.
|
||||||
|
|
||||||
|
Dedicated - paid for - security audits that are performed in collaboration
|
||||||
|
with curl developers are not eligible for bounties.
|
||||||
|
|
||||||
|
Vulnerabilities in features that are off by default and documented as
|
||||||
|
experimental are not eligible for a reward.
|
||||||
|
|
||||||
|
The vulnerability has to be fixed and publicly announced (by the curl project)
|
||||||
|
before a bug bounty will be considered.
|
||||||
|
|
||||||
|
Once the vulnerability has been published by curl, the researcher can request
|
||||||
|
their bounty from the [Internet Bug Bounty](https://hackerone.com/ibb).
|
||||||
|
|
||||||
|
Bounties need to be requested within twelve months from the publication of the
|
||||||
|
vulnerability.
|
||||||
|
|
||||||
|
## Product vulnerabilities only
|
||||||
|
|
||||||
|
This bug bounty only concerns the curl and libcurl products and thus their
|
||||||
|
respective source codes - when running on existing hardware. It does not
|
||||||
|
include curl documentation, curl websites, or other curl related
|
||||||
|
infrastructure.
|
||||||
|
|
||||||
|
The curl security team is the sole arbiter if a reported flaw is subject to a
|
||||||
|
bounty or not.
|
||||||
|
|
||||||
|
## How are vulnerabilities graded?
|
||||||
|
|
||||||
|
The grading of each reported vulnerability that makes a reward claim will be
|
||||||
|
performed by the curl security team. The grading will be based on the CVSS
|
||||||
|
(Common Vulnerability Scoring System) 3.0.
|
||||||
|
|
||||||
|
## How are reward amounts determined?
|
||||||
|
|
||||||
|
The curl security team gives the vulnerability a score or severity level, as
|
||||||
|
mentioned above. The actual monetary reward amount is decided and paid by the
|
||||||
|
Internet Bug Bounty..
|
||||||
|
|
||||||
|
## Regarding taxes, etc. on the bounties
|
||||||
|
|
||||||
|
In the event that the individual receiving a bug bounty needs to pay taxes on
|
||||||
|
the reward money, the responsibility lies with the receiver. The curl project
|
||||||
|
or its security team never actually receive any of this money, hold the money,
|
||||||
|
or pay out the money.
|
@ -0,0 +1,265 @@
|
|||||||
|
# BUGS
|
||||||
|
|
||||||
|
## There are still bugs
|
||||||
|
|
||||||
|
Curl and libcurl keep being developed. Adding features and changing code
|
||||||
|
means that bugs will sneak in, no matter how hard we try to keep them out.
|
||||||
|
|
||||||
|
Of course there are lots of bugs left. And lots of misfeatures.
|
||||||
|
|
||||||
|
To help us make curl the stable and solid product we want it to be, we need
|
||||||
|
bug reports and bug fixes.
|
||||||
|
|
||||||
|
## Where to report
|
||||||
|
|
||||||
|
If you cannot fix a bug yourself and submit a fix for it, try to report an as
|
||||||
|
detailed report as possible to a curl mailing list to allow one of us to have
|
||||||
|
a go at a solution. You can optionally also submit your problem in [curl's
|
||||||
|
bug tracking system](https://github.com/curl/curl/issues).
|
||||||
|
|
||||||
|
Please read the rest of this document below first before doing that.
|
||||||
|
|
||||||
|
If you feel you need to ask around first, find a suitable [mailing list](
|
||||||
|
https://curl.se/mail/) and post your questions there.
|
||||||
|
|
||||||
|
## Security bugs
|
||||||
|
|
||||||
|
If you find a bug or problem in curl or libcurl that you think has a security
|
||||||
|
impact, for example a bug that can put users in danger or make them
|
||||||
|
vulnerable if the bug becomes public knowledge, then please report that bug
|
||||||
|
using our security development process.
|
||||||
|
|
||||||
|
Security related bugs or bugs that are suspected to have a security impact,
|
||||||
|
should be reported on the [curl security tracker at
|
||||||
|
HackerOne](https://hackerone.com/curl).
|
||||||
|
|
||||||
|
This ensures that the report reaches the curl security team so that they
|
||||||
|
first can deal with the report away from the public to minimize the harm
|
||||||
|
and impact it will have on existing users out there who might be using the
|
||||||
|
vulnerable versions.
|
||||||
|
|
||||||
|
The curl project's process for handling security related issues is
|
||||||
|
[documented separately](https://curl.se/dev/secprocess.html).
|
||||||
|
|
||||||
|
## What to report
|
||||||
|
|
||||||
|
When reporting a bug, you should include all information that will help us
|
||||||
|
understand what is wrong, what you expected to happen and how to repeat the
|
||||||
|
bad behavior. You therefore need to tell us:
|
||||||
|
|
||||||
|
- your operating system's name and version number
|
||||||
|
|
||||||
|
- what version of curl you are using (`curl -V` is fine)
|
||||||
|
|
||||||
|
- versions of the used libraries that libcurl is built to use
|
||||||
|
|
||||||
|
- what URL you were working with (if possible), at least which protocol
|
||||||
|
|
||||||
|
and anything and everything else you think matters. Tell us what you expected
|
||||||
|
to happen, tell use what did happen, tell us how you could make it work
|
||||||
|
another way. Dig around, try out, test. Then include all the tiny bits and
|
||||||
|
pieces in your report. You will benefit from this yourself, as it will enable
|
||||||
|
us to help you quicker and more accurately.
|
||||||
|
|
||||||
|
Since curl deals with networks, it often helps us if you include a protocol
|
||||||
|
debug dump with your bug report. The output you get by using the `-v` or
|
||||||
|
`--trace` options.
|
||||||
|
|
||||||
|
If curl crashed, causing a core dump (in Unix), there is hardly any use to
|
||||||
|
send that huge file to anyone of us. Unless we have the same system setup as
|
||||||
|
you, we cannot do much with it. Instead, we ask you to get a stack trace and
|
||||||
|
send that (much smaller) output to us instead.
|
||||||
|
|
||||||
|
The address and how to subscribe to the mailing lists are detailed in the
|
||||||
|
`MANUAL.md` file.
|
||||||
|
|
||||||
|
## libcurl problems
|
||||||
|
|
||||||
|
When you have written your own application with libcurl to perform transfers,
|
||||||
|
it is even more important to be specific and detailed when reporting bugs.
|
||||||
|
|
||||||
|
Tell us the libcurl version and your operating system. Tell us the name and
|
||||||
|
version of all relevant sub-components like for example the SSL library
|
||||||
|
you are using and what name resolving your libcurl uses. If you use SFTP or
|
||||||
|
SCP, the libssh2 version is relevant etc.
|
||||||
|
|
||||||
|
Showing us a real source code example repeating your problem is the best way
|
||||||
|
to get our attention and it will greatly increase our chances to understand
|
||||||
|
your problem and to work on a fix (if we agree it truly is a problem).
|
||||||
|
|
||||||
|
Lots of problems that appear to be libcurl problems are actually just abuses
|
||||||
|
of the libcurl API or other malfunctions in your applications. It is advised
|
||||||
|
that you run your problematic program using a memory debug tool like valgrind
|
||||||
|
or similar before you post memory-related or "crashing" problems to us.
|
||||||
|
|
||||||
|
## Who will fix the problems
|
||||||
|
|
||||||
|
If the problems or bugs you describe are considered to be bugs, we want to
|
||||||
|
have the problems fixed.
|
||||||
|
|
||||||
|
There are no developers in the curl project that are paid to work on bugs.
|
||||||
|
All developers that take on reported bugs do this on a voluntary basis. We do
|
||||||
|
it out of an ambition to keep curl and libcurl excellent products and out of
|
||||||
|
pride.
|
||||||
|
|
||||||
|
Please do not assume that you can just lump over something to us and it will
|
||||||
|
then magically be fixed after some given time. Most often we need feedback
|
||||||
|
and help to understand what you have experienced and how to repeat a
|
||||||
|
problem. Then we may only be able to assist YOU to debug the problem and to
|
||||||
|
track down the proper fix.
|
||||||
|
|
||||||
|
We get reports from many people every month and each report can take a
|
||||||
|
considerable amount of time to really go to the bottom with.
|
||||||
|
|
||||||
|
## How to get a stack trace
|
||||||
|
|
||||||
|
First, you must make sure that you compile all sources with `-g` and that you
|
||||||
|
do not 'strip' the final executable. Try to avoid optimizing the code as well,
|
||||||
|
remove `-O`, `-O2` etc from the compiler options.
|
||||||
|
|
||||||
|
Run the program until it cores.
|
||||||
|
|
||||||
|
Run your debugger on the core file, like `<debugger> curl
|
||||||
|
core`. `<debugger>` should be replaced with the name of your debugger, in
|
||||||
|
most cases that will be `gdb`, but `dbx` and others also occur.
|
||||||
|
|
||||||
|
When the debugger has finished loading the core file and presents you a
|
||||||
|
prompt, enter `where` (without quotes) and press return.
|
||||||
|
|
||||||
|
The list that is presented is the stack trace. If everything worked, it is
|
||||||
|
supposed to contain the chain of functions that were called when curl
|
||||||
|
crashed. Include the stack trace with your detailed bug report, it will help a
|
||||||
|
lot.
|
||||||
|
|
||||||
|
## Bugs in libcurl bindings
|
||||||
|
|
||||||
|
There will of course pop up bugs in libcurl bindings. You should then
|
||||||
|
primarily approach the team that works on that particular binding and see
|
||||||
|
what you can do to help them fix the problem.
|
||||||
|
|
||||||
|
If you suspect that the problem exists in the underlying libcurl, then please
|
||||||
|
convert your program over to plain C and follow the steps outlined above.
|
||||||
|
|
||||||
|
## Bugs in old versions
|
||||||
|
|
||||||
|
The curl project typically releases new versions every other month, and we
|
||||||
|
fix several hundred bugs per year. For a huge table of releases, number of
|
||||||
|
bug fixes and more, see: https://curl.se/docs/releases.html
|
||||||
|
|
||||||
|
The developers in the curl project do not have bandwidth or energy enough to
|
||||||
|
maintain several branches or to spend much time on hunting down problems in
|
||||||
|
old versions when chances are we already fixed them or at least that they have
|
||||||
|
changed nature and appearance in later versions.
|
||||||
|
|
||||||
|
When you experience a problem and want to report it, you really SHOULD
|
||||||
|
include the version number of the curl you are using when you experience the
|
||||||
|
issue. If that version number shows us that you are using an out-of-date curl,
|
||||||
|
you should also try out a modern curl version to see if the problem persists
|
||||||
|
or how/if it has changed in appearance.
|
||||||
|
|
||||||
|
Even if you cannot immediately upgrade your application/system to run the
|
||||||
|
latest curl version, you can most often at least run a test version or
|
||||||
|
experimental build or similar, to get this confirmed or not.
|
||||||
|
|
||||||
|
At times people insist that they cannot upgrade to a modern curl version, but
|
||||||
|
instead, they "just want the bug fixed". That is fine, just do not count on us
|
||||||
|
spending many cycles on trying to identify which single commit, if that is
|
||||||
|
even possible, that at some point in the past fixed the problem you are now
|
||||||
|
experiencing.
|
||||||
|
|
||||||
|
Security wise, it is almost always a bad idea to lag behind the current curl
|
||||||
|
versions by a lot. We keep discovering and reporting security problems
|
||||||
|
over time see you can see in [this
|
||||||
|
table](https://curl.se/docs/vulnerabilities.html)
|
||||||
|
|
||||||
|
# Bug fixing procedure
|
||||||
|
|
||||||
|
## What happens on first filing
|
||||||
|
|
||||||
|
When a new issue is posted in the issue tracker or on the mailing list, the
|
||||||
|
team of developers first needs to see the report. Maybe they took the day off,
|
||||||
|
maybe they are off in the woods hunting. Have patience. Allow at least a few
|
||||||
|
days before expecting someone to have responded.
|
||||||
|
|
||||||
|
In the issue tracker, you can expect that some labels will be set on the issue
|
||||||
|
to help categorize it.
|
||||||
|
|
||||||
|
## First response
|
||||||
|
|
||||||
|
If your issue/bug report was not perfect at once (and few are), chances are
|
||||||
|
that someone will ask follow-up questions. Which version did you use? Which
|
||||||
|
options did you use? How often does the problem occur? How can we reproduce
|
||||||
|
this problem? Which protocols does it involve? Or perhaps much more specific
|
||||||
|
and deep diving questions. It all depends on your specific issue.
|
||||||
|
|
||||||
|
You should then respond to these follow-up questions and provide more info
|
||||||
|
about the problem, so that we can help you figure it out. Or maybe you can
|
||||||
|
help us figure it out. An active back-and-forth communication is important
|
||||||
|
and the key for finding a cure and landing a fix.
|
||||||
|
|
||||||
|
## Not reproducible
|
||||||
|
|
||||||
|
We may require further work from you who actually see or experience the
|
||||||
|
problem if we cannot reproduce it and cannot understand it even after having
|
||||||
|
gotten all the info we need and having studied the source code over again.
|
||||||
|
|
||||||
|
## Unresponsive
|
||||||
|
|
||||||
|
If the problem have not been understood or reproduced, and there is nobody
|
||||||
|
responding to follow-up questions or questions asking for clarifications or
|
||||||
|
for discussing possible ways to move forward with the task, we take that as a
|
||||||
|
strong suggestion that the bug is unimportant.
|
||||||
|
|
||||||
|
Unimportant issues will be closed as inactive sooner or later as they cannot
|
||||||
|
be fixed. The inactivity period (waiting for responses) should not be shorter
|
||||||
|
than two weeks but may extend months.
|
||||||
|
|
||||||
|
## Lack of time/interest
|
||||||
|
|
||||||
|
Bugs that are filed and are understood can unfortunately end up in the
|
||||||
|
"nobody cares enough about it to work on it" category. Such bugs are
|
||||||
|
perfectly valid problems that *should* get fixed but apparently are not. We
|
||||||
|
try to mark such bugs as `KNOWN_BUGS material` after a time of inactivity and
|
||||||
|
if no activity is noticed after yet some time those bugs are added to the
|
||||||
|
`KNOWN_BUGS` document and are closed in the issue tracker.
|
||||||
|
|
||||||
|
## `KNOWN_BUGS`
|
||||||
|
|
||||||
|
This is a list of known bugs. Bugs we know exist and that have been pointed
|
||||||
|
out but that have not yet been fixed. The reasons for why they have not been
|
||||||
|
fixed can involve anything really, but the primary reason is that nobody has
|
||||||
|
considered these problems to be important enough to spend the necessary time
|
||||||
|
and effort to have them fixed.
|
||||||
|
|
||||||
|
The `KNOWN_BUGS` items are always up for grabs and we love the ones who bring
|
||||||
|
one of them back to life and offer solutions to them.
|
||||||
|
|
||||||
|
The `KNOWN_BUGS` document has a sibling document known as `TODO`.
|
||||||
|
|
||||||
|
## `TODO`
|
||||||
|
|
||||||
|
Issues that are filed or reported that are not really bugs but more missing
|
||||||
|
features or ideas for future improvements and so on are marked as
|
||||||
|
'enhancement' or 'feature-request' and will be added to the `TODO` document
|
||||||
|
and the issues are closed. We do not keep TODO items open in the issue
|
||||||
|
tracker.
|
||||||
|
|
||||||
|
The `TODO` document is full of ideas and suggestions of what we can add or
|
||||||
|
fix one day. You are always encouraged and free to grab one of those items and
|
||||||
|
take up a discussion with the curl development team on how that could be
|
||||||
|
implemented or provided in the project so that you can work on ticking it odd
|
||||||
|
that document.
|
||||||
|
|
||||||
|
If an issue is rather a bug and not a missing feature or functionality, it is
|
||||||
|
listed in `KNOWN_BUGS` instead.
|
||||||
|
|
||||||
|
## Closing off stalled bugs
|
||||||
|
|
||||||
|
The [issue and pull request trackers](https://github.com/curl/curl) only
|
||||||
|
hold "active" entries open (using a non-precise definition of what active
|
||||||
|
actually is, but they are at least not completely dead). Those that are
|
||||||
|
abandoned or in other ways dormant will be closed and sometimes added to
|
||||||
|
`TODO` and `KNOWN_BUGS` instead.
|
||||||
|
|
||||||
|
This way, we only have "active" issues open on GitHub. Irrelevant issues and
|
||||||
|
pull requests will not distract developers or casual visitors.
|
@ -0,0 +1,182 @@
|
|||||||
|
# checksrc
|
||||||
|
|
||||||
|
This is the tool we use within the curl project to scan C source code and
|
||||||
|
check that it adheres to our [Source Code Style guide](CODE_STYLE.md).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
checksrc.pl [options] [file1] [file2] ...
|
||||||
|
|
||||||
|
## Command line options
|
||||||
|
|
||||||
|
`-W[file]` skip that file and exclude it from being checked. Helpful
|
||||||
|
when, for example, one of the files is generated.
|
||||||
|
|
||||||
|
`-D[dir]` directory name to prepend to file names when accessing them.
|
||||||
|
|
||||||
|
`-h` shows the help output, that also lists all recognized warnings
|
||||||
|
|
||||||
|
## What does `checksrc` warn for?
|
||||||
|
|
||||||
|
`checksrc` does not check and verify the code against the entire style guide.
|
||||||
|
The script is an effort to detect the most common mistakes and syntax mistakes
|
||||||
|
that contributors make before they get accustomed to our code style. Heck,
|
||||||
|
many of us regulars do the mistakes too and this script helps us keep the code
|
||||||
|
in shape.
|
||||||
|
|
||||||
|
checksrc.pl -h
|
||||||
|
|
||||||
|
Lists how to use the script and it lists all existing warnings it has and
|
||||||
|
problems it detects. At the time of this writing, the existing `checksrc`
|
||||||
|
warnings are:
|
||||||
|
|
||||||
|
- `ASSIGNWITHINCONDITION`: Assignment within a conditional expression. The
|
||||||
|
code style mandates the assignment to be done outside of it.
|
||||||
|
|
||||||
|
- `ASTERISKNOSPACE`: A pointer was declared like `char* name` instead of the
|
||||||
|
more appropriate `char *name` style. The asterisk should sit next to the
|
||||||
|
name.
|
||||||
|
|
||||||
|
- `ASTERISKSPACE`: A pointer was declared like `char * name` instead of the
|
||||||
|
more appropriate `char *name` style. The asterisk should sit right next to
|
||||||
|
the name without a space in between.
|
||||||
|
|
||||||
|
- `BADCOMMAND`: There's a bad `checksrc` instruction in the code. See the
|
||||||
|
**Ignore certain warnings** section below for details.
|
||||||
|
|
||||||
|
- `BANNEDFUNC`: A banned function was used. The functions sprintf, vsprintf,
|
||||||
|
strcat, strncat, gets are **never** allowed in curl source code.
|
||||||
|
|
||||||
|
- `BRACEELSE`: '} else' on the same line. The else is supposed to be on the
|
||||||
|
following line.
|
||||||
|
|
||||||
|
- `BRACEPOS`: wrong position for an open brace (`{`).
|
||||||
|
|
||||||
|
- `BRACEWHILE`: more than once space between end brace and while keyword
|
||||||
|
|
||||||
|
- `COMMANOSPACE`: a comma without following space
|
||||||
|
|
||||||
|
- `COPYRIGHT`: the file is missing a copyright statement
|
||||||
|
|
||||||
|
- `CPPCOMMENTS`: `//` comment detected, that is not C89 compliant
|
||||||
|
|
||||||
|
- `DOBRACE`: only use one space after do before open brace
|
||||||
|
|
||||||
|
- `EMPTYLINEBRACE`: found empty line before open brace
|
||||||
|
|
||||||
|
- `EQUALSNOSPACE`: no space after `=` sign
|
||||||
|
|
||||||
|
- `EQUALSNULL`: comparison with `== NULL` used in if/while. We use `!var`.
|
||||||
|
|
||||||
|
- `EXCLAMATIONSPACE`: space found after exclamations mark
|
||||||
|
|
||||||
|
- `FOPENMODE`: `fopen()` needs a macro for the mode string, use it
|
||||||
|
|
||||||
|
- `INDENTATION`: detected a wrong start column for code. Note that this
|
||||||
|
warning only checks some specific places and will certainly miss many bad
|
||||||
|
indentations.
|
||||||
|
|
||||||
|
- `LONGLINE`: A line is longer than 79 columns.
|
||||||
|
|
||||||
|
- `MULTISPACE`: Multiple spaces were found where only one should be used.
|
||||||
|
|
||||||
|
- `NOSPACEEQUALS`: An equals sign was found without preceding space. We prefer
|
||||||
|
`a = 2` and *not* `a=2`.
|
||||||
|
|
||||||
|
- `NOTEQUALSZERO`: check found using `!= 0`. We use plain `if(var)`.
|
||||||
|
|
||||||
|
- `ONELINECONDITION`: do not put the conditional block on the same line as `if()`
|
||||||
|
|
||||||
|
- `OPENCOMMENT`: File ended with a comment (`/*`) still "open".
|
||||||
|
|
||||||
|
- `PARENBRACE`: `){` was used without sufficient space in between.
|
||||||
|
|
||||||
|
- `RETURNNOSPACE`: `return` was used without space between the keyword and the
|
||||||
|
following value.
|
||||||
|
|
||||||
|
- `SEMINOSPACE`: There was no space (or newline) following a semicolon.
|
||||||
|
|
||||||
|
- `SIZEOFNOPAREN`: Found use of sizeof without parentheses. We prefer
|
||||||
|
`sizeof(int)` style.
|
||||||
|
|
||||||
|
- `SNPRINTF` - Found use of `snprintf()`. Since we use an internal replacement
|
||||||
|
with a different return code etc, we prefer `msnprintf()`.
|
||||||
|
|
||||||
|
- `SPACEAFTERPAREN`: there was a space after open parenthesis, `( text`.
|
||||||
|
|
||||||
|
- `SPACEBEFORECLOSE`: there was a space before a close parenthesis, `text )`.
|
||||||
|
|
||||||
|
- `SPACEBEFORECOMMA`: there was a space before a comma, `one , two`.
|
||||||
|
|
||||||
|
- `SPACEBEFOREPAREN`: there was a space before an open parenthesis, `if (`,
|
||||||
|
where one was not expected
|
||||||
|
|
||||||
|
- `SPACESEMICOLON`: there was a space before semicolon, ` ;`.
|
||||||
|
|
||||||
|
- `TABS`: TAB characters are not allowed
|
||||||
|
|
||||||
|
- `TRAILINGSPACE`: Trailing whitespace on the line
|
||||||
|
|
||||||
|
- `TYPEDEFSTRUCT`: we frown upon (most) typedefed structs
|
||||||
|
|
||||||
|
- `UNUSEDIGNORE`: a `checksrc` inlined warning ignore was asked for but not
|
||||||
|
used, that is an ignore that should be removed or changed to get used.
|
||||||
|
|
||||||
|
### Extended warnings
|
||||||
|
|
||||||
|
Some warnings are quite computationally expensive to perform, so they are
|
||||||
|
turned off by default. To enable these warnings, place a `.checksrc` file in
|
||||||
|
the directory where they should be activated with commands to enable the
|
||||||
|
warnings you are interested in. The format of the file is to enable one
|
||||||
|
warning per line like so: `enable <EXTENDEDWARNING>`
|
||||||
|
|
||||||
|
Currently these are the extended warnings which can be enabled:
|
||||||
|
|
||||||
|
- `COPYRIGHTYEAR`: the current changeset has not updated the copyright year in
|
||||||
|
the source file
|
||||||
|
|
||||||
|
- `STRERROR`: use of banned function strerror()
|
||||||
|
|
||||||
|
## Ignore certain warnings
|
||||||
|
|
||||||
|
Due to the nature of the source code and the flaws of the `checksrc` tool,
|
||||||
|
there is sometimes a need to ignore specific warnings. `checksrc` allows a few
|
||||||
|
different ways to do this.
|
||||||
|
|
||||||
|
### Inline ignore
|
||||||
|
|
||||||
|
You can control what to ignore within a specific source file by providing
|
||||||
|
instructions to `checksrc` in the source code itself. See examples below. The
|
||||||
|
instruction can ask to ignore a specific warning a specific number of times or
|
||||||
|
you ignore all of them until you mark the end of the ignored section.
|
||||||
|
|
||||||
|
Inline ignores are only done for that single specific source code file.
|
||||||
|
|
||||||
|
Example
|
||||||
|
|
||||||
|
/* !checksrc! disable LONGLINE all */
|
||||||
|
|
||||||
|
This will ignore the warning for overly long lines until it is re-enabled with:
|
||||||
|
|
||||||
|
/* !checksrc! enable LONGLINE */
|
||||||
|
|
||||||
|
If the enabling is not performed before the end of the file, it will be enabled
|
||||||
|
automatically for the next file.
|
||||||
|
|
||||||
|
You can also opt to ignore just N violations so that if you have a single long
|
||||||
|
line you just cannot shorten and is agreed to be fine anyway:
|
||||||
|
|
||||||
|
/* !checksrc! disable LONGLINE 1 */
|
||||||
|
|
||||||
|
... and the warning for long lines will be enabled again automatically after
|
||||||
|
it has ignored that single warning. The number `1` can of course be changed to
|
||||||
|
any other integer number. It can be used to make sure only the exact intended
|
||||||
|
instances are ignored and nothing extra.
|
||||||
|
|
||||||
|
### Directory wide ignore patterns
|
||||||
|
|
||||||
|
This is a method we have transitioned away from. Use inline ignores as far as
|
||||||
|
possible.
|
||||||
|
|
||||||
|
Make a `checksrc.skip` file in the directory of the source code with the
|
||||||
|
false positive, and include the full offending line into this file.
|
@ -0,0 +1,591 @@
|
|||||||
|
# Ciphers
|
||||||
|
|
||||||
|
With curl's options
|
||||||
|
[`CURLOPT_SSL_CIPHER_LIST`](https://curl.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html)
|
||||||
|
and
|
||||||
|
[`--ciphers`](https://curl.se/docs/manpage.html#--ciphers)
|
||||||
|
users can control which ciphers to consider when negotiating TLS connections.
|
||||||
|
|
||||||
|
TLS 1.3 ciphers are supported since curl 7.61 for OpenSSL 1.1.1+, and since
|
||||||
|
curl 7.85 for Schannel with options
|
||||||
|
[`CURLOPT_TLS13_CIPHERS`](https://curl.se/libcurl/c/CURLOPT_TLS13_CIPHERS.html)
|
||||||
|
and
|
||||||
|
[`--tls13-ciphers`](https://curl.se/docs/manpage.html#--tls13-ciphers)
|
||||||
|
. If you are using a different SSL backend you can try setting TLS 1.3 cipher
|
||||||
|
suites by using the respective regular cipher option.
|
||||||
|
|
||||||
|
The names of the known ciphers differ depending on which TLS backend that
|
||||||
|
libcurl was built to use. This is an attempt to list known cipher names.
|
||||||
|
|
||||||
|
## OpenSSL
|
||||||
|
|
||||||
|
(based on [OpenSSL docs](https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html))
|
||||||
|
|
||||||
|
When specifying multiple cipher names, separate them with colon (`:`).
|
||||||
|
|
||||||
|
### SSL3 cipher suites
|
||||||
|
|
||||||
|
`NULL-MD5`
|
||||||
|
`NULL-SHA`
|
||||||
|
`RC4-MD5`
|
||||||
|
`RC4-SHA`
|
||||||
|
`IDEA-CBC-SHA`
|
||||||
|
`DES-CBC3-SHA`
|
||||||
|
`DH-DSS-DES-CBC3-SHA`
|
||||||
|
`DH-RSA-DES-CBC3-SHA`
|
||||||
|
`DHE-DSS-DES-CBC3-SHA`
|
||||||
|
`DHE-RSA-DES-CBC3-SHA`
|
||||||
|
`ADH-RC4-MD5`
|
||||||
|
`ADH-DES-CBC3-SHA`
|
||||||
|
|
||||||
|
### TLS v1.0 cipher suites
|
||||||
|
|
||||||
|
`NULL-MD5`
|
||||||
|
`NULL-SHA`
|
||||||
|
`RC4-MD5`
|
||||||
|
`RC4-SHA`
|
||||||
|
`IDEA-CBC-SHA`
|
||||||
|
`DES-CBC3-SHA`
|
||||||
|
`DHE-DSS-DES-CBC3-SHA`
|
||||||
|
`DHE-RSA-DES-CBC3-SHA`
|
||||||
|
`ADH-RC4-MD5`
|
||||||
|
`ADH-DES-CBC3-SHA`
|
||||||
|
|
||||||
|
### AES cipher suites from RFC3268, extending TLS v1.0
|
||||||
|
|
||||||
|
`AES128-SHA`
|
||||||
|
`AES256-SHA`
|
||||||
|
`DH-DSS-AES128-SHA`
|
||||||
|
`DH-DSS-AES256-SHA`
|
||||||
|
`DH-RSA-AES128-SHA`
|
||||||
|
`DH-RSA-AES256-SHA`
|
||||||
|
`DHE-DSS-AES128-SHA`
|
||||||
|
`DHE-DSS-AES256-SHA`
|
||||||
|
`DHE-RSA-AES128-SHA`
|
||||||
|
`DHE-RSA-AES256-SHA`
|
||||||
|
`ADH-AES128-SHA`
|
||||||
|
`ADH-AES256-SHA`
|
||||||
|
|
||||||
|
### SEED cipher suites from RFC4162, extending TLS v1.0
|
||||||
|
|
||||||
|
`SEED-SHA`
|
||||||
|
`DH-DSS-SEED-SHA`
|
||||||
|
`DH-RSA-SEED-SHA`
|
||||||
|
`DHE-DSS-SEED-SHA`
|
||||||
|
`DHE-RSA-SEED-SHA`
|
||||||
|
`ADH-SEED-SHA`
|
||||||
|
|
||||||
|
### GOST cipher suites, extending TLS v1.0
|
||||||
|
|
||||||
|
`GOST94-GOST89-GOST89`
|
||||||
|
`GOST2001-GOST89-GOST89`
|
||||||
|
`GOST94-NULL-GOST94`
|
||||||
|
`GOST2001-NULL-GOST94`
|
||||||
|
|
||||||
|
### Elliptic curve cipher suites
|
||||||
|
|
||||||
|
`ECDHE-RSA-NULL-SHA`
|
||||||
|
`ECDHE-RSA-RC4-SHA`
|
||||||
|
`ECDHE-RSA-DES-CBC3-SHA`
|
||||||
|
`ECDHE-RSA-AES128-SHA`
|
||||||
|
`ECDHE-RSA-AES256-SHA`
|
||||||
|
`ECDHE-ECDSA-NULL-SHA`
|
||||||
|
`ECDHE-ECDSA-RC4-SHA`
|
||||||
|
`ECDHE-ECDSA-DES-CBC3-SHA`
|
||||||
|
`ECDHE-ECDSA-AES128-SHA`
|
||||||
|
`ECDHE-ECDSA-AES256-SHA`
|
||||||
|
`AECDH-NULL-SHA`
|
||||||
|
`AECDH-RC4-SHA`
|
||||||
|
`AECDH-DES-CBC3-SHA`
|
||||||
|
`AECDH-AES128-SHA`
|
||||||
|
`AECDH-AES256-SHA`
|
||||||
|
|
||||||
|
### TLS v1.2 cipher suites
|
||||||
|
|
||||||
|
`NULL-SHA256`
|
||||||
|
`AES128-SHA256`
|
||||||
|
`AES256-SHA256`
|
||||||
|
`AES128-GCM-SHA256`
|
||||||
|
`AES256-GCM-SHA384`
|
||||||
|
`DH-RSA-AES128-SHA256`
|
||||||
|
`DH-RSA-AES256-SHA256`
|
||||||
|
`DH-RSA-AES128-GCM-SHA256`
|
||||||
|
`DH-RSA-AES256-GCM-SHA384`
|
||||||
|
`DH-DSS-AES128-SHA256`
|
||||||
|
`DH-DSS-AES256-SHA256`
|
||||||
|
`DH-DSS-AES128-GCM-SHA256`
|
||||||
|
`DH-DSS-AES256-GCM-SHA384`
|
||||||
|
`DHE-RSA-AES128-SHA256`
|
||||||
|
`DHE-RSA-AES256-SHA256`
|
||||||
|
`DHE-RSA-AES128-GCM-SHA256`
|
||||||
|
`DHE-RSA-AES256-GCM-SHA384`
|
||||||
|
`DHE-DSS-AES128-SHA256`
|
||||||
|
`DHE-DSS-AES256-SHA256`
|
||||||
|
`DHE-DSS-AES128-GCM-SHA256`
|
||||||
|
`DHE-DSS-AES256-GCM-SHA384`
|
||||||
|
`ECDHE-RSA-AES128-SHA256`
|
||||||
|
`ECDHE-RSA-AES256-SHA384`
|
||||||
|
`ECDHE-RSA-AES128-GCM-SHA256`
|
||||||
|
`ECDHE-RSA-AES256-GCM-SHA384`
|
||||||
|
`ECDHE-ECDSA-AES128-SHA256`
|
||||||
|
`ECDHE-ECDSA-AES256-SHA384`
|
||||||
|
`ECDHE-ECDSA-AES128-GCM-SHA256`
|
||||||
|
`ECDHE-ECDSA-AES256-GCM-SHA384`
|
||||||
|
`ADH-AES128-SHA256`
|
||||||
|
`ADH-AES256-SHA256`
|
||||||
|
`ADH-AES128-GCM-SHA256`
|
||||||
|
`ADH-AES256-GCM-SHA384`
|
||||||
|
`AES128-CCM`
|
||||||
|
`AES256-CCM`
|
||||||
|
`DHE-RSA-AES128-CCM`
|
||||||
|
`DHE-RSA-AES256-CCM`
|
||||||
|
`AES128-CCM8`
|
||||||
|
`AES256-CCM8`
|
||||||
|
`DHE-RSA-AES128-CCM8`
|
||||||
|
`DHE-RSA-AES256-CCM8`
|
||||||
|
`ECDHE-ECDSA-AES128-CCM`
|
||||||
|
`ECDHE-ECDSA-AES256-CCM`
|
||||||
|
`ECDHE-ECDSA-AES128-CCM8`
|
||||||
|
`ECDHE-ECDSA-AES256-CCM8`
|
||||||
|
|
||||||
|
### Camellia HMAC-Based cipher suites from RFC6367, extending TLS v1.2
|
||||||
|
|
||||||
|
`ECDHE-ECDSA-CAMELLIA128-SHA256`
|
||||||
|
`ECDHE-ECDSA-CAMELLIA256-SHA384`
|
||||||
|
`ECDHE-RSA-CAMELLIA128-SHA256`
|
||||||
|
`ECDHE-RSA-CAMELLIA256-SHA384`
|
||||||
|
|
||||||
|
### TLS 1.3 cipher suites
|
||||||
|
|
||||||
|
(Note these ciphers are set with `CURLOPT_TLS13_CIPHERS` and `--tls13-ciphers`)
|
||||||
|
|
||||||
|
`TLS_AES_256_GCM_SHA384`
|
||||||
|
`TLS_CHACHA20_POLY1305_SHA256`
|
||||||
|
`TLS_AES_128_GCM_SHA256`
|
||||||
|
`TLS_AES_128_CCM_8_SHA256`
|
||||||
|
`TLS_AES_128_CCM_SHA256`
|
||||||
|
|
||||||
|
## NSS
|
||||||
|
|
||||||
|
### Totally insecure
|
||||||
|
|
||||||
|
`rc4`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4export`
|
||||||
|
`rc2`
|
||||||
|
`rc2export`
|
||||||
|
`des`
|
||||||
|
`desede3`
|
||||||
|
|
||||||
|
### SSL3/TLS cipher suites
|
||||||
|
|
||||||
|
`rsa_rc4_128_md5`
|
||||||
|
`rsa_rc4_128_sha`
|
||||||
|
`rsa_3des_sha`
|
||||||
|
`rsa_des_sha`
|
||||||
|
`rsa_rc4_40_md5`
|
||||||
|
`rsa_rc2_40_md5`
|
||||||
|
`rsa_null_md5`
|
||||||
|
`rsa_null_sha`
|
||||||
|
`fips_3des_sha`
|
||||||
|
`fips_des_sha`
|
||||||
|
`fortezza`
|
||||||
|
`fortezza_rc4_128_sha`
|
||||||
|
`fortezza_null`
|
||||||
|
|
||||||
|
### TLS 1.0 Exportable 56-bit Cipher Suites
|
||||||
|
|
||||||
|
`rsa_des_56_sha`
|
||||||
|
`rsa_rc4_56_sha`
|
||||||
|
|
||||||
|
### AES ciphers
|
||||||
|
|
||||||
|
`dhe_dss_aes_128_cbc_sha`
|
||||||
|
`dhe_dss_aes_256_cbc_sha`
|
||||||
|
`dhe_rsa_aes_128_cbc_sha`
|
||||||
|
`dhe_rsa_aes_256_cbc_sha`
|
||||||
|
`rsa_aes_128_sha`
|
||||||
|
`rsa_aes_256_sha`
|
||||||
|
|
||||||
|
### ECC ciphers
|
||||||
|
|
||||||
|
`ecdh_ecdsa_null_sha`
|
||||||
|
`ecdh_ecdsa_rc4_128_sha`
|
||||||
|
`ecdh_ecdsa_3des_sha`
|
||||||
|
`ecdh_ecdsa_aes_128_sha`
|
||||||
|
`ecdh_ecdsa_aes_256_sha`
|
||||||
|
`ecdhe_ecdsa_null_sha`
|
||||||
|
`ecdhe_ecdsa_rc4_128_sha`
|
||||||
|
`ecdhe_ecdsa_3des_sha`
|
||||||
|
`ecdhe_ecdsa_aes_128_sha`
|
||||||
|
`ecdhe_ecdsa_aes_256_sha`
|
||||||
|
`ecdh_rsa_null_sha`
|
||||||
|
`ecdh_rsa_128_sha`
|
||||||
|
`ecdh_rsa_3des_sha`
|
||||||
|
`ecdh_rsa_aes_128_sha`
|
||||||
|
`ecdh_rsa_aes_256_sha`
|
||||||
|
`ecdhe_rsa_null`
|
||||||
|
`ecdhe_rsa_rc4_128_sha`
|
||||||
|
`ecdhe_rsa_3des_sha`
|
||||||
|
`ecdhe_rsa_aes_128_sha`
|
||||||
|
`ecdhe_rsa_aes_256_sha`
|
||||||
|
`ecdh_anon_null_sha`
|
||||||
|
`ecdh_anon_rc4_128sha`
|
||||||
|
`ecdh_anon_3des_sha`
|
||||||
|
`ecdh_anon_aes_128_sha`
|
||||||
|
`ecdh_anon_aes_256_sha`
|
||||||
|
|
||||||
|
### HMAC-SHA256 cipher suites
|
||||||
|
|
||||||
|
`rsa_null_sha_256`
|
||||||
|
`rsa_aes_128_cbc_sha_256`
|
||||||
|
`rsa_aes_256_cbc_sha_256`
|
||||||
|
`dhe_rsa_aes_128_cbc_sha_256`
|
||||||
|
`dhe_rsa_aes_256_cbc_sha_256`
|
||||||
|
`ecdhe_ecdsa_aes_128_cbc_sha_256`
|
||||||
|
`ecdhe_rsa_aes_128_cbc_sha_256`
|
||||||
|
|
||||||
|
### AES GCM cipher suites in RFC 5288 and RFC 5289
|
||||||
|
|
||||||
|
`rsa_aes_128_gcm_sha_256`
|
||||||
|
`dhe_rsa_aes_128_gcm_sha_256`
|
||||||
|
`dhe_dss_aes_128_gcm_sha_256`
|
||||||
|
`ecdhe_ecdsa_aes_128_gcm_sha_256`
|
||||||
|
`ecdh_ecdsa_aes_128_gcm_sha_256`
|
||||||
|
`ecdhe_rsa_aes_128_gcm_sha_256`
|
||||||
|
`ecdh_rsa_aes_128_gcm_sha_256`
|
||||||
|
|
||||||
|
### cipher suites using SHA384
|
||||||
|
|
||||||
|
`rsa_aes_256_gcm_sha_384`
|
||||||
|
`dhe_rsa_aes_256_gcm_sha_384`
|
||||||
|
`dhe_dss_aes_256_gcm_sha_384`
|
||||||
|
`ecdhe_ecdsa_aes_256_sha_384`
|
||||||
|
`ecdhe_rsa_aes_256_sha_384`
|
||||||
|
`ecdhe_ecdsa_aes_256_gcm_sha_384`
|
||||||
|
`ecdhe_rsa_aes_256_gcm_sha_384`
|
||||||
|
|
||||||
|
### chacha20-poly1305 cipher suites
|
||||||
|
|
||||||
|
`ecdhe_rsa_chacha20_poly1305_sha_256`
|
||||||
|
`ecdhe_ecdsa_chacha20_poly1305_sha_256`
|
||||||
|
`dhe_rsa_chacha20_poly1305_sha_256`
|
||||||
|
|
||||||
|
### TLS 1.3 cipher suites
|
||||||
|
|
||||||
|
`aes_128_gcm_sha_256`
|
||||||
|
`aes_256_gcm_sha_384`
|
||||||
|
`chacha20_poly1305_sha_256`
|
||||||
|
|
||||||
|
## GSKit
|
||||||
|
|
||||||
|
Ciphers are internally defined as [numeric
|
||||||
|
codes](https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/gsk_attribute_set_buffer.htm). libcurl
|
||||||
|
maps them to the following case-insensitive names.
|
||||||
|
|
||||||
|
### SSL2 cipher suites (insecure: disabled by default)
|
||||||
|
|
||||||
|
`rc2-md5`
|
||||||
|
`rc4-md5`
|
||||||
|
`exp-rc2-md5`
|
||||||
|
`exp-rc4-md5`
|
||||||
|
`des-cbc-md5`
|
||||||
|
`des-cbc3-md5`
|
||||||
|
|
||||||
|
### SSL3 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`exp-rc2-cbc-md5`
|
||||||
|
`exp-rc4-md5`
|
||||||
|
`exp-des-cbc-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
|
||||||
|
### TLS v1.0 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`exp-rc2-cbc-md5`
|
||||||
|
`exp-rc4-md5`
|
||||||
|
`exp-des-cbc-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
`aes128-sha`
|
||||||
|
`aes256-sha`
|
||||||
|
|
||||||
|
### TLS v1.1 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`exp-des-cbc-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
`aes128-sha`
|
||||||
|
`aes256-sha`
|
||||||
|
|
||||||
|
### TLS v1.2 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`null-sha256`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
`aes128-sha`
|
||||||
|
`aes256-sha`
|
||||||
|
`aes128-sha256`
|
||||||
|
`aes256-sha256`
|
||||||
|
`aes128-gcm-sha256`
|
||||||
|
`aes256-gcm-sha384`
|
||||||
|
|
||||||
|
## WolfSSL
|
||||||
|
|
||||||
|
`RC4-SHA`,
|
||||||
|
`RC4-MD5`,
|
||||||
|
`DES-CBC3-SHA`,
|
||||||
|
`AES128-SHA`,
|
||||||
|
`AES256-SHA`,
|
||||||
|
`NULL-SHA`,
|
||||||
|
`NULL-SHA256`,
|
||||||
|
`DHE-RSA-AES128-SHA`,
|
||||||
|
`DHE-RSA-AES256-SHA`,
|
||||||
|
`DHE-PSK-AES256-GCM-SHA384`,
|
||||||
|
`DHE-PSK-AES128-GCM-SHA256`,
|
||||||
|
`PSK-AES256-GCM-SHA384`,
|
||||||
|
`PSK-AES128-GCM-SHA256`,
|
||||||
|
`DHE-PSK-AES256-CBC-SHA384`,
|
||||||
|
`DHE-PSK-AES128-CBC-SHA256`,
|
||||||
|
`PSK-AES256-CBC-SHA384`,
|
||||||
|
`PSK-AES128-CBC-SHA256`,
|
||||||
|
`PSK-AES128-CBC-SHA`,
|
||||||
|
`PSK-AES256-CBC-SHA`,
|
||||||
|
`DHE-PSK-AES128-CCM`,
|
||||||
|
`DHE-PSK-AES256-CCM`,
|
||||||
|
`PSK-AES128-CCM`,
|
||||||
|
`PSK-AES256-CCM`,
|
||||||
|
`PSK-AES128-CCM-8`,
|
||||||
|
`PSK-AES256-CCM-8`,
|
||||||
|
`DHE-PSK-NULL-SHA384`,
|
||||||
|
`DHE-PSK-NULL-SHA256`,
|
||||||
|
`PSK-NULL-SHA384`,
|
||||||
|
`PSK-NULL-SHA256`,
|
||||||
|
`PSK-NULL-SHA`,
|
||||||
|
`HC128-MD5`,
|
||||||
|
`HC128-SHA`,
|
||||||
|
`HC128-B2B256`,
|
||||||
|
`AES128-B2B256`,
|
||||||
|
`AES256-B2B256`,
|
||||||
|
`RABBIT-SHA`,
|
||||||
|
`NTRU-RC4-SHA`,
|
||||||
|
`NTRU-DES-CBC3-SHA`,
|
||||||
|
`NTRU-AES128-SHA`,
|
||||||
|
`NTRU-AES256-SHA`,
|
||||||
|
`AES128-CCM-8`,
|
||||||
|
`AES256-CCM-8`,
|
||||||
|
`ECDHE-ECDSA-AES128-CCM`,
|
||||||
|
`ECDHE-ECDSA-AES128-CCM-8`,
|
||||||
|
`ECDHE-ECDSA-AES256-CCM-8`,
|
||||||
|
`ECDHE-RSA-AES128-SHA`,
|
||||||
|
`ECDHE-RSA-AES256-SHA`,
|
||||||
|
`ECDHE-ECDSA-AES128-SHA`,
|
||||||
|
`ECDHE-ECDSA-AES256-SHA`,
|
||||||
|
`ECDHE-RSA-RC4-SHA`,
|
||||||
|
`ECDHE-RSA-DES-CBC3-SHA`,
|
||||||
|
`ECDHE-ECDSA-RC4-SHA`,
|
||||||
|
`ECDHE-ECDSA-DES-CBC3-SHA`,
|
||||||
|
`AES128-SHA256`,
|
||||||
|
`AES256-SHA256`,
|
||||||
|
`DHE-RSA-AES128-SHA256`,
|
||||||
|
`DHE-RSA-AES256-SHA256`,
|
||||||
|
`ECDH-RSA-AES128-SHA`,
|
||||||
|
`ECDH-RSA-AES256-SHA`,
|
||||||
|
`ECDH-ECDSA-AES128-SHA`,
|
||||||
|
`ECDH-ECDSA-AES256-SHA`,
|
||||||
|
`ECDH-RSA-RC4-SHA`,
|
||||||
|
`ECDH-RSA-DES-CBC3-SHA`,
|
||||||
|
`ECDH-ECDSA-RC4-SHA`,
|
||||||
|
`ECDH-ECDSA-DES-CBC3-SHA`,
|
||||||
|
`AES128-GCM-SHA256`,
|
||||||
|
`AES256-GCM-SHA384`,
|
||||||
|
`DHE-RSA-AES128-GCM-SHA256`,
|
||||||
|
`DHE-RSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDHE-RSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDHE-RSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDHE-ECDSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDHE-ECDSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDH-RSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDH-RSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDH-ECDSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDH-ECDSA-AES256-GCM-SHA384`,
|
||||||
|
`CAMELLIA128-SHA`,
|
||||||
|
`DHE-RSA-CAMELLIA128-SHA`,
|
||||||
|
`CAMELLIA256-SHA`,
|
||||||
|
`DHE-RSA-CAMELLIA256-SHA`,
|
||||||
|
`CAMELLIA128-SHA256`,
|
||||||
|
`DHE-RSA-CAMELLIA128-SHA256`,
|
||||||
|
`CAMELLIA256-SHA256`,
|
||||||
|
`DHE-RSA-CAMELLIA256-SHA256`,
|
||||||
|
`ECDHE-RSA-AES128-SHA256`,
|
||||||
|
`ECDHE-ECDSA-AES128-SHA256`,
|
||||||
|
`ECDH-RSA-AES128-SHA256`,
|
||||||
|
`ECDH-ECDSA-AES128-SHA256`,
|
||||||
|
`ECDHE-RSA-AES256-SHA384`,
|
||||||
|
`ECDHE-ECDSA-AES256-SHA384`,
|
||||||
|
`ECDH-RSA-AES256-SHA384`,
|
||||||
|
`ECDH-ECDSA-AES256-SHA384`,
|
||||||
|
`ECDHE-RSA-CHACHA20-POLY1305`,
|
||||||
|
`ECDHE-ECDSA-CHACHA20-POLY1305`,
|
||||||
|
`DHE-RSA-CHACHA20-POLY1305`,
|
||||||
|
`ECDHE-RSA-CHACHA20-POLY1305-OLD`,
|
||||||
|
`ECDHE-ECDSA-CHACHA20-POLY1305-OLD`,
|
||||||
|
`DHE-RSA-CHACHA20-POLY1305-OLD`,
|
||||||
|
`ADH-AES128-SHA`,
|
||||||
|
`QSH`,
|
||||||
|
`RENEGOTIATION-INFO`,
|
||||||
|
`IDEA-CBC-SHA`,
|
||||||
|
`ECDHE-ECDSA-NULL-SHA`,
|
||||||
|
`ECDHE-PSK-NULL-SHA256`,
|
||||||
|
`ECDHE-PSK-AES128-CBC-SHA256`,
|
||||||
|
`PSK-CHACHA20-POLY1305`,
|
||||||
|
`ECDHE-PSK-CHACHA20-POLY1305`,
|
||||||
|
`DHE-PSK-CHACHA20-POLY1305`,
|
||||||
|
`EDH-RSA-DES-CBC3-SHA`,
|
||||||
|
|
||||||
|
## Schannel
|
||||||
|
|
||||||
|
Schannel allows the enabling and disabling of encryption algorithms, but not
|
||||||
|
specific cipher suites. They are
|
||||||
|
[defined](https://docs.microsoft.com/windows/desktop/SecCrypto/alg-id) by
|
||||||
|
Microsoft.
|
||||||
|
|
||||||
|
There is also the case that the selected algorithm is not supported by the
|
||||||
|
protocol or does not match the ciphers offered by the server during the SSL
|
||||||
|
negotiation. In this case curl will return error
|
||||||
|
`CURLE_SSL_CONNECT_ERROR (35) SEC_E_ALGORITHM_MISMATCH`
|
||||||
|
and the request will fail.
|
||||||
|
|
||||||
|
`CALG_MD2`,
|
||||||
|
`CALG_MD4`,
|
||||||
|
`CALG_MD5`,
|
||||||
|
`CALG_SHA`,
|
||||||
|
`CALG_SHA1`,
|
||||||
|
`CALG_MAC`,
|
||||||
|
`CALG_RSA_SIGN`,
|
||||||
|
`CALG_DSS_SIGN`,
|
||||||
|
`CALG_NO_SIGN`,
|
||||||
|
`CALG_RSA_KEYX`,
|
||||||
|
`CALG_DES`,
|
||||||
|
`CALG_3DES_112`,
|
||||||
|
`CALG_3DES`,
|
||||||
|
`CALG_DESX`,
|
||||||
|
`CALG_RC2`,
|
||||||
|
`CALG_RC4`,
|
||||||
|
`CALG_SEAL`,
|
||||||
|
`CALG_DH_SF`,
|
||||||
|
`CALG_DH_EPHEM`,
|
||||||
|
`CALG_AGREEDKEY_ANY`,
|
||||||
|
`CALG_HUGHES_MD5`,
|
||||||
|
`CALG_SKIPJACK`,
|
||||||
|
`CALG_TEK`,
|
||||||
|
`CALG_CYLINK_MEK`,
|
||||||
|
`CALG_SSL3_SHAMD5`,
|
||||||
|
`CALG_SSL3_MASTER`,
|
||||||
|
`CALG_SCHANNEL_MASTER_HASH`,
|
||||||
|
`CALG_SCHANNEL_MAC_KEY`,
|
||||||
|
`CALG_SCHANNEL_ENC_KEY`,
|
||||||
|
`CALG_PCT1_MASTER`,
|
||||||
|
`CALG_SSL2_MASTER`,
|
||||||
|
`CALG_TLS1_MASTER`,
|
||||||
|
`CALG_RC5`,
|
||||||
|
`CALG_HMAC`,
|
||||||
|
`CALG_TLS1PRF`,
|
||||||
|
`CALG_HASH_REPLACE_OWF`,
|
||||||
|
`CALG_AES_128`,
|
||||||
|
`CALG_AES_192`,
|
||||||
|
`CALG_AES_256`,
|
||||||
|
`CALG_AES`,
|
||||||
|
`CALG_SHA_256`,
|
||||||
|
`CALG_SHA_384`,
|
||||||
|
`CALG_SHA_512`,
|
||||||
|
`CALG_ECDH`,
|
||||||
|
`CALG_ECMQV`,
|
||||||
|
`CALG_ECDSA`,
|
||||||
|
`CALG_ECDH_EPHEM`,
|
||||||
|
|
||||||
|
As of curl 7.77.0, you can also pass `SCH_USE_STRONG_CRYPTO` as a cipher name
|
||||||
|
to [constrain the set of available ciphers as specified in the Schannel
|
||||||
|
documentation](https://docs.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-server-2022).
|
||||||
|
Note that the supported ciphers in this case follow the OS version, so if you
|
||||||
|
are running an outdated OS you might still be supporting weak ciphers.
|
||||||
|
|
||||||
|
### TLS 1.3 cipher suites
|
||||||
|
|
||||||
|
(Note these ciphers are set with `CURLOPT_TLS13_CIPHERS` and `--tls13-ciphers`)
|
||||||
|
|
||||||
|
`TLS_AES_256_GCM_SHA384`
|
||||||
|
`TLS_AES_128_GCM_SHA256`
|
||||||
|
`TLS_CHACHA20_POLY1305_SHA256`
|
||||||
|
`TLS_AES_128_CCM_8_SHA256`
|
||||||
|
`TLS_AES_128_CCM_SHA256`
|
||||||
|
|
||||||
|
## BearSSL
|
||||||
|
|
||||||
|
BearSSL ciphers can be specified by either the OpenSSL name (`ECDHE-RSA-AES128-GCM-SHA256`) or the IANA name (`TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`).
|
||||||
|
|
||||||
|
Since BearSSL 0.1:
|
||||||
|
|
||||||
|
`DES-CBC3-SHA`
|
||||||
|
`AES128-SHA`
|
||||||
|
`AES256-SHA`
|
||||||
|
`AES128-SHA256`
|
||||||
|
`AES256-SHA256`
|
||||||
|
`AES128-GCM-SHA256`
|
||||||
|
`AES256-GCM-SHA384`
|
||||||
|
`ECDH-ECDSA-DES-CBC3-SHA`
|
||||||
|
`ECDH-ECDSA-AES128-SHA`
|
||||||
|
`ECDH-ECDSA-AES256-SHA`
|
||||||
|
`ECDHE-ECDSA-DES-CBC3-SHA`
|
||||||
|
`ECDHE-ECDSA-AES128-SHA`
|
||||||
|
`ECDHE-ECDSA-AES256-SHA`
|
||||||
|
`ECDH-RSA-DES-CBC3-SHA`
|
||||||
|
`ECDH-RSA-AES128-SHA`
|
||||||
|
`ECDH-RSA-AES256-SHA`
|
||||||
|
`ECDHE-RSA-DES-CBC3-SHA`
|
||||||
|
`ECDHE-RSA-AES128-SHA`
|
||||||
|
`ECDHE-RSA-AES256-SHA`
|
||||||
|
`ECDHE-ECDSA-AES128-SHA256`
|
||||||
|
`ECDHE-ECDSA-AES256-SHA384`
|
||||||
|
`ECDH-ECDSA-AES128-SHA256`
|
||||||
|
`ECDH-ECDSA-AES256-SHA384`
|
||||||
|
`ECDHE-RSA-AES128-SHA256`
|
||||||
|
`ECDHE-RSA-AES256-SHA384`
|
||||||
|
`ECDH-RSA-AES128-SHA256`
|
||||||
|
`ECDH-RSA-AES256-SHA384`
|
||||||
|
`ECDHE-ECDSA-AES128-GCM-SHA256`
|
||||||
|
`ECDHE-ECDSA-AES256-GCM-SHA384`
|
||||||
|
`ECDH-ECDSA-AES128-GCM-SHA256`
|
||||||
|
`ECDH-ECDSA-AES256-GCM-SHA384`
|
||||||
|
`ECDHE-RSA-AES128-GCM-SHA256`
|
||||||
|
`ECDHE-RSA-AES256-GCM-SHA384`
|
||||||
|
`ECDH-RSA-AES128-GCM-SHA256`
|
||||||
|
`ECDH-RSA-AES256-GCM-SHA384`
|
||||||
|
|
||||||
|
Since BearSSL 0.2:
|
||||||
|
|
||||||
|
`ECDHE-RSA-CHACHA20-POLY1305`
|
||||||
|
`ECDHE-ECDSA-CHACHA20-POLY1305`
|
||||||
|
|
||||||
|
Since BearSSL 0.6:
|
||||||
|
|
||||||
|
`AES128-CCM`
|
||||||
|
`AES256-CCM`
|
||||||
|
`AES128-CCM8`
|
||||||
|
`AES256-CCM8`
|
||||||
|
`ECDHE-ECDSA-AES128-CCM`
|
||||||
|
`ECDHE-ECDSA-AES256-CCM`
|
||||||
|
`ECDHE-ECDSA-AES128-CCM8`
|
||||||
|
`ECDHE-ECDSA-AES256-CCM8`
|
@ -0,0 +1,26 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
#add_subdirectory(examples)
|
||||||
|
add_subdirectory(libcurl)
|
||||||
|
add_subdirectory(cmdline-opts)
|
@ -0,0 +1,32 @@
|
|||||||
|
Contributor Code of Conduct
|
||||||
|
===========================
|
||||||
|
|
||||||
|
As contributors and maintainers of this project, we pledge to respect all
|
||||||
|
people who contribute through reporting issues, posting feature requests,
|
||||||
|
updating documentation, submitting pull requests or patches, and other
|
||||||
|
activities.
|
||||||
|
|
||||||
|
We are committed to making participation in this project a harassment-free
|
||||||
|
experience for everyone, regardless of level of experience, gender, gender
|
||||||
|
identity and expression, sexual orientation, disability, personal appearance,
|
||||||
|
body size, race, ethnicity, age, or religion.
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include the use of sexual
|
||||||
|
language or imagery, derogatory comments or personal attacks, trolling, public
|
||||||
|
or private harassment, insults, or other unprofessional conduct.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct. Project maintainers who do not
|
||||||
|
follow the Code of Conduct may be removed from the project team.
|
||||||
|
|
||||||
|
This code of conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community.
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by opening an issue or contacting one or more of the project
|
||||||
|
maintainers.
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor
|
||||||
|
Covenant](https://contributor-covenant.org/), version 1.1.0, available at
|
||||||
|
[https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/)
|
@ -0,0 +1,168 @@
|
|||||||
|
# How to do code reviews for curl
|
||||||
|
|
||||||
|
Anyone and everyone is encouraged and welcome to review code submissions in
|
||||||
|
curl. This is a guide on what to check for and how to perform a successful
|
||||||
|
code review.
|
||||||
|
|
||||||
|
## All submissions should get reviewed
|
||||||
|
|
||||||
|
All pull requests and patches submitted to the project should be reviewed by
|
||||||
|
at least one experienced curl maintainer before that code is accepted and
|
||||||
|
merged.
|
||||||
|
|
||||||
|
## Let the tools and tests take the first rounds
|
||||||
|
|
||||||
|
On initial pull requests, let the tools and tests do their job first and then
|
||||||
|
start out by helping the submitter understand the test failures and tool
|
||||||
|
alerts.
|
||||||
|
|
||||||
|
## How to provide feedback to author
|
||||||
|
|
||||||
|
Be nice. Ask questions. Provide examples or suggestions of improvements.
|
||||||
|
Assume the best intentions. Remember language barriers.
|
||||||
|
|
||||||
|
All first-time contributors can become regulars. Let's help them go there.
|
||||||
|
|
||||||
|
## Is this a change we want?
|
||||||
|
|
||||||
|
If this is not a change that seems to be aligned with the project's path
|
||||||
|
forward and as such cannot be accepted, inform the author about this sooner
|
||||||
|
rather than later. Do it gently and explain why and possibly what could be
|
||||||
|
done to make it more acceptable.
|
||||||
|
|
||||||
|
## API/ABI stability or changed behavior
|
||||||
|
|
||||||
|
Changing the API and the ABI may be fine in a change but it needs to be done
|
||||||
|
deliberately and carefully. If not, a reviewer must help the author to realize
|
||||||
|
the mistake.
|
||||||
|
|
||||||
|
curl and libcurl are similarly strict on not modifying existing behavior. API
|
||||||
|
and ABI stability is not enough, the behavior should also remain intact as far
|
||||||
|
as possible.
|
||||||
|
|
||||||
|
## Code style
|
||||||
|
|
||||||
|
Most code style nits are detected by checksrc but not all. Only leave remarks
|
||||||
|
on style deviation once checksrc does not find anymore.
|
||||||
|
|
||||||
|
Minor nits from fresh submitters can also be handled by the maintainer when
|
||||||
|
merging, in case it seems like the submitter is not clear on what to do. We
|
||||||
|
want to make the process fun and exciting for new contributors.
|
||||||
|
|
||||||
|
## Encourage consistency
|
||||||
|
|
||||||
|
Make sure new code is written in a similar style as existing code. Naming,
|
||||||
|
logic, conditions, etc.
|
||||||
|
|
||||||
|
## Are pointers always non-NULL?
|
||||||
|
|
||||||
|
If a function or code rely on pointers being non-NULL, take an extra look if
|
||||||
|
that seems to be a fair assessment.
|
||||||
|
|
||||||
|
## Asserts
|
||||||
|
|
||||||
|
Conditions that should never be false can be verified with `DEBUGASSERT()`
|
||||||
|
calls to get caught in tests and debugging easier, while not having an impact
|
||||||
|
on final or release builds.
|
||||||
|
|
||||||
|
## Memory allocation
|
||||||
|
|
||||||
|
Can the mallocs be avoided? Do not introduce mallocs in any hot paths. If
|
||||||
|
there are (new) mallocs, can they be combined into fewer calls?
|
||||||
|
|
||||||
|
Are all allocations handled in error paths to avoid leaks and crashes?
|
||||||
|
|
||||||
|
## Thread-safety
|
||||||
|
|
||||||
|
We do not like static variables as they break thread-safety and prevent
|
||||||
|
functions from being reentrant.
|
||||||
|
|
||||||
|
## Should features be `#ifdef`ed?
|
||||||
|
|
||||||
|
Features and functionality may not be present everywhere and should therefore
|
||||||
|
be `#ifdef`ed. Additionally, some features should be possible to switch on/off
|
||||||
|
in the build.
|
||||||
|
|
||||||
|
Write `#ifdef`s to be as little of a "maze" as possible.
|
||||||
|
|
||||||
|
## Does it look portable enough?
|
||||||
|
|
||||||
|
curl runs "everywhere". Does the code take a reasonable stance and enough
|
||||||
|
precautions to be possible to build and run on most platforms?
|
||||||
|
|
||||||
|
Remember that we live by C89 restrictions.
|
||||||
|
|
||||||
|
## Tests and testability
|
||||||
|
|
||||||
|
New features should be added in conjunction with one or more test cases.
|
||||||
|
Ideally, functions should also be written so that unit tests can be done to
|
||||||
|
test individual functions.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
New features or changes to existing functionality **must** be accompanied by
|
||||||
|
updated documentation. Submitting that in a separate follow-up pull request is
|
||||||
|
not OK. A code review must also verify that the submitted documentation update
|
||||||
|
matches the code submission.
|
||||||
|
|
||||||
|
English is not everyone's first language, be mindful of this and help the
|
||||||
|
submitter improve the text if it needs a rewrite to read better.
|
||||||
|
|
||||||
|
## Code should not be hard to understand
|
||||||
|
|
||||||
|
Source code should be written to maximize readability and be easy to
|
||||||
|
understand.
|
||||||
|
|
||||||
|
## Functions should not be large
|
||||||
|
|
||||||
|
A single function should never be large as that makes it hard to follow and
|
||||||
|
understand all the exit points and state changes. Some existing functions in
|
||||||
|
curl certainly violate this ground rule but when reviewing new code we should
|
||||||
|
propose splitting into smaller functions.
|
||||||
|
|
||||||
|
## Duplication is evil
|
||||||
|
|
||||||
|
Anything that looks like duplicated code is a red flag. Anything that seems to
|
||||||
|
introduce code that we *should* already have or provide needs a closer check.
|
||||||
|
|
||||||
|
## Sensitive data
|
||||||
|
|
||||||
|
When credentials are involved, take an extra look at what happens with this
|
||||||
|
data. Where it comes from and where it goes.
|
||||||
|
|
||||||
|
## Variable types differ
|
||||||
|
|
||||||
|
`size_t` is not a fixed size. `time_t` can be signed or unsigned and have
|
||||||
|
different sizes. Relying on variable sizes is a red flag.
|
||||||
|
|
||||||
|
Also remember that endianness and >= 32 bit accesses to unaligned addresses
|
||||||
|
are problematic areas.
|
||||||
|
|
||||||
|
## Integer overflows
|
||||||
|
|
||||||
|
Be careful about integer overflows. Some variable types can be either 32 bit
|
||||||
|
or 64 bit. Integer overflows must be detected and acted on *before* they
|
||||||
|
happen.
|
||||||
|
|
||||||
|
## Dangerous use of functions
|
||||||
|
|
||||||
|
Maybe use of `realloc()` should rather use the dynbuf functions?
|
||||||
|
|
||||||
|
Do not allow new code that grows buffers without using dynbuf.
|
||||||
|
|
||||||
|
Use of C functions that rely on a terminating zero must only be used on data
|
||||||
|
that really do have a null-terminating zero.
|
||||||
|
|
||||||
|
## Dangerous "data styles"
|
||||||
|
|
||||||
|
Make extra precautions and verify that memory buffers that need a terminating
|
||||||
|
zero always have exactly that. Buffers *without* a null-terminator must not be
|
||||||
|
used as input to string functions.
|
||||||
|
|
||||||
|
# Commit messages
|
||||||
|
|
||||||
|
Tightly coupled with a code review is making sure that the commit message is
|
||||||
|
good. It is the responsibility of the person who merges the code to make sure
|
||||||
|
that the commit message follows our standard (detailed in the
|
||||||
|
[CONTRIBUTE](CONTRIBUTE.md) document). This includes making sure the PR
|
||||||
|
identifies related issues and giving credit to reporters and helpers.
|
@ -0,0 +1,310 @@
|
|||||||
|
# curl C code style
|
||||||
|
|
||||||
|
Source code that has a common style is easier to read than code that uses
|
||||||
|
different styles in different places. It helps making the code feel like one
|
||||||
|
single code base. Easy-to-read is an important property of code and helps
|
||||||
|
making it easier to review when new things are added and it helps debugging
|
||||||
|
code when developers are trying to figure out why things go wrong. A unified
|
||||||
|
style is more important than individual contributors having their own personal
|
||||||
|
tastes satisfied.
|
||||||
|
|
||||||
|
Our C code has a few style rules. Most of them are verified and upheld by the
|
||||||
|
`scripts/checksrc.pl` script. Invoked with `make checksrc` or even by default
|
||||||
|
by the build system when built after `./configure --enable-debug` has been
|
||||||
|
used.
|
||||||
|
|
||||||
|
It is normally not a problem for anyone to follow the guidelines, as you just
|
||||||
|
need to copy the style already used in the source code and there are no
|
||||||
|
particularly unusual rules in our set of rules.
|
||||||
|
|
||||||
|
We also work hard on writing code that are warning-free on all the major
|
||||||
|
platforms and in general on as many platforms as possible. Code that obviously
|
||||||
|
will cause warnings will not be accepted as-is.
|
||||||
|
|
||||||
|
## Naming
|
||||||
|
|
||||||
|
Try using a non-confusing naming scheme for your new functions and variable
|
||||||
|
names. It does not necessarily have to mean that you should use the same as in
|
||||||
|
other places of the code, just that the names should be logical,
|
||||||
|
understandable and be named according to what they are used for. File-local
|
||||||
|
functions should be made static. We like lower case names.
|
||||||
|
|
||||||
|
See the [INTERNALS](https://curl.se/dev/internals.html#symbols) document on
|
||||||
|
how we name non-exported library-global symbols.
|
||||||
|
|
||||||
|
## Indenting
|
||||||
|
|
||||||
|
We use only spaces for indentation, never TABs. We use two spaces for each new
|
||||||
|
open brace.
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(something_is_true) {
|
||||||
|
while(second_statement == fine) {
|
||||||
|
moo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Comments
|
||||||
|
|
||||||
|
Since we write C89 code, **//** comments are not allowed. They were not
|
||||||
|
introduced in the C standard until C99. We use only __/* comments */__.
|
||||||
|
|
||||||
|
```c
|
||||||
|
/* this is a comment */
|
||||||
|
```
|
||||||
|
|
||||||
|
## Long lines
|
||||||
|
|
||||||
|
Source code in curl may never be wider than 79 columns and there are two
|
||||||
|
reasons for maintaining this even in the modern era of large and high
|
||||||
|
resolution screens:
|
||||||
|
|
||||||
|
1. Narrower columns are easier to read than wide ones. There's a reason
|
||||||
|
newspapers have used columns for decades or centuries.
|
||||||
|
|
||||||
|
2. Narrower columns allow developers to easier show multiple pieces of code
|
||||||
|
next to each other in different windows. It allows two or three source
|
||||||
|
code windows next to each other on the same screen - as well as multiple
|
||||||
|
terminal and debugging windows.
|
||||||
|
|
||||||
|
## Braces
|
||||||
|
|
||||||
|
In if/while/do/for expressions, we write the open brace on the same line as
|
||||||
|
the keyword and we then set the closing brace on the same indentation level as
|
||||||
|
the initial keyword. Like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(age < 40) {
|
||||||
|
/* clearly a youngster */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You may omit the braces if they would contain only a one-line statement:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(!x)
|
||||||
|
continue;
|
||||||
|
```
|
||||||
|
|
||||||
|
For functions the opening brace should be on a separate line:
|
||||||
|
|
||||||
|
```c
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 'else' on the following line
|
||||||
|
|
||||||
|
When adding an **else** clause to a conditional expression using braces, we
|
||||||
|
add it on a new line after the closing brace. Like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(age < 40) {
|
||||||
|
/* clearly a youngster */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* probably grumpy */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## No space before parentheses
|
||||||
|
|
||||||
|
When writing expressions using if/while/do/for, there shall be no space
|
||||||
|
between the keyword and the open parenthesis. Like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
while(1) {
|
||||||
|
/* loop forever */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Use boolean conditions
|
||||||
|
|
||||||
|
Rather than test a conditional value such as a bool against TRUE or FALSE, a
|
||||||
|
pointer against NULL or != NULL and an int against zero or not zero in
|
||||||
|
if/while conditions we prefer:
|
||||||
|
|
||||||
|
```c
|
||||||
|
result = do_something();
|
||||||
|
if(!result) {
|
||||||
|
/* something went wrong */
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## No assignments in conditions
|
||||||
|
|
||||||
|
To increase readability and reduce complexity of conditionals, we avoid
|
||||||
|
assigning variables within if/while conditions. We frown upon this style:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if((ptr = malloc(100)) == NULL)
|
||||||
|
return NULL;
|
||||||
|
```
|
||||||
|
|
||||||
|
and instead we encourage the above version to be spelled out more clearly:
|
||||||
|
|
||||||
|
```c
|
||||||
|
ptr = malloc(100);
|
||||||
|
if(!ptr)
|
||||||
|
return NULL;
|
||||||
|
```
|
||||||
|
|
||||||
|
## New block on a new line
|
||||||
|
|
||||||
|
We never write multiple statements on the same source line, even for short
|
||||||
|
if() conditions.
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(a)
|
||||||
|
return TRUE;
|
||||||
|
else if(b)
|
||||||
|
return FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
and NEVER:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(a) return TRUE;
|
||||||
|
else if(b) return FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Space around operators
|
||||||
|
|
||||||
|
Please use spaces on both sides of operators in C expressions. Postfix **(),
|
||||||
|
[], ->, ., ++, --** and Unary **+, -, !, ~, &** operators excluded they should
|
||||||
|
have no space.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bla = func();
|
||||||
|
who = name[0];
|
||||||
|
age += 1;
|
||||||
|
true = !false;
|
||||||
|
size += -2 + 3 * (a + b);
|
||||||
|
ptr->member = a++;
|
||||||
|
struct.field = b--;
|
||||||
|
ptr = &address;
|
||||||
|
contents = *pointer;
|
||||||
|
complement = ~bits;
|
||||||
|
empty = (!*string) ? TRUE : FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
## No parentheses for return values
|
||||||
|
|
||||||
|
We use the 'return' statement without extra parentheses around the value:
|
||||||
|
|
||||||
|
```c
|
||||||
|
int works(void)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Parentheses for sizeof arguments
|
||||||
|
|
||||||
|
When using the sizeof operator in code, we prefer it to be written with
|
||||||
|
parentheses around its argument:
|
||||||
|
|
||||||
|
```c
|
||||||
|
int size = sizeof(int);
|
||||||
|
```
|
||||||
|
|
||||||
|
## Column alignment
|
||||||
|
|
||||||
|
Some statements cannot be completed on a single line because the line would be
|
||||||
|
too long, the statement too hard to read, or due to other style guidelines
|
||||||
|
above. In such a case the statement will span multiple lines.
|
||||||
|
|
||||||
|
If a continuation line is part of an expression or sub-expression then you
|
||||||
|
should align on the appropriate column so that it's easy to tell what part of
|
||||||
|
the statement it is. Operators should not start continuation lines. In other
|
||||||
|
cases follow the 2-space indent guideline. Here are some examples from
|
||||||
|
libcurl:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
|
||||||
|
(handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
||||||
|
(handle->set.httpreq == HTTPREQ_GET ||
|
||||||
|
handle->set.httpreq == HTTPREQ_HEAD))
|
||||||
|
/* did not ask for HTTP/1.0 and a GET or HEAD */
|
||||||
|
return TRUE;
|
||||||
|
```
|
||||||
|
|
||||||
|
If no parenthesis, use the default indent:
|
||||||
|
|
||||||
|
```c
|
||||||
|
data->set.http_disable_hostname_check_before_authentication =
|
||||||
|
(0 != va_arg(param, long)) ? TRUE : FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
Function invoke with an open parenthesis:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(option) {
|
||||||
|
result = parse_login_details(option, strlen(option),
|
||||||
|
(userp ? &user : NULL),
|
||||||
|
(passwdp ? &passwd : NULL),
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Align with the "current open" parenthesis:
|
||||||
|
|
||||||
|
```c
|
||||||
|
DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
|
||||||
|
"server response left\n",
|
||||||
|
(int)clipamount));
|
||||||
|
```
|
||||||
|
|
||||||
|
## Platform dependent code
|
||||||
|
|
||||||
|
Use **#ifdef HAVE_FEATURE** to do conditional code. We avoid checking for
|
||||||
|
particular operating systems or hardware in the #ifdef lines. The HAVE_FEATURE
|
||||||
|
shall be generated by the configure script for unix-like systems and they are
|
||||||
|
hard-coded in the `config-[system].h` files for the others.
|
||||||
|
|
||||||
|
We also encourage use of macros/functions that possibly are empty or defined
|
||||||
|
to constants when libcurl is built without that feature, to make the code
|
||||||
|
seamless. Like this example where the **magic()** function works differently
|
||||||
|
depending on a build-time conditional:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#ifdef HAVE_MAGIC
|
||||||
|
void magic(int a)
|
||||||
|
{
|
||||||
|
return a + 2;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define magic(x) 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int content = magic(3);
|
||||||
|
```
|
||||||
|
|
||||||
|
## No typedefed structs
|
||||||
|
|
||||||
|
Use structs by all means, but do not typedef them. Use the `struct name` way
|
||||||
|
of identifying them:
|
||||||
|
|
||||||
|
```c
|
||||||
|
struct something {
|
||||||
|
void *valid;
|
||||||
|
size_t way_to_write;
|
||||||
|
};
|
||||||
|
struct something instance;
|
||||||
|
```
|
||||||
|
|
||||||
|
**Not okay**:
|
||||||
|
|
||||||
|
```c
|
||||||
|
typedef struct {
|
||||||
|
void *wrong;
|
||||||
|
size_t way_to_write;
|
||||||
|
} something;
|
||||||
|
something instance;
|
||||||
|
```
|
@ -0,0 +1,127 @@
|
|||||||
|
# curl connection filters
|
||||||
|
|
||||||
|
Connection filters is a design in the internals of curl, not visible in its public API. They were added
|
||||||
|
in curl v7.xx.x. This document describes the concepts, its high level implementation and the motivations.
|
||||||
|
|
||||||
|
## Filters
|
||||||
|
|
||||||
|
A "connection filter" is a piece of code that is responsible for handling a range of operations
|
||||||
|
of curl's connections: reading, writing, waiting on external events, connecting and closing down - to name the most important ones.
|
||||||
|
|
||||||
|
The most important feat of connection filters is that they can be stacked on top of each other (or "chained" if you prefer that metaphor). In the common scenario that you want to retrieve a `https:` url with curl, you need 2 basic things to send the request and get the response: a TCP connection, represented by a `socket` and a SSL instance en- and decrypt over that socket. You write your request to the SSL instance, which encrypts and writes that data to the socket, which then sends the bytes over the network.
|
||||||
|
|
||||||
|
With connection filters, curl's internal setup will look something like this (cf for connection filter):
|
||||||
|
|
||||||
|
```
|
||||||
|
Curl_easy *data connectdata *conn cf-ssl cf-socket
|
||||||
|
+----------------+ +-----------------+ +-------+ +--------+
|
||||||
|
|https://curl.se/|----> | properties |----> | keys |---> | socket |--> OS --> network
|
||||||
|
+----------------+ +-----------------+ +-------+ +--------+
|
||||||
|
|
||||||
|
Curl_write(data, buffer)
|
||||||
|
--> Curl_cfilter_write(data, data->conn, buffer)
|
||||||
|
---> conn->filter->write(conn->filter, data, buffer)
|
||||||
|
```
|
||||||
|
|
||||||
|
While connection filters all do different things, they look the same from the "outside". The code in `data` and `conn` does not really know **which** filters are installed. `conn` just writes into the first filter, whatever that is.
|
||||||
|
|
||||||
|
Same is true for filters. Each filter has a pointer to the `next` filter. When SSL has encrypted the data, it does not write to a socket, it writes to the next filter. If that is indeed a socket, or a file, or an HTTP/2 connection is of no concern to the SSL filter.
|
||||||
|
|
||||||
|
And this allows the stacking, as in:
|
||||||
|
|
||||||
|
```
|
||||||
|
Direct:
|
||||||
|
http://localhost/ conn -> cf-socket
|
||||||
|
https://curl.se/ conn -> cf-ssl -> cf-socket
|
||||||
|
Via http proxy tunnel:
|
||||||
|
http://localhost/ conn -> cf-http-proxy -> cf-socket
|
||||||
|
https://curl.se/ conn -> cf-ssl -> cf-http-proxy -> cf-socket
|
||||||
|
Via https proxy tunnel:
|
||||||
|
http://localhost/ conn -> cf-http-proxy -> cf-ssl -> cf-socket
|
||||||
|
https://curl.se/ conn -> cf-ssl -> cf-http-proxy -> cf-ssl -> cf-socket
|
||||||
|
Via http proxy tunnel via SOCKS proxy:
|
||||||
|
http://localhost/ conn -> cf-http-proxy -> cf-socks -> cf-socket
|
||||||
|
```
|
||||||
|
|
||||||
|
### Connecting/Closing
|
||||||
|
|
||||||
|
Before `Curl_easy` can send the request, the connection needs to be established. This means that all connection filters have done, whatever they need to do: waiting for the socket to be connected, doing the TLS handshake, performing the HTTP tunnel request, etc. This has to be done in reverse order: the last filter has to do its connect first, then the one above can start, etc.
|
||||||
|
|
||||||
|
Each filter does in principle the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
static CURLcode
|
||||||
|
myfilter_cf_connect(struct Curl_cfilter *cf,
|
||||||
|
struct Curl_easy *data,
|
||||||
|
bool *done)
|
||||||
|
{
|
||||||
|
CURLcode result;
|
||||||
|
|
||||||
|
if(cf->connected) { /* we and all below are done */
|
||||||
|
*done = TRUE;
|
||||||
|
return CURLE_OK;
|
||||||
|
}
|
||||||
|
/* Let the filters below connect */
|
||||||
|
result = cf->next->cft->connect(cf->next, data, blocking, done);
|
||||||
|
if(result || !*done)
|
||||||
|
return result; /* below errored/not finished yet */
|
||||||
|
|
||||||
|
/* MYFILTER CONNECT THINGS */ /* below connected, do out thing */
|
||||||
|
*done = cf->connected = TRUE; /* done, remember, return */
|
||||||
|
return CURLE_OK;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Closing a connection then works similar. The `conn` tells the first filter to close. Contrary to connecting,
|
||||||
|
the filter does its own things first, before telling the next filter to close.
|
||||||
|
|
||||||
|
### Efficiency
|
||||||
|
|
||||||
|
There are two things curl is concerned about: efficient memory use and fast transfers.
|
||||||
|
|
||||||
|
The memory footprint of a filter is relatively small:
|
||||||
|
|
||||||
|
```
|
||||||
|
struct Curl_cfilter {
|
||||||
|
const struct Curl_cftype *cft; /* the type providing implementation */
|
||||||
|
struct Curl_cfilter *next; /* next filter in chain */
|
||||||
|
void *ctx; /* filter type specific settings */
|
||||||
|
struct connectdata *conn; /* the connection this filter belongs to */
|
||||||
|
int sockindex; /* TODO: like to get rid off this */
|
||||||
|
BIT(connected); /* != 0 iff this filter is connected */
|
||||||
|
};
|
||||||
|
```
|
||||||
|
The filter type `cft` is a singleton, one static struct for each type of filter. The `ctx` is where a filter will hold its specific data. That varies by filter type. An http-proxy filter will keep the ongoing state of the CONNECT here, but free it after its has been established. The SSL filter will keep the `SSL*` (if OpenSSL is used) here until the connection is closed. So, this varies.
|
||||||
|
|
||||||
|
`conn` is a reference to the connection this filter belongs to, so nothing extra besides the pointer itself.
|
||||||
|
|
||||||
|
Several things, that before were kept in `struct connectdata`, will now go into the `filter->ctx` *when needed*. So, the memory footprint for connections that do *not* use an http proxy, or socks, or https will be lower.
|
||||||
|
|
||||||
|
As to transfer efficiency, writing and reading through a filter comes at near zero cost *if the filter does not transform the data*. An http proxy or socks filter, once it is connected, will just pass the calls through. Those filters implementations will look like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
ssize_t Curl_cf_def_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||||
|
const void *buf, size_t len, CURLcode *err)
|
||||||
|
{
|
||||||
|
return cf->next->cft->do_send(cf->next, data, buf, len, err);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
The `recv` implementation is equivalent.
|
||||||
|
|
||||||
|
## Filter Types
|
||||||
|
|
||||||
|
The (currently) existing filter types are: SOCKET, SOCKET-ACCEPT, SSL, HTTP-PROXY and SOCKS-PROXY. Vital to establishing and read/writing a connection. But filters are also a good way to implement tasks for *managing* a connection:
|
||||||
|
|
||||||
|
* **Statistics**: a filter that counts the number of bytes sent/received. Place one in front of SOCKET and one higher up and get the number of raw and "easy" bytes transferred. They may track the speed as well, or number of partial writes, etc.
|
||||||
|
* **Timeout**: enforce timeouts, e.g. fail if a connection cannot be established in a certain amount of time.
|
||||||
|
* **Progress**: report progress on a connection.
|
||||||
|
* **Pacing**: limit read/write rates.
|
||||||
|
* **Testing**: simulate network condition or failures.
|
||||||
|
|
||||||
|
As you see, filters are a good way to add functionality to curl's internal handling of transfers without impact on other code.
|
||||||
|
|
||||||
|
## Easy Filters?
|
||||||
|
|
||||||
|
Some things that curl needs to manage are not directly tied to a specific connection but the property of the `Curl_easy` handle, e.g. a particular transfer. When using HTTP/2 or HTTP/3, many transfers can use the same connection. If one wants to monitor of the transfer itself or restricting its speed alone, a connection filter is not the right place to do this.
|
||||||
|
|
||||||
|
So we might add "easy filters" one day. Who knows?
|
@ -0,0 +1,319 @@
|
|||||||
|
# Contributing to the curl project
|
||||||
|
|
||||||
|
This document is intended to offer guidelines on how to best contribute to the
|
||||||
|
curl project. This concerns new features as well as corrections to existing
|
||||||
|
flaws or bugs.
|
||||||
|
|
||||||
|
## Join the Community
|
||||||
|
|
||||||
|
Skip over to [https://curl.se/mail/](https://curl.se/mail/) and join
|
||||||
|
the appropriate mailing list(s). Read up on details before you post
|
||||||
|
questions. Read this file before you start sending patches. We prefer
|
||||||
|
questions sent to and discussions being held on the mailing list(s), not sent
|
||||||
|
to individuals.
|
||||||
|
|
||||||
|
Before posting to one of the curl mailing lists, please read up on the
|
||||||
|
[mailing list etiquette](https://curl.se/mail/etiquette.html).
|
||||||
|
|
||||||
|
We also hang out on IRC in #curl on libera.chat
|
||||||
|
|
||||||
|
If you are at all interested in the code side of things, consider clicking
|
||||||
|
'watch' on the [curl repo on GitHub](https://github.com/curl/curl) to be
|
||||||
|
notified of pull requests and new issues posted there.
|
||||||
|
|
||||||
|
## License and copyright
|
||||||
|
|
||||||
|
When contributing with code, you agree to put your changes and new code under
|
||||||
|
the same license curl and libcurl is already using unless stated and agreed
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
If you add a larger piece of code, you can opt to make that file or set of
|
||||||
|
files to use a different license as long as they do not enforce any changes to
|
||||||
|
the rest of the package and they make sense. Such "separate parts" can not be
|
||||||
|
GPL licensed (as we do not want copyleft to affect users of libcurl) but they
|
||||||
|
must use "GPL compatible" licenses (as we want to allow users to use libcurl
|
||||||
|
properly in GPL licensed environments).
|
||||||
|
|
||||||
|
When changing existing source code, you do not alter the copyright of the
|
||||||
|
original file(s). The copyright will still be owned by the original creator(s)
|
||||||
|
or those who have been assigned copyright by the original author(s).
|
||||||
|
|
||||||
|
By submitting a patch to the curl project, you are assumed to have the right
|
||||||
|
to the code and to be allowed by your employer or whatever to hand over that
|
||||||
|
patch/code to us. We will credit you for your changes as far as possible, to
|
||||||
|
give credit but also to keep a trace back to who made what changes. Please
|
||||||
|
always provide us with your full real name when contributing,
|
||||||
|
|
||||||
|
## What To Read
|
||||||
|
|
||||||
|
Source code, the man pages, the [INTERNALS
|
||||||
|
document](https://curl.se/dev/internals.html),
|
||||||
|
[TODO](https://curl.se/docs/todo.html),
|
||||||
|
[KNOWN_BUGS](https://curl.se/docs/knownbugs.html) and the [most recent
|
||||||
|
changes](https://curl.se/dev/sourceactivity.html) in git. Just lurking on
|
||||||
|
the [curl-library mailing
|
||||||
|
list](https://curl.se/mail/list.cgi?list=curl-library) will give you a
|
||||||
|
lot of insights on what's going on right now. Asking there is a good idea too.
|
||||||
|
|
||||||
|
## Write a good patch
|
||||||
|
|
||||||
|
### Follow code style
|
||||||
|
|
||||||
|
When writing C code, follow the
|
||||||
|
[CODE_STYLE](https://curl.se/dev/code-style.html) already established in
|
||||||
|
the project. Consistent style makes code easier to read and mistakes less
|
||||||
|
likely to happen. Run `make checksrc` before you submit anything, to make sure
|
||||||
|
you follow the basic style. That script does not verify everything, but if it
|
||||||
|
complains you know you have work to do.
|
||||||
|
|
||||||
|
### Non-clobbering All Over
|
||||||
|
|
||||||
|
When you write new functionality or fix bugs, it is important that you do not
|
||||||
|
fiddle all over the source files and functions. Remember that it is likely
|
||||||
|
that other people have done changes in the same source files as you have and
|
||||||
|
possibly even in the same functions. If you bring completely new
|
||||||
|
functionality, try writing it in a new source file. If you fix bugs, try to
|
||||||
|
fix one bug at a time and send them as separate patches.
|
||||||
|
|
||||||
|
### Write Separate Changes
|
||||||
|
|
||||||
|
It is annoying when you get a huge patch from someone that is said to fix 511
|
||||||
|
odd problems, but discussions and opinions do not agree with 510 of them - or
|
||||||
|
509 of them were already fixed in a different way. Then the person merging
|
||||||
|
this change needs to extract the single interesting patch from somewhere
|
||||||
|
within the huge pile of source, and that creates a lot of extra work.
|
||||||
|
|
||||||
|
Preferably, each fix that corrects a problem should be in its own patch/commit
|
||||||
|
with its own description/commit message stating exactly what they correct so
|
||||||
|
that all changes can be selectively applied by the maintainer or other
|
||||||
|
interested parties.
|
||||||
|
|
||||||
|
Also, separate changes enable bisecting much better for tracking problems
|
||||||
|
and regression in the future.
|
||||||
|
|
||||||
|
### Patch Against Recent Sources
|
||||||
|
|
||||||
|
Please try to get the latest available sources to make your patches against.
|
||||||
|
It makes the lives of the developers so much easier. The best is if you get
|
||||||
|
the most up-to-date sources from the git repository, but the latest release
|
||||||
|
archive is quite OK as well.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
Writing docs is dead boring and one of the big problems with many open source
|
||||||
|
projects. But someone's gotta do it. It makes things a lot easier if you
|
||||||
|
submit a small description of your fix or your new features with every
|
||||||
|
contribution so that it can be swiftly added to the package documentation.
|
||||||
|
|
||||||
|
The documentation is always made in man pages (nroff formatted) or plain
|
||||||
|
ASCII files. All HTML files on the website and in the release archives are
|
||||||
|
generated from the nroff/ASCII versions.
|
||||||
|
|
||||||
|
### Test Cases
|
||||||
|
|
||||||
|
Since the introduction of the test suite, we can quickly verify that the main
|
||||||
|
features are working as they are supposed to. To maintain this situation and
|
||||||
|
improve it, all new features and functions that are added need to be tested
|
||||||
|
in the test suite. Every feature that is added should get at least one valid
|
||||||
|
test case that verifies that it works as documented. If every submitter also
|
||||||
|
posts a few test cases, it will not end up as a heavy burden on a single person!
|
||||||
|
|
||||||
|
If you do not have test cases or perhaps you have done something that is hard
|
||||||
|
to write tests for, do explain exactly how you have otherwise tested and
|
||||||
|
verified your changes.
|
||||||
|
|
||||||
|
## Submit Your Changes
|
||||||
|
|
||||||
|
### How to get your changes into the main sources
|
||||||
|
|
||||||
|
Ideally you file a [pull request on
|
||||||
|
GitHub](https://github.com/curl/curl/pulls), but you can also send your plain
|
||||||
|
patch to [the curl-library mailing
|
||||||
|
list](https://curl.se/mail/list.cgi?list=curl-library).
|
||||||
|
|
||||||
|
If you opt to post a patch on the mailing list, chances are someone will
|
||||||
|
convert it into a pull request for you, to have the CI jobs verify it proper
|
||||||
|
before it can be merged. Be prepared that some feedback on the proposed change
|
||||||
|
might then come on GitHub.
|
||||||
|
|
||||||
|
Your change will be reviewed and discussed and you will be expected to correct
|
||||||
|
flaws pointed out and update accordingly, or the change risks stalling and
|
||||||
|
eventually just getting deleted without action. As a submitter of a change,
|
||||||
|
you are the owner of that change until it has been merged.
|
||||||
|
|
||||||
|
Respond on the list or on GitHub about the change and answer questions and/or
|
||||||
|
fix nits/flaws. This is important. We will take lack of replies as a sign that
|
||||||
|
you are not anxious to get your patch accepted and we tend to simply drop such
|
||||||
|
changes.
|
||||||
|
|
||||||
|
### About pull requests
|
||||||
|
|
||||||
|
With GitHub it is easy to send a [pull
|
||||||
|
request](https://github.com/curl/curl/pulls) to the curl project to have
|
||||||
|
changes merged.
|
||||||
|
|
||||||
|
We strongly prefer pull requests to mailed patches, as it makes it a proper
|
||||||
|
git commit that is easy to merge and they are easy to track and not that easy
|
||||||
|
to lose in the flood of many emails, like they sometimes do on the mailing
|
||||||
|
lists.
|
||||||
|
|
||||||
|
Every pull request submitted will automatically be tested in several different
|
||||||
|
ways. [See the CI document for more
|
||||||
|
information](https://github.com/curl/curl/blob/master/tests/CI.md).
|
||||||
|
|
||||||
|
Sometimes the tests fail due to a dependency service temporarily being offline
|
||||||
|
or otherwise unavailable, e.g. package downloads. In this case you can just
|
||||||
|
try to update your pull requests to rerun the tests later as described below.
|
||||||
|
|
||||||
|
You can update your pull requests by pushing new commits or force-pushing
|
||||||
|
changes to existing commits. Force-pushing an amended commit without any
|
||||||
|
actual content changed also allows you to retrigger the tests for that commit.
|
||||||
|
|
||||||
|
When you adjust your pull requests after review, consider squashing the
|
||||||
|
commits so that we can review the full updated version more easily.
|
||||||
|
|
||||||
|
A pull request sent to the project might get labeled `needs-votes` by a
|
||||||
|
project maintainer. This label means that in addition to meeting all other
|
||||||
|
checks and qualifications this pull request must also receive more "votes" of
|
||||||
|
user support. More signs that people want this to happen. It could be in the
|
||||||
|
form of messages saying so, or thumbs-up reactions on GitHub.
|
||||||
|
|
||||||
|
### Making quality changes
|
||||||
|
|
||||||
|
Make the patch against as recent source versions as possible.
|
||||||
|
|
||||||
|
If you have followed the tips in this document and your patch still has not
|
||||||
|
been incorporated or responded to after some weeks, consider resubmitting it
|
||||||
|
to the list or better yet: change it to a pull request.
|
||||||
|
|
||||||
|
### Commit messages
|
||||||
|
|
||||||
|
A short guide to how to write git commit messages in the curl project.
|
||||||
|
|
||||||
|
---- start ----
|
||||||
|
[area]: [short line describing the main effect]
|
||||||
|
-- empty line --
|
||||||
|
[full description, no wider than 72 columns that describes as much as
|
||||||
|
possible as to why this change is made, and possibly what things
|
||||||
|
it fixes and everything else that is related, with unwieldy URLs replaced
|
||||||
|
with references like [0], [1], etc.]
|
||||||
|
-- empty line --
|
||||||
|
[[0] URL - Reference to a URL in the description, almost like Markdown;
|
||||||
|
the last numbered reference is followed by an -- empty line -- ]
|
||||||
|
[Follow-up to {shorthash} - if this fixes or continues a previous commit;
|
||||||
|
add a Ref: that commit's PR or issue if it's not a small, obvious fix;
|
||||||
|
followed by an -- empty line -- ]
|
||||||
|
[Bug: URL to the source of the report or more related discussion; use Fixes
|
||||||
|
for GitHub issues instead when that is appropriate]
|
||||||
|
[Approved-by: John Doe - credit someone who approved the PR; if you are
|
||||||
|
committing this for someone else using --author=... you don't need this
|
||||||
|
as you are implicitly approving it by committing]
|
||||||
|
[Authored-by: John Doe - credit the original author of the code; only use
|
||||||
|
this if you can't use "git commit --author=..."]
|
||||||
|
{Signed-off-by: John Doe - we don't use this, but don't bother removing it]
|
||||||
|
[whatever-else-by: credit all helpers, finders, doers; try to use one of
|
||||||
|
the following keywords if at all possible, for consistency:
|
||||||
|
Acked-by:, Assisted-by:, Co-authored-by:, Found-by:, Reported-by:,
|
||||||
|
Reviewed-by:, Suggested-by:, Tested-by:]
|
||||||
|
[Ref: #1234 - if this is related to a GitHub issue or PR, possibly one that
|
||||||
|
has already been closed]
|
||||||
|
[Ref: URL to more information about the commit; use Bug: instead for
|
||||||
|
a reference to a bug on another bug tracker]
|
||||||
|
[Fixes #1234 - if this closes a GitHub issue; GitHub will actually
|
||||||
|
close the issue once this commit is merged]
|
||||||
|
[Closes #1234 - if this closes a GitHub PR; GitHub will actually
|
||||||
|
close the PR once this commit is merged]
|
||||||
|
---- stop ----
|
||||||
|
|
||||||
|
The first line is a succinct description of the change:
|
||||||
|
|
||||||
|
- use the imperative, present tense: "change" not "changed" nor "changes"
|
||||||
|
- do not capitalize the first letter
|
||||||
|
- no period (.) at the end
|
||||||
|
|
||||||
|
The `[area]` in the first line can be `http2`, `cookies`, `openssl` or
|
||||||
|
similar. There's no fixed list to select from but using the same "area" as
|
||||||
|
other related changes could make sense.
|
||||||
|
|
||||||
|
Do not forget to use commit --author=... if you commit someone else's work, and
|
||||||
|
make sure that you have your own user and email setup correctly in git before
|
||||||
|
you commit.
|
||||||
|
|
||||||
|
Add whichever header lines as appropriate, with one line per person if more
|
||||||
|
than one person was involved. There's no need to credit yourself unless you are
|
||||||
|
using --author=... which hides your identity. Don't include people's e-mail
|
||||||
|
addresses in headers to avoid spam, unless they're already public from a
|
||||||
|
previous commit; saying `{userid} on github` is OK.
|
||||||
|
|
||||||
|
### Write Access to git Repository
|
||||||
|
|
||||||
|
If you are a frequent contributor, you may be given push access to the git
|
||||||
|
repository and then you will be able to push your changes straight into the git
|
||||||
|
repo instead of sending changes as pull requests or by mail as patches.
|
||||||
|
|
||||||
|
Just ask if this is what you would want. You will be required to have posted
|
||||||
|
several high quality patches first, before you can be granted push access.
|
||||||
|
|
||||||
|
### How To Make a Patch with git
|
||||||
|
|
||||||
|
You need to first checkout the repository:
|
||||||
|
|
||||||
|
git clone https://github.com/curl/curl.git
|
||||||
|
|
||||||
|
You then proceed and edit all the files you like and you commit them to your
|
||||||
|
local repository:
|
||||||
|
|
||||||
|
git commit [file]
|
||||||
|
|
||||||
|
As usual, group your commits so that you commit all changes at once that
|
||||||
|
constitute a logical change.
|
||||||
|
|
||||||
|
Once you have done all your commits and you are happy with what you see, you
|
||||||
|
can make patches out of your changes that are suitable for mailing:
|
||||||
|
|
||||||
|
git format-patch remotes/origin/master
|
||||||
|
|
||||||
|
This creates files in your local directory named `NNNN-[name].patch` for each
|
||||||
|
commit.
|
||||||
|
|
||||||
|
Now send those patches off to the curl-library list. You can of course opt to
|
||||||
|
do that with the 'git send-email' command.
|
||||||
|
|
||||||
|
### How To Make a Patch without git
|
||||||
|
|
||||||
|
Keep a copy of the unmodified curl sources. Make your changes in a separate
|
||||||
|
source tree. When you think you have something that you want to offer the
|
||||||
|
curl community, use GNU diff to generate patches.
|
||||||
|
|
||||||
|
If you have modified a single file, try something like:
|
||||||
|
|
||||||
|
diff -u unmodified-file.c my-changed-one.c > my-fixes.diff
|
||||||
|
|
||||||
|
If you have modified several files, possibly in different directories, you
|
||||||
|
can use diff recursively:
|
||||||
|
|
||||||
|
diff -ur curl-original-dir curl-modified-sources-dir > my-fixes.diff
|
||||||
|
|
||||||
|
The GNU diff and GNU patch tools exist for virtually all platforms, including
|
||||||
|
all kinds of Unixes and Windows.
|
||||||
|
|
||||||
|
### Useful resources
|
||||||
|
- [Webinar on getting code into cURL](https://www.youtube.com/watch?v=QmZ3W1d6LQI)
|
||||||
|
|
||||||
|
## Update copyright and license information
|
||||||
|
|
||||||
|
There is a CI job called **REUSE compliance / check** that will run on every
|
||||||
|
pull request and commit to verify that the *REUSE state* of all files are
|
||||||
|
still fine.
|
||||||
|
|
||||||
|
This means that all files need to have their license and copyright information
|
||||||
|
clearly stated. Ideally by having the standard curl source code header, with
|
||||||
|
an accurate copyright year range and the SPDX-License-Identifier included. If
|
||||||
|
the header does not work, you can use a smaller header or add the information
|
||||||
|
for a specific file to the `.reuse/dep5` file.
|
||||||
|
|
||||||
|
We update copyright year ranges to end on the year of the most recent change
|
||||||
|
of the individual file.
|
||||||
|
|
||||||
|
You can manually verify the copyright and compliance status by running the
|
||||||
|
`./scripts/copyright.pl` script in the root of the git repository.
|
@ -0,0 +1,140 @@
|
|||||||
|
# Code defines to disable features and protocols
|
||||||
|
|
||||||
|
## `CURL_DISABLE_ALTSVC`
|
||||||
|
|
||||||
|
Disable support for Alt-Svc: HTTP headers.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_COOKIES`
|
||||||
|
|
||||||
|
Disable support for HTTP cookies.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_CRYPTO_AUTH`
|
||||||
|
|
||||||
|
Disable support for authentication methods using crypto.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_DICT`
|
||||||
|
|
||||||
|
Disable the DICT protocol
|
||||||
|
|
||||||
|
## `CURL_DISABLE_DOH`
|
||||||
|
|
||||||
|
Disable DNS-over-HTTPS
|
||||||
|
|
||||||
|
## `CURL_DISABLE_FILE`
|
||||||
|
|
||||||
|
Disable the FILE protocol
|
||||||
|
|
||||||
|
## `CURL_DISABLE_FTP`
|
||||||
|
|
||||||
|
Disable the FTP (and FTPS) protocol
|
||||||
|
|
||||||
|
## `CURL_DISABLE_GETOPTIONS`
|
||||||
|
|
||||||
|
Disable the `curl_easy_options` API calls that lets users get information
|
||||||
|
about existing options to `curl_easy_setopt`.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_GOPHER`
|
||||||
|
|
||||||
|
Disable the GOPHER protocol.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_HEADERS_API`
|
||||||
|
|
||||||
|
Disable the HTTP header API.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_HSTS`
|
||||||
|
|
||||||
|
Disable the HTTP Strict Transport Security support.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_HTTP`
|
||||||
|
|
||||||
|
Disable the HTTP(S) protocols. Note that this then also disable HTTP proxy
|
||||||
|
support.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_HTTP_AUTH`
|
||||||
|
|
||||||
|
Disable support for all HTTP authentication methods.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_IMAP`
|
||||||
|
|
||||||
|
Disable the IMAP(S) protocols.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_LDAP`
|
||||||
|
|
||||||
|
Disable the LDAP(S) protocols.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_LDAPS`
|
||||||
|
|
||||||
|
Disable the LDAPS protocol.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_LIBCURL_OPTION`
|
||||||
|
|
||||||
|
Disable the --libcurl option from the curl tool.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_MIME`
|
||||||
|
|
||||||
|
Disable MIME support.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_MQTT`
|
||||||
|
|
||||||
|
Disable MQTT support.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_NETRC`
|
||||||
|
|
||||||
|
Disable the netrc parser.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_NTLM`
|
||||||
|
|
||||||
|
Disable support for NTLM.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG`
|
||||||
|
|
||||||
|
Disable the auto load config support in the OpenSSL backend.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_PARSEDATE`
|
||||||
|
|
||||||
|
Disable date parsing
|
||||||
|
|
||||||
|
## `CURL_DISABLE_POP3`
|
||||||
|
|
||||||
|
Disable the POP3 protocol
|
||||||
|
|
||||||
|
## `CURL_DISABLE_PROGRESS_METER`
|
||||||
|
|
||||||
|
Disable the built-in progress meter
|
||||||
|
|
||||||
|
## `CURL_DISABLE_PROXY`
|
||||||
|
|
||||||
|
Disable support for proxies
|
||||||
|
|
||||||
|
## `CURL_DISABLE_RTSP`
|
||||||
|
|
||||||
|
Disable the RTSP protocol.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_SHUFFLE_DNS`
|
||||||
|
|
||||||
|
Disable the shuffle DNS feature
|
||||||
|
|
||||||
|
## `CURL_DISABLE_SMB`
|
||||||
|
|
||||||
|
Disable the SMB(S) protocols
|
||||||
|
|
||||||
|
## `CURL_DISABLE_SMTP`
|
||||||
|
|
||||||
|
Disable the SMTP(S) protocols
|
||||||
|
|
||||||
|
## `CURL_DISABLE_SOCKETPAIR`
|
||||||
|
|
||||||
|
Disable the use of `socketpair()` internally to allow waking up and canceling
|
||||||
|
`curl_multi_poll()`.
|
||||||
|
|
||||||
|
## `CURL_DISABLE_TELNET`
|
||||||
|
|
||||||
|
Disable the TELNET protocol
|
||||||
|
|
||||||
|
## `CURL_DISABLE_TFTP`
|
||||||
|
|
||||||
|
Disable the TFTP protocol
|
||||||
|
|
||||||
|
## `CURL_DISABLE_VERBOSE_STRINGS`
|
||||||
|
|
||||||
|
Disable verbose strings and error messages.
|
@ -0,0 +1,71 @@
|
|||||||
|
# Items to be removed from future curl releases
|
||||||
|
|
||||||
|
If any of these deprecated features is a cause for concern for you, please
|
||||||
|
email the
|
||||||
|
[curl-library mailing list](https://lists.haxx.se/listinfo/curl-library)
|
||||||
|
as soon as possible and explain to us why this is a problem for you and
|
||||||
|
how your use case cannot be satisfied properly using a workaround.
|
||||||
|
|
||||||
|
## NSS
|
||||||
|
|
||||||
|
We remove support for building curl with the NSS TLS library in August 2023.
|
||||||
|
|
||||||
|
- There are few users left who use curl+NSS
|
||||||
|
- NSS has few users outside of curl as well (primarily Firefox)
|
||||||
|
- NSS is harder than ever to find documentation for
|
||||||
|
- NSS was always "best" used with Red Hat Linux when they provided additional
|
||||||
|
features on top of the regular NSS that is not shipped by the vanilla library
|
||||||
|
|
||||||
|
Starting in 7.82.0, building curl to use NSS configure requires the additional
|
||||||
|
flag `--with-nss-deprecated` in an attempt to highlight these plans.
|
||||||
|
|
||||||
|
## gskit
|
||||||
|
|
||||||
|
We remove support for building curl with the gskit TLS library in August 2023.
|
||||||
|
|
||||||
|
- This is a niche TLS library, only running on some IBM systems
|
||||||
|
- no regular curl contributors use this backend
|
||||||
|
- no CI builds use or verify this backend
|
||||||
|
- gskit, or the curl adaption for it, lacks many modern TLS features making it
|
||||||
|
an inferior solution
|
||||||
|
- build breakages in this code take weeks or more to get detected
|
||||||
|
- fixing gskit code is mostly done "flying blind"
|
||||||
|
|
||||||
|
## mingw v1
|
||||||
|
|
||||||
|
We remove support for building curl with the original legacy mingw version 1
|
||||||
|
in September 2023.
|
||||||
|
|
||||||
|
During the deprecation period you can enable the support with the configure
|
||||||
|
option `--with-mingw1-deprecated`.
|
||||||
|
|
||||||
|
mingw version 1 is old and deprecated software. There are much better and
|
||||||
|
still support build environments to use to build curl and other software. For
|
||||||
|
example [MinGW-w64](https://www.mingw-w64.org/).
|
||||||
|
|
||||||
|
## space-separated `NOPROXY` patterns
|
||||||
|
|
||||||
|
When specifying patterns/domain names for curl that should *not* go through a
|
||||||
|
proxy, the curl tool features the `--noproxy` command line option and the
|
||||||
|
library supports the `NO_PROXY` environment variable and the `CURLOPT_NOPROXY`
|
||||||
|
libcurl option.
|
||||||
|
|
||||||
|
They all set the same list of patterns. This list is documented to be a set of
|
||||||
|
**comma-separated** names, but can also be provided separated with just
|
||||||
|
space. The ability to just use spaces for this has never been documented but
|
||||||
|
some users may still have come to rely on this.
|
||||||
|
|
||||||
|
Several other tools and utilities also parse the `NO_PROXY` environment
|
||||||
|
variable but do not consider a space to be a valid separator. Using spaces for
|
||||||
|
separator is probably less portable and might cause more friction than commas
|
||||||
|
do. Users should use commas for this for greater portability.
|
||||||
|
|
||||||
|
curl will remove the support for space-separated names in July 2024.
|
||||||
|
|
||||||
|
## past removals
|
||||||
|
|
||||||
|
- Pipelining
|
||||||
|
- axTLS
|
||||||
|
- PolarSSL
|
||||||
|
- NPN
|
||||||
|
- Support for systems without 64 bit data types
|
@ -0,0 +1,128 @@
|
|||||||
|
# dynbuf
|
||||||
|
|
||||||
|
This is the internal module for creating and handling "dynamic buffers". This
|
||||||
|
means buffers that can be appended to, dynamically and grow to adapt.
|
||||||
|
|
||||||
|
There will always be a terminating zero put at the end of the dynamic buffer.
|
||||||
|
|
||||||
|
The `struct dynbuf` is used to hold data for each instance of a dynamic
|
||||||
|
buffer. The members of that struct **MUST NOT** be accessed or modified
|
||||||
|
without using the dedicated dynbuf API.
|
||||||
|
|
||||||
|
## `Curl_dyn_init`
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_dyn_init(struct dynbuf *s, size_t toobig);
|
||||||
|
```
|
||||||
|
|
||||||
|
This initializes a struct to use for dynbuf and it cannot fail. The `toobig`
|
||||||
|
value **must** be set to the maximum size we allow this buffer instance to
|
||||||
|
grow to. The functions below will return `CURLE_OUT_OF_MEMORY` when hitting
|
||||||
|
this limit.
|
||||||
|
|
||||||
|
## `Curl_dyn_free`
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_dyn_free(struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Free the associated memory and clean up. After a free, the `dynbuf` struct can
|
||||||
|
be re-used to start appending new data to.
|
||||||
|
|
||||||
|
## `Curl_dyn_addn`
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_addn(struct dynbuf *s, const void *mem, size_t len);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append arbitrary data of a given length to the end of the buffer.
|
||||||
|
|
||||||
|
If this function fails it calls `Curl_dyn_free` on `dynbuf`.
|
||||||
|
|
||||||
|
## `Curl_dyn_add`
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_add(struct dynbuf *s, const char *str);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append a C string to the end of the buffer.
|
||||||
|
|
||||||
|
If this function fails it calls `Curl_dyn_free` on `dynbuf`.
|
||||||
|
|
||||||
|
## `Curl_dyn_addf`
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_addf(struct dynbuf *s, const char *fmt, ...);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append a `printf()`-style string to the end of the buffer.
|
||||||
|
|
||||||
|
If this function fails it calls `Curl_dyn_free` on `dynbuf`.
|
||||||
|
|
||||||
|
## `Curl_dyn_vaddf`
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append a `vprintf()`-style string to the end of the buffer.
|
||||||
|
|
||||||
|
If this function fails it calls `Curl_dyn_free` on `dynbuf`.
|
||||||
|
|
||||||
|
## `Curl_dyn_reset`
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_dyn_reset(struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Reset the buffer length, but leave the allocation.
|
||||||
|
|
||||||
|
## `Curl_dyn_tail`
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_tail(struct dynbuf *s, size_t length);
|
||||||
|
```
|
||||||
|
|
||||||
|
Keep `length` bytes of the buffer tail (the last `length` bytes of the
|
||||||
|
buffer). The rest of the buffer is dropped. The specified `length` must not be
|
||||||
|
larger than the buffer length. To instead keep the leading part, see
|
||||||
|
`Curl_dyn_setlen()`.
|
||||||
|
|
||||||
|
## `Curl_dyn_ptr`
|
||||||
|
|
||||||
|
```c
|
||||||
|
char *Curl_dyn_ptr(const struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns a `char *` to the buffer if it has a length, otherwise may return
|
||||||
|
NULL. Since the buffer may be reallocated, this pointer should not be trusted
|
||||||
|
or used anymore after the next buffer manipulation call.
|
||||||
|
|
||||||
|
## `Curl_dyn_uptr`
|
||||||
|
|
||||||
|
```c
|
||||||
|
unsigned char *Curl_dyn_uptr(const struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns an `unsigned char *` to the buffer if it has a length, otherwise may
|
||||||
|
return NULL. Since the buffer may be reallocated, this pointer should not be
|
||||||
|
trusted or used anymore after the next buffer manipulation call.
|
||||||
|
|
||||||
|
## `Curl_dyn_len`
|
||||||
|
|
||||||
|
```c
|
||||||
|
size_t Curl_dyn_len(const struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns the length of the buffer in bytes. Does not include the terminating
|
||||||
|
zero byte.
|
||||||
|
|
||||||
|
## `Curl_dyn_setlen`
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_setlen(struct dynbuf *s, size_t len);
|
||||||
|
```
|
||||||
|
|
||||||
|
Sets the new shorter length of the buffer in number of bytes. Keeps the
|
||||||
|
leftmost set number of bytes, discards the rest. To instead keep the tail part
|
||||||
|
of the buffer, see `Curl_dyn_tail()`.
|
@ -0,0 +1,67 @@
|
|||||||
|
# How to determine if an early patch release is warranted
|
||||||
|
|
||||||
|
In the curl project we do releases every 8 weeks. Unless we break the cycle
|
||||||
|
and do an early patch release.
|
||||||
|
|
||||||
|
We do frequent releases partly to always have the next release "not too far
|
||||||
|
away".
|
||||||
|
|
||||||
|
## Bugfix
|
||||||
|
|
||||||
|
During the release cycle, and especially in the beginning of a new cycle (the
|
||||||
|
so-called "cool down" period), there are times when a bug is reported and
|
||||||
|
after it has been subsequently fixed correctly, the question might be asked:
|
||||||
|
is this bug and associated fix important enough for an early patch release?
|
||||||
|
|
||||||
|
The question can only be properly asked when a fix has been created and landed
|
||||||
|
in the git master branch.
|
||||||
|
|
||||||
|
## Early release
|
||||||
|
|
||||||
|
An early patch release means that we ship a new, complete and full release
|
||||||
|
called `major.minor.patch` where the `patch` part is increased by one since
|
||||||
|
the previous release. A curl release is a curl release. There is no small or
|
||||||
|
big and we never release just a patch. There is only "release".
|
||||||
|
|
||||||
|
## Questions to ask
|
||||||
|
|
||||||
|
- Is there a security advisory rated high or critical?
|
||||||
|
- Is there a data corruption bug?
|
||||||
|
- Did the bug cause an API/ABI breakage?
|
||||||
|
- Will the problem annoy a significant share of the user population?
|
||||||
|
|
||||||
|
If the answer is yes to one or more of the above, an early release might be
|
||||||
|
warranted.
|
||||||
|
|
||||||
|
More questions to ask ourselves when doing the assessment if the answers to
|
||||||
|
the three ones above are all 'no'.
|
||||||
|
|
||||||
|
- Does the bug cause curl to prematurely terminate?
|
||||||
|
- How common is the affected buggy option/feature/protocol/platform to get
|
||||||
|
used?
|
||||||
|
- How large is the estimated impacted user base?
|
||||||
|
- Does the bug block something crucial for applications or other adoption of
|
||||||
|
curl "out there" ?
|
||||||
|
- Does the bug cause problems for curl developers or others on "the curl
|
||||||
|
team" ?
|
||||||
|
- Is the bug limited to the curl tool only? That might have a smaller impact
|
||||||
|
than a bug also present in libcurl.
|
||||||
|
- Is there a (decent) workaround?
|
||||||
|
- Is it a regression? Is the bug introduced in this release?
|
||||||
|
- Can the bug be fixed "easily" by applying a patch?
|
||||||
|
- Does the bug break the build? Most users don't build curl themselves.
|
||||||
|
- How long is it until the already scheduled next release?
|
||||||
|
- Can affected users safely rather revert to a former release until the next
|
||||||
|
scheduled release?
|
||||||
|
- Is it a performance regression with no functionality side-effects? If so it
|
||||||
|
has to be substantial.
|
||||||
|
|
||||||
|
## If an early release is deemed necessary
|
||||||
|
|
||||||
|
Unless done for security or similarly important reasons, an early release
|
||||||
|
should not be done within a week of the previous release.
|
||||||
|
|
||||||
|
This, to enable us to collect and bundle more fixes into the same release to
|
||||||
|
make the release more worthwhile for everyone and to allow more time for fixes
|
||||||
|
to settle and things to get tested. Getting a release in shape and done in
|
||||||
|
style is work that should not be rushed.
|
@ -0,0 +1,24 @@
|
|||||||
|
# Experimental
|
||||||
|
|
||||||
|
Some features and functionality in curl and libcurl are considered
|
||||||
|
**EXPERIMENTAL**.
|
||||||
|
|
||||||
|
Experimental support in curl means:
|
||||||
|
|
||||||
|
1. Experimental features are provided to allow users to try them out and
|
||||||
|
provide feedback on functionality and API etc before they ship and get
|
||||||
|
"carved in stone".
|
||||||
|
2. You must enable the feature when invoking configure as otherwise curl will
|
||||||
|
not be built with the feature present.
|
||||||
|
3. We strongly advise against using this feature in production.
|
||||||
|
4. **We reserve the right to change behavior** of the feature without sticking
|
||||||
|
to our API/ABI rules as we do for regular features, as long as it is marked
|
||||||
|
experimental.
|
||||||
|
5. Experimental features are clearly marked so in documentation. Beware.
|
||||||
|
|
||||||
|
## Experimental features right now
|
||||||
|
|
||||||
|
- The Hyper HTTP backend
|
||||||
|
- HTTP/3 support and options
|
||||||
|
- The rustls backend
|
||||||
|
- WebSocket
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,219 @@
|
|||||||
|
# Features -- what curl can do
|
||||||
|
|
||||||
|
## curl tool
|
||||||
|
|
||||||
|
- config file support
|
||||||
|
- multiple URLs in a single command line
|
||||||
|
- range "globbing" support: [0-13], {one,two,three}
|
||||||
|
- multiple file upload on a single command line
|
||||||
|
- custom maximum transfer rate
|
||||||
|
- redirect stderr
|
||||||
|
- parallel transfers
|
||||||
|
|
||||||
|
## libcurl
|
||||||
|
|
||||||
|
- full URL syntax with no length limit
|
||||||
|
- custom maximum download time
|
||||||
|
- custom least download speed acceptable
|
||||||
|
- custom output result after completion
|
||||||
|
- guesses protocol from host name unless specified
|
||||||
|
- uses .netrc
|
||||||
|
- progress bar with time statistics while downloading
|
||||||
|
- "standard" proxy environment variables support
|
||||||
|
- compiles on win32 (reported builds on 70+ operating systems)
|
||||||
|
- selectable network interface for outgoing traffic
|
||||||
|
- IPv6 support on Unix and Windows
|
||||||
|
- happy eyeballs dual-stack connects
|
||||||
|
- persistent connections
|
||||||
|
- SOCKS 4 + 5 support, with or without local name resolving
|
||||||
|
- supports user name and password in proxy environment variables
|
||||||
|
- operations through HTTP proxy "tunnel" (using CONNECT)
|
||||||
|
- replaceable memory functions (malloc, free, realloc, etc)
|
||||||
|
- asynchronous name resolving (6)
|
||||||
|
- both a push and a pull style interface
|
||||||
|
- international domain names (10)
|
||||||
|
|
||||||
|
## HTTP
|
||||||
|
|
||||||
|
- HTTP/0.9 responses are optionally accepted
|
||||||
|
- HTTP/1.0
|
||||||
|
- HTTP/1.1
|
||||||
|
- HTTP/2, including multiplexing and server push (5)
|
||||||
|
- GET
|
||||||
|
- PUT
|
||||||
|
- HEAD
|
||||||
|
- POST
|
||||||
|
- multipart formpost (RFC1867-style)
|
||||||
|
- authentication: Basic, Digest, NTLM (9) and Negotiate (SPNEGO) (3)
|
||||||
|
to server and proxy
|
||||||
|
- resume (both GET and PUT)
|
||||||
|
- follow redirects
|
||||||
|
- maximum amount of redirects to follow
|
||||||
|
- custom HTTP request
|
||||||
|
- cookie get/send fully parsed
|
||||||
|
- reads/writes the Netscape cookie file format
|
||||||
|
- custom headers (replace/remove internally generated headers)
|
||||||
|
- custom user-agent string
|
||||||
|
- custom referrer string
|
||||||
|
- range
|
||||||
|
- proxy authentication
|
||||||
|
- time conditions
|
||||||
|
- via HTTP proxy, HTTPS proxy or SOCKS proxy
|
||||||
|
- retrieve file modification date
|
||||||
|
- Content-Encoding support for deflate and gzip
|
||||||
|
- "Transfer-Encoding: chunked" support in uploads
|
||||||
|
- automatic data compression (11)
|
||||||
|
|
||||||
|
## HTTPS (1)
|
||||||
|
|
||||||
|
- (all the HTTP features)
|
||||||
|
- HTTP/3 experimental support
|
||||||
|
- using client certificates
|
||||||
|
- verify server certificate
|
||||||
|
- via HTTP proxy, HTTPS proxy or SOCKS proxy
|
||||||
|
- select desired encryption
|
||||||
|
- select usage of a specific SSL version
|
||||||
|
|
||||||
|
## FTP
|
||||||
|
|
||||||
|
- download
|
||||||
|
- authentication
|
||||||
|
- Kerberos 5 (12)
|
||||||
|
- active/passive using PORT, EPRT, PASV or EPSV
|
||||||
|
- single file size information (compare to HTTP HEAD)
|
||||||
|
- 'type=' URL support
|
||||||
|
- dir listing
|
||||||
|
- dir listing names-only
|
||||||
|
- upload
|
||||||
|
- upload append
|
||||||
|
- upload via http-proxy as HTTP PUT
|
||||||
|
- download resume
|
||||||
|
- upload resume
|
||||||
|
- custom ftp commands (before and/or after the transfer)
|
||||||
|
- simple "range" support
|
||||||
|
- via HTTP proxy, HTTPS proxy or SOCKS proxy
|
||||||
|
- all operations can be tunneled through proxy
|
||||||
|
- customizable to retrieve file modification date
|
||||||
|
- no dir depth limit
|
||||||
|
|
||||||
|
## FTPS (1)
|
||||||
|
|
||||||
|
- implicit `ftps://` support that use SSL on both connections
|
||||||
|
- explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain `ftp://`
|
||||||
|
connection to use SSL for both or one of the connections
|
||||||
|
|
||||||
|
## SCP (8)
|
||||||
|
|
||||||
|
- both password and public key auth
|
||||||
|
|
||||||
|
## SFTP (7)
|
||||||
|
|
||||||
|
- both password and public key auth
|
||||||
|
- with custom commands sent before/after the transfer
|
||||||
|
|
||||||
|
## TFTP
|
||||||
|
|
||||||
|
- download
|
||||||
|
- upload
|
||||||
|
|
||||||
|
## TELNET
|
||||||
|
|
||||||
|
- connection negotiation
|
||||||
|
- custom telnet options
|
||||||
|
- stdin/stdout I/O
|
||||||
|
|
||||||
|
## LDAP (2)
|
||||||
|
|
||||||
|
- full LDAP URL support
|
||||||
|
|
||||||
|
## DICT
|
||||||
|
|
||||||
|
- extended DICT URL support
|
||||||
|
|
||||||
|
## FILE
|
||||||
|
|
||||||
|
- URL support
|
||||||
|
- upload
|
||||||
|
- resume
|
||||||
|
|
||||||
|
## SMB
|
||||||
|
|
||||||
|
- SMBv1 over TCP and SSL
|
||||||
|
- download
|
||||||
|
- upload
|
||||||
|
- authentication with NTLMv1
|
||||||
|
|
||||||
|
## SMTP
|
||||||
|
|
||||||
|
- authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9), Kerberos 5
|
||||||
|
(4) and External.
|
||||||
|
- send emails
|
||||||
|
- mail from support
|
||||||
|
- mail size support
|
||||||
|
- mail auth support for trusted server-to-server relaying
|
||||||
|
- multiple recipients
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## SMTPS (1)
|
||||||
|
|
||||||
|
- implicit `smtps://` support
|
||||||
|
- explicit "STARTTLS" usage to "upgrade" plain `smtp://` connections to use SSL
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## POP3
|
||||||
|
|
||||||
|
- authentication: Clear Text, APOP and SASL
|
||||||
|
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9),
|
||||||
|
Kerberos 5 (4) and External.
|
||||||
|
- list emails
|
||||||
|
- retrieve emails
|
||||||
|
- enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
|
||||||
|
custom requests
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## POP3S (1)
|
||||||
|
|
||||||
|
- implicit `pop3s://` support
|
||||||
|
- explicit `STLS` usage to "upgrade" plain `pop3://` connections to use SSL
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## IMAP
|
||||||
|
|
||||||
|
- authentication: Clear Text and SASL
|
||||||
|
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9),
|
||||||
|
Kerberos 5 (4) and External.
|
||||||
|
- list the folders of a mailbox
|
||||||
|
- select a mailbox with support for verifying the `UIDVALIDITY`
|
||||||
|
- fetch emails with support for specifying the UID and SECTION
|
||||||
|
- upload emails via the append command
|
||||||
|
- enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
|
||||||
|
STORE, COPY and UID via custom requests
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## IMAPS (1)
|
||||||
|
|
||||||
|
- implicit `imaps://` support
|
||||||
|
- explicit "STARTTLS" usage to "upgrade" plain `imap://` connections to use SSL
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## MQTT
|
||||||
|
|
||||||
|
- Subscribe to and publish topics using URL scheme `mqtt://broker/topic`
|
||||||
|
|
||||||
|
## Footnotes
|
||||||
|
|
||||||
|
1. requires a TLS library
|
||||||
|
2. requires OpenLDAP or WinLDAP
|
||||||
|
3. requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or
|
||||||
|
SSPI (native Windows)
|
||||||
|
4. requires a GSS-API implementation, however, only Windows SSPI is
|
||||||
|
currently supported
|
||||||
|
5. requires nghttp2
|
||||||
|
6. requires c-ares
|
||||||
|
7. requires libssh2, libssh or wolfSSH
|
||||||
|
8. requires libssh2 or libssh
|
||||||
|
9. requires OpenSSL, GnuTLS, mbedTLS, NSS, Secure Transport or SSPI
|
||||||
|
(native Windows)
|
||||||
|
10. requires libidn2 or Windows
|
||||||
|
11. requires libz, brotli and/or zstd
|
||||||
|
12. requires a GSS-API implementation (such as Heimdal or MIT Kerberos)
|
@ -0,0 +1,182 @@
|
|||||||
|
# Decision making in the curl project
|
||||||
|
|
||||||
|
A rough guide to how we make decisions and who does what.
|
||||||
|
|
||||||
|
## BDFL
|
||||||
|
|
||||||
|
This project was started by and has to some extent been pushed forward over
|
||||||
|
the years with Daniel Stenberg as the driving force. It matches a standard
|
||||||
|
BDFL (Benevolent Dictator For Life) style project.
|
||||||
|
|
||||||
|
This setup has been used due to convenience and the fact that it has worked
|
||||||
|
fine this far. It is not because someone thinks of it as a superior project
|
||||||
|
leadership model. It will also only continue working as long as Daniel manages
|
||||||
|
to listen in to what the project and the general user population wants and
|
||||||
|
expects from us.
|
||||||
|
|
||||||
|
## Legal entity
|
||||||
|
|
||||||
|
There is no legal entity. The curl project is just a bunch of people scattered
|
||||||
|
around the globe with the common goal to produce source code that creates
|
||||||
|
great products. We are not part of any umbrella organization and we are not
|
||||||
|
located in any specific country. We are totally independent.
|
||||||
|
|
||||||
|
The copyrights in the project are owned by the individuals and organizations
|
||||||
|
that wrote those parts of the code.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
The curl project is not a democracy, but everyone is entitled to state their
|
||||||
|
opinion and may argue for their sake within the community.
|
||||||
|
|
||||||
|
All and any changes that have been done or will be done are eligible to bring
|
||||||
|
up for discussion, to object to or to praise. Ideally, we find consensus for
|
||||||
|
the appropriate way forward in any given situation or challenge.
|
||||||
|
|
||||||
|
If there is no obvious consensus, a maintainer who's knowledgeable in the
|
||||||
|
specific area will take an "executive" decision that they think is the right
|
||||||
|
for the project.
|
||||||
|
|
||||||
|
## Donations
|
||||||
|
|
||||||
|
Donating plain money to curl is best done to curl's [Open Collective
|
||||||
|
fund](https://opencollective.com/curl). Open Collective is a US based
|
||||||
|
non-profit organization that holds on to funds for us. This fund is then used
|
||||||
|
for paying the curl security bug bounties, to reimburse project related
|
||||||
|
expenses etc.
|
||||||
|
|
||||||
|
Donations to the project can also come in the form of server hosting, providing
|
||||||
|
services and paying for people to work on curl related code etc. Usually, such
|
||||||
|
donations are services paid for directly by the sponsors.
|
||||||
|
|
||||||
|
We grade sponsors in a few different levels and if they meet the criteria,
|
||||||
|
they can be mentioned on the Sponsors page on the curl website.
|
||||||
|
|
||||||
|
## Commercial Support
|
||||||
|
|
||||||
|
The curl project does not do or offer commercial support. It only hosts
|
||||||
|
mailing lists, runs bug trackers etc to facilitate communication and work.
|
||||||
|
|
||||||
|
However, Daniel works for wolfSSL and we offer commercial curl support there.
|
||||||
|
|
||||||
|
# Key roles
|
||||||
|
|
||||||
|
## User
|
||||||
|
|
||||||
|
Someone who uses or has used curl or libcurl.
|
||||||
|
|
||||||
|
## Contributor
|
||||||
|
|
||||||
|
Someone who has helped the curl project, who has contributed to bring it
|
||||||
|
forward. Contributing could be to provide advice, debug a problem, file a bug
|
||||||
|
report, run test infrastructure or writing code etc.
|
||||||
|
|
||||||
|
## Commit author
|
||||||
|
|
||||||
|
Sometimes also called 'committer'. Someone who has authored a commit in the
|
||||||
|
curl source code repository. Committers are recorded as `Author` in git.
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
A maintainer in the curl project is an individual who has been given
|
||||||
|
permissions to push commits to one of the git repositories.
|
||||||
|
|
||||||
|
Maintainers are free to push commits to the repositories at their own will.
|
||||||
|
Maintainers are however expected to listen to feedback from users and any
|
||||||
|
change that is non-trivial in size or nature *should* be brought to the
|
||||||
|
project as a Pull-Request (PR) to allow others to comment/object before merge.
|
||||||
|
|
||||||
|
## Former maintainers
|
||||||
|
|
||||||
|
A maintainer who stops being active in the project will at some point get
|
||||||
|
their push permissions removed. We do this for security reasons but also to
|
||||||
|
make sure that we always have the list of maintainers as "the team that push
|
||||||
|
stuff to curl".
|
||||||
|
|
||||||
|
Getting push permissions removed is not a punishment. Everyone who ever worked
|
||||||
|
on maintaining curl is considered a hero, for all time hereafter.
|
||||||
|
|
||||||
|
## Security team members
|
||||||
|
|
||||||
|
We have a security team. That is the team of people who are subscribed to the
|
||||||
|
curl-security mailing list; the receivers of security reports from users and
|
||||||
|
developers. This list of people will vary over time but should be skilled
|
||||||
|
developers familiar with the curl project.
|
||||||
|
|
||||||
|
The security team works best when it consists of a small set of active
|
||||||
|
persons. We invite new members when the team seems to need it, and we also
|
||||||
|
expect to retire security team members as they "drift off" from the project or
|
||||||
|
just find themselves unable to perform their duties there.
|
||||||
|
|
||||||
|
## Server admins
|
||||||
|
|
||||||
|
We run a web server, a mailing list and more on the curl project's primary
|
||||||
|
server. That physical machine is owned and run by Haxx. Daniel is the primary
|
||||||
|
admin of all things curl related server stuff, but Björn Stenberg and Linus
|
||||||
|
Feltzing serve as backup admins for when Daniel is gone or unable.
|
||||||
|
|
||||||
|
The primary server is paid for by Haxx. The machine is physically located in a
|
||||||
|
server bunker in Stockholm Sweden, operated by the company Glesys.
|
||||||
|
|
||||||
|
The website contents are served to the web via Fastly and Daniel is the
|
||||||
|
primary curl contact with Fastly.
|
||||||
|
|
||||||
|
## BDFL
|
||||||
|
|
||||||
|
That is Daniel.
|
||||||
|
|
||||||
|
# Maintainers
|
||||||
|
|
||||||
|
A curl maintainer is a project volunteer who has the authority and rights to
|
||||||
|
merge changes into a git repository in the curl project.
|
||||||
|
|
||||||
|
Anyone can aspire to become a curl maintainer.
|
||||||
|
|
||||||
|
### Duties
|
||||||
|
|
||||||
|
There are no mandatory duties. We hope and wish that maintainers consider
|
||||||
|
reviewing patches and help merging them, especially when the changes are
|
||||||
|
within the area of personal expertise and experience.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
- only merge code that meets our quality and style guide requirements.
|
||||||
|
- *never* merge code without doing a PR first, unless the change is "trivial"
|
||||||
|
- if in doubt, ask for input/feedback from others
|
||||||
|
|
||||||
|
### Recommendations
|
||||||
|
|
||||||
|
- we require two-factor authentication enabled on your GitHub account to
|
||||||
|
reduce risk of malicious source code tampering
|
||||||
|
- consider enabling signed git commits for additional verification of changes
|
||||||
|
|
||||||
|
### Merge advice
|
||||||
|
|
||||||
|
When you are merging patches/pull requests...
|
||||||
|
|
||||||
|
- make sure the commit messages follow our template
|
||||||
|
- squash patch sets into a few logical commits even if the PR did not, if
|
||||||
|
necessary
|
||||||
|
- avoid the "merge" button on GitHub, do it "manually" instead to get full
|
||||||
|
control and full audit trail (GitHub leaves out you as "Committer:")
|
||||||
|
- remember to credit the reporter and the helpers.
|
||||||
|
|
||||||
|
## Who are maintainers?
|
||||||
|
|
||||||
|
The [list of maintainers](https://github.com/orgs/curl/people). Be aware that
|
||||||
|
the level of presence and activity in the project vary greatly between
|
||||||
|
different individuals and over time.
|
||||||
|
|
||||||
|
### Become a maintainer?
|
||||||
|
|
||||||
|
If you think you can help making the project better by shouldering some
|
||||||
|
maintaining responsibilities, then please get in touch.
|
||||||
|
|
||||||
|
You will be expected to be familiar with the curl project and its ways of
|
||||||
|
working. You need to have gotten a few quality patches merged as a proof of
|
||||||
|
this.
|
||||||
|
|
||||||
|
### Stop being a maintainer
|
||||||
|
|
||||||
|
If you (appear to) not be active in the project anymore, you may be removed as
|
||||||
|
a maintainer. Thank you for your service!
|
@ -0,0 +1,89 @@
|
|||||||
|
# How to get started helping out in the curl project
|
||||||
|
|
||||||
|
We are always in need of more help. If you are new to the project and are
|
||||||
|
looking for ways to contribute and help out, this document aims to give a few
|
||||||
|
good starting points.
|
||||||
|
|
||||||
|
You may subscribe to the [curl-library mailing
|
||||||
|
list](https://lists.haxx.se/listinfo/curl-library) to keep track of the
|
||||||
|
current discussion topics; or if you are registered on GitHub, you can use the
|
||||||
|
[Discussions section](https://github.com/curl/curl/discussions) on the main
|
||||||
|
curl repository.
|
||||||
|
|
||||||
|
## Scratch your own itch
|
||||||
|
|
||||||
|
One of the best ways is to start working on any problems or issues you have
|
||||||
|
found yourself or perhaps got annoyed at in the past. It can be a spelling
|
||||||
|
error in an error text or a weirdly phrased section in a man page. Hunt it
|
||||||
|
down and report the bug. Or make your first pull request with a fix for that.
|
||||||
|
|
||||||
|
## Smaller tasks
|
||||||
|
|
||||||
|
Some projects mark small issues as "beginner friendly", "bite-sized" or
|
||||||
|
similar. We do not do that in curl since such issues never linger around long
|
||||||
|
enough. Simple issues get handled fast.
|
||||||
|
|
||||||
|
If you are looking for a smaller or simpler task in the project to help out
|
||||||
|
with as an entry-point into the project, perhaps because you are a newcomer or
|
||||||
|
even maybe not a terribly experienced developer, here's our advice:
|
||||||
|
|
||||||
|
- Read through this document to get a grasp on a general approach to use
|
||||||
|
- Consider adding a test case for something not currently tested (correctly)
|
||||||
|
- Consider updating or adding documentation
|
||||||
|
- One way to get started gently in the project, is to participate in an
|
||||||
|
existing issue/PR and help out by reproducing the issue, review the code in
|
||||||
|
the PR etc.
|
||||||
|
|
||||||
|
## Help wanted
|
||||||
|
|
||||||
|
In the issue tracker we occasionally mark bugs with [help
|
||||||
|
wanted](https://github.com/curl/curl/labels/help%20wanted), as a sign that the
|
||||||
|
bug is acknowledged to exist and that there's nobody known to work on this
|
||||||
|
issue for the moment. Those are bugs that are fine to "grab" and provide a
|
||||||
|
pull request for. The complexity level of these will of course vary, so pick
|
||||||
|
one that piques your interest.
|
||||||
|
|
||||||
|
## Work on known bugs
|
||||||
|
|
||||||
|
Some bugs are known and have not yet received attention and work enough to get
|
||||||
|
fixed. We collect such known existing flaws in the
|
||||||
|
[KNOWN_BUGS](https://curl.se/docs/knownbugs.html) page. Many of them link
|
||||||
|
to the original bug report with some additional details, but some may also
|
||||||
|
have aged a bit and may require some verification that the bug still exists in
|
||||||
|
the same way and that what was said about it in the past is still valid.
|
||||||
|
|
||||||
|
## Fix autobuild problems
|
||||||
|
|
||||||
|
On the [autobuilds page](https://curl.se/dev/builds.html) we show a
|
||||||
|
collection of test results from the automatic curl build and tests that are
|
||||||
|
performed by volunteers. Fixing compiler warnings and errors shown there is
|
||||||
|
something we value greatly. Also, if you own or run systems or architectures
|
||||||
|
that are not already tested in the autobuilds, we also appreciate more
|
||||||
|
volunteers running builds automatically to help us keep curl portable.
|
||||||
|
|
||||||
|
## TODO items
|
||||||
|
|
||||||
|
Ideas for features and functions that we have considered worthwhile to
|
||||||
|
implement and provide are kept in the
|
||||||
|
[TODO](https://curl.se/docs/todo.html) file. Some of the ideas are
|
||||||
|
rough. Some are well thought out. Some probably are not really suitable
|
||||||
|
anymore.
|
||||||
|
|
||||||
|
Before you invest a lot of time on a TODO item, do bring it up for discussion
|
||||||
|
on the mailing list. For discussion on applicability but also for ideas and
|
||||||
|
brainstorming on specific ways to do the implementation etc.
|
||||||
|
|
||||||
|
## You decide
|
||||||
|
|
||||||
|
You can also come up with a completely new thing you think we should do. Or
|
||||||
|
not do. Or fix. Or add to the project. You then either bring it to the mailing
|
||||||
|
list first to see if people will shoot down the idea at once, or you bring a
|
||||||
|
first draft of the idea as a pull request and take the discussion there around
|
||||||
|
the specific implementation. Either way is fine.
|
||||||
|
|
||||||
|
## CONTRIBUTE
|
||||||
|
|
||||||
|
We offer [guidelines](https://curl.se/dev/contribute.html) that are
|
||||||
|
suitable to be familiar with before you decide to contribute to curl. If
|
||||||
|
you are used to open source development, you will probably not find many
|
||||||
|
surprises there.
|
@ -0,0 +1,432 @@
|
|||||||
|
How curl Became Like This
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Towards the end of 1996, Daniel Stenberg was spending time writing an IRC bot
|
||||||
|
for an Amiga related channel on EFnet. He then came up with the idea to make
|
||||||
|
currency-exchange calculations available to Internet Relay Chat (IRC)
|
||||||
|
users. All the necessary data were published on the Web; he just needed to
|
||||||
|
automate their retrieval.
|
||||||
|
|
||||||
|
1996
|
||||||
|
----
|
||||||
|
|
||||||
|
On November 11, 1996 the Brazilian developer Rafael Sagula wrote and released
|
||||||
|
HttpGet version 0.1.
|
||||||
|
|
||||||
|
Daniel extended this existing command-line open-source tool. After a few minor
|
||||||
|
adjustments, it did just what he needed. The first release with Daniel's
|
||||||
|
additions was 0.2, released on December 17, 1996. Daniel quickly became the
|
||||||
|
new maintainer of the project.
|
||||||
|
|
||||||
|
1997
|
||||||
|
----
|
||||||
|
|
||||||
|
HttpGet 0.3 was released in January 1997 and now it accepted HTTP URLs on the
|
||||||
|
command line.
|
||||||
|
|
||||||
|
HttpGet 1.0 was released on April 8 1997 with brand new HTTP proxy support.
|
||||||
|
|
||||||
|
We soon found and fixed support for getting currencies over GOPHER. Once FTP
|
||||||
|
download support was added, the name of the project was changed and urlget 2.0
|
||||||
|
was released in August 1997. The http-only days were already passed.
|
||||||
|
|
||||||
|
Version 2.2 was released on August 14 1997 and introduced support to build for
|
||||||
|
and run on Windows and Solaris.
|
||||||
|
|
||||||
|
November 24 1997: Version 3.1 added FTP upload support.
|
||||||
|
|
||||||
|
Version 3.5 added support for HTTP POST.
|
||||||
|
|
||||||
|
1998
|
||||||
|
----
|
||||||
|
|
||||||
|
February 4: urlget 3.10
|
||||||
|
|
||||||
|
February 9: urlget 3.11
|
||||||
|
|
||||||
|
March 14: urlget 3.12 added proxy authentication.
|
||||||
|
|
||||||
|
The project slowly grew bigger. With upload capabilities, the name was once
|
||||||
|
again misleading and a second name change was made. On March 20, 1998 curl 4
|
||||||
|
was released. (The version numbering from the previous names was kept.)
|
||||||
|
|
||||||
|
(Unrelated to this project a company called Curl Corporation registered a US
|
||||||
|
trademark on the name "CURL" on May 18 1998. That company had then already
|
||||||
|
registered the curl.com domain back in November of the previous year. All this
|
||||||
|
was revealed to us much later.)
|
||||||
|
|
||||||
|
SSL support was added, powered by the SSLeay library.
|
||||||
|
|
||||||
|
August: first announcement of curl on freshmeat.net.
|
||||||
|
|
||||||
|
October: with the curl 4.9 release and the introduction of cookie support,
|
||||||
|
curl was no longer released under the GPL license. Now we are at 4000 lines of
|
||||||
|
code, we switched over to the MPL license to restrict the effects of
|
||||||
|
"copyleft".
|
||||||
|
|
||||||
|
November: configure script and reported successful compiles on several
|
||||||
|
major operating systems. The never-quite-understood -F option was added and
|
||||||
|
curl could now simulate quite a lot of a browser. TELNET support was added.
|
||||||
|
|
||||||
|
Curl 5 was released in December 1998 and introduced the first ever curl man
|
||||||
|
page. People started making Linux RPM packages out of it.
|
||||||
|
|
||||||
|
1999
|
||||||
|
----
|
||||||
|
|
||||||
|
January: DICT support added.
|
||||||
|
|
||||||
|
OpenSSL took over and SSLeay was abandoned.
|
||||||
|
|
||||||
|
May: first Debian package.
|
||||||
|
|
||||||
|
August: LDAP:// and FILE:// support added. The curl website gets 1300 visits
|
||||||
|
weekly. Moved site to curl.haxx.nu.
|
||||||
|
|
||||||
|
September: Released curl 6.0. 15000 lines of code.
|
||||||
|
|
||||||
|
December 28: added the project on Sourceforge and started using its services
|
||||||
|
for managing the project.
|
||||||
|
|
||||||
|
2000
|
||||||
|
----
|
||||||
|
|
||||||
|
Spring: major internal overhaul to provide a suitable library interface.
|
||||||
|
The first non-beta release was named 7.1 and arrived in August. This offered
|
||||||
|
the easy interface and turned out to be the beginning of actually getting
|
||||||
|
other software and programs to be based on and powered by libcurl. Almost
|
||||||
|
20000 lines of code.
|
||||||
|
|
||||||
|
June: the curl site moves to "curl.haxx.se"
|
||||||
|
|
||||||
|
August, the curl website gets 4000 visits weekly.
|
||||||
|
|
||||||
|
The PHP guys adopted libcurl already the same month, when the first ever third
|
||||||
|
party libcurl binding showed up. CURL has been a supported module in PHP since
|
||||||
|
the release of PHP 4.0.2. This would soon get followers. More than 16
|
||||||
|
different bindings exist at the time of this writing.
|
||||||
|
|
||||||
|
September: kerberos4 support was added.
|
||||||
|
|
||||||
|
November: started the work on a test suite for curl. It was later re-written
|
||||||
|
from scratch again. The libcurl major SONAME number was set to 1.
|
||||||
|
|
||||||
|
2001
|
||||||
|
----
|
||||||
|
|
||||||
|
January: Daniel released curl 7.5.2 under a new license again: MIT (or
|
||||||
|
MPL). The MIT license is extremely liberal and can be combined with GPL
|
||||||
|
in other projects. This would finally put an end to the "complaints" from
|
||||||
|
people involved in GPLed projects that previously were prohibited from using
|
||||||
|
libcurl while it was released under MPL only. (Due to the fact that MPL is
|
||||||
|
deemed "GPL incompatible".)
|
||||||
|
|
||||||
|
March 22: curl supports HTTP 1.1 starting with the release of 7.7. This
|
||||||
|
also introduced libcurl's ability to do persistent connections. 24000 lines of
|
||||||
|
code. The libcurl major SONAME number was bumped to 2 due to this overhaul.
|
||||||
|
The first experimental ftps:// support was added.
|
||||||
|
|
||||||
|
August: The curl website gets 8000 visits weekly. Curl Corporation contacted
|
||||||
|
Daniel to discuss "the name issue". After Daniel's reply, they have never
|
||||||
|
since got back in touch again.
|
||||||
|
|
||||||
|
September: libcurl 7.9 introduces cookie jar and `curl_formadd()`. During the
|
||||||
|
forthcoming 7.9.x releases, we introduced the multi interface slowly and
|
||||||
|
without many whistles.
|
||||||
|
|
||||||
|
September 25: curl (7.7.2) is bundled in Mac OS X (10.1) for the first time. It was
|
||||||
|
already becoming more and more of a standard utility of Linux distributions
|
||||||
|
and a regular in the BSD ports collections.
|
||||||
|
|
||||||
|
2002
|
||||||
|
----
|
||||||
|
|
||||||
|
June: the curl website gets 13000 visits weekly. curl and libcurl is
|
||||||
|
35000 lines of code. Reported successful compiles on more than 40 combinations
|
||||||
|
of CPUs and operating systems.
|
||||||
|
|
||||||
|
To estimate the number of users of the curl tool or libcurl library is next to
|
||||||
|
impossible. Around 5000 downloaded packages each week from the main site gives
|
||||||
|
a hint, but the packages are mirrored extensively, bundled with numerous OS
|
||||||
|
distributions and otherwise retrieved as part of other software.
|
||||||
|
|
||||||
|
October 1: with the release of curl 7.10 it is released under the MIT license
|
||||||
|
only.
|
||||||
|
|
||||||
|
Starting with 7.10, curl verifies SSL server certificates by default.
|
||||||
|
|
||||||
|
2003
|
||||||
|
----
|
||||||
|
|
||||||
|
January: Started working on the distributed curl tests. The autobuilds.
|
||||||
|
|
||||||
|
February: the curl site averages at 20000 visits weekly. At any given moment,
|
||||||
|
there's an average of 3 people browsing the website.
|
||||||
|
|
||||||
|
Multiple new authentication schemes are supported: Digest (May), NTLM (June)
|
||||||
|
and Negotiate (June).
|
||||||
|
|
||||||
|
November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors
|
||||||
|
to the website. Five official web mirrors.
|
||||||
|
|
||||||
|
December: full-fledged SSL for FTP is supported.
|
||||||
|
|
||||||
|
2004
|
||||||
|
----
|
||||||
|
|
||||||
|
January: curl 7.11.0 introduced large file support.
|
||||||
|
|
||||||
|
June: curl 7.12.0 introduced IDN support. 10 official web mirrors.
|
||||||
|
|
||||||
|
This release bumped the major SONAME to 3 due to the removal of the
|
||||||
|
`curl_formparse()` function
|
||||||
|
|
||||||
|
August: Curl and libcurl 7.12.1
|
||||||
|
|
||||||
|
Public curl release number: 82
|
||||||
|
Releases counted from the beginning: 109
|
||||||
|
Available command line options: 96
|
||||||
|
Available curl_easy_setopt() options: 120
|
||||||
|
Number of public functions in libcurl: 36
|
||||||
|
Amount of public website mirrors: 12
|
||||||
|
Number of known libcurl bindings: 26
|
||||||
|
|
||||||
|
2005
|
||||||
|
----
|
||||||
|
|
||||||
|
April: GnuTLS can now optionally be used for the secure layer when curl is
|
||||||
|
built.
|
||||||
|
|
||||||
|
April: Added the multi_socket() API
|
||||||
|
|
||||||
|
September: TFTP support was added.
|
||||||
|
|
||||||
|
More than 100,000 unique visitors of the curl website. 25 mirrors.
|
||||||
|
|
||||||
|
December: security vulnerability: libcurl URL Buffer Overflow
|
||||||
|
|
||||||
|
2006
|
||||||
|
----
|
||||||
|
|
||||||
|
January: We dropped support for Gopher. We found bugs in the implementation
|
||||||
|
that turned out to have been introduced years ago, so with the conclusion that
|
||||||
|
nobody had found out in all this time we removed it instead of fixing it.
|
||||||
|
|
||||||
|
March: security vulnerability: libcurl TFTP Packet Buffer Overflow
|
||||||
|
|
||||||
|
September: The major SONAME number for libcurl was bumped to 4 due to the
|
||||||
|
removal of ftp third party transfer support.
|
||||||
|
|
||||||
|
November: Added SCP and SFTP support
|
||||||
|
|
||||||
|
2007
|
||||||
|
----
|
||||||
|
|
||||||
|
February: Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
July: security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||||
|
|
||||||
|
2008
|
||||||
|
----
|
||||||
|
|
||||||
|
November:
|
||||||
|
|
||||||
|
Command line options: 128
|
||||||
|
curl_easy_setopt() options: 158
|
||||||
|
Public functions in libcurl: 58
|
||||||
|
Known libcurl bindings: 37
|
||||||
|
Contributors: 683
|
||||||
|
|
||||||
|
145,000 unique visitors. >100 GB downloaded.
|
||||||
|
|
||||||
|
2009
|
||||||
|
----
|
||||||
|
|
||||||
|
March: security vulnerability: libcurl Arbitrary File Access
|
||||||
|
|
||||||
|
April: added CMake support
|
||||||
|
|
||||||
|
August: security vulnerability: libcurl embedded zero in cert name
|
||||||
|
|
||||||
|
December: Added support for IMAP, POP3 and SMTP
|
||||||
|
|
||||||
|
2010
|
||||||
|
----
|
||||||
|
|
||||||
|
January: Added support for RTSP
|
||||||
|
|
||||||
|
February: security vulnerability: libcurl data callback excessive length
|
||||||
|
|
||||||
|
March: The project switched over to use git (hosted by GitHub) instead of CVS
|
||||||
|
for source code control
|
||||||
|
|
||||||
|
May: Added support for RTMP
|
||||||
|
|
||||||
|
Added support for PolarSSL to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
August:
|
||||||
|
|
||||||
|
Public curl releases: 117
|
||||||
|
Command line options: 138
|
||||||
|
curl_easy_setopt() options: 180
|
||||||
|
Public functions in libcurl: 58
|
||||||
|
Known libcurl bindings: 39
|
||||||
|
Contributors: 808
|
||||||
|
|
||||||
|
Gopher support added (re-added actually, see January 2006)
|
||||||
|
|
||||||
|
2011
|
||||||
|
----
|
||||||
|
|
||||||
|
February: added support for the axTLS backend
|
||||||
|
|
||||||
|
April: added the cyassl backend (later renamed to WolfSSL)
|
||||||
|
|
||||||
|
2012
|
||||||
|
----
|
||||||
|
|
||||||
|
July: Added support for Schannel (native Windows TLS backend) and Darwin SSL
|
||||||
|
(Native Mac OS X and iOS TLS backend).
|
||||||
|
|
||||||
|
Supports Metalink
|
||||||
|
|
||||||
|
October: SSH-agent support.
|
||||||
|
|
||||||
|
2013
|
||||||
|
----
|
||||||
|
|
||||||
|
February: Cleaned up internals to always uses the "multi" non-blocking
|
||||||
|
approach internally and only expose the blocking API with a wrapper.
|
||||||
|
|
||||||
|
September: First small steps on supporting HTTP/2 with nghttp2.
|
||||||
|
|
||||||
|
October: Removed krb4 support.
|
||||||
|
|
||||||
|
December: Happy eyeballs.
|
||||||
|
|
||||||
|
2014
|
||||||
|
----
|
||||||
|
|
||||||
|
March: first real release supporting HTTP/2
|
||||||
|
|
||||||
|
September: Website had 245,000 unique visitors and served 236GB data
|
||||||
|
|
||||||
|
SMB and SMBS support
|
||||||
|
|
||||||
|
2015
|
||||||
|
----
|
||||||
|
|
||||||
|
June: support for multiplexing with HTTP/2
|
||||||
|
|
||||||
|
August: support for HTTP/2 server push
|
||||||
|
|
||||||
|
December: Public Suffix List
|
||||||
|
|
||||||
|
2016
|
||||||
|
----
|
||||||
|
|
||||||
|
January: the curl tool defaults to HTTP/2 for HTTPS URLs
|
||||||
|
|
||||||
|
December: curl 7.52.0 introduced support for HTTPS-proxy!
|
||||||
|
|
||||||
|
First TLS 1.3 support
|
||||||
|
|
||||||
|
2017
|
||||||
|
----
|
||||||
|
|
||||||
|
July: OSS-Fuzz started fuzzing libcurl
|
||||||
|
|
||||||
|
September: Added Multi-SSL support
|
||||||
|
|
||||||
|
The website serves 3100 GB/month
|
||||||
|
|
||||||
|
Public curl releases: 169
|
||||||
|
Command line options: 211
|
||||||
|
curl_easy_setopt() options: 249
|
||||||
|
Public functions in libcurl: 74
|
||||||
|
Contributors: 1609
|
||||||
|
|
||||||
|
October: SSLKEYLOGFILE support, new MIME API
|
||||||
|
|
||||||
|
October: Daniel received the Polhem Prize for his work on curl
|
||||||
|
|
||||||
|
November: brotli
|
||||||
|
|
||||||
|
2018
|
||||||
|
----
|
||||||
|
|
||||||
|
January: new SSH backend powered by libssh
|
||||||
|
|
||||||
|
March: starting with the 1803 release of Windows 10, curl is shipped bundled
|
||||||
|
with Microsoft's operating system.
|
||||||
|
|
||||||
|
July: curl shows headers using bold type face
|
||||||
|
|
||||||
|
October: added DNS-over-HTTPS (DoH) and the URL API
|
||||||
|
|
||||||
|
MesaLink is a new supported TLS backend
|
||||||
|
|
||||||
|
libcurl now does HTTP/2 (and multiplexing) by default on HTTPS URLs
|
||||||
|
|
||||||
|
curl and libcurl are installed in an estimated 5 *billion* instances
|
||||||
|
world-wide.
|
||||||
|
|
||||||
|
October 31: Curl and libcurl 7.62.0
|
||||||
|
|
||||||
|
Public curl releases: 177
|
||||||
|
Command line options: 219
|
||||||
|
curl_easy_setopt() options: 261
|
||||||
|
Public functions in libcurl: 80
|
||||||
|
Contributors: 1808
|
||||||
|
|
||||||
|
December: removed axTLS support
|
||||||
|
|
||||||
|
2019
|
||||||
|
----
|
||||||
|
|
||||||
|
March: added experimental alt-svc support
|
||||||
|
|
||||||
|
August: the first HTTP/3 requests with curl.
|
||||||
|
|
||||||
|
September: 7.66.0 is released and the tool offers parallel downloads
|
||||||
|
|
||||||
|
2020
|
||||||
|
----
|
||||||
|
|
||||||
|
curl and libcurl are installed in an estimated 10 *billion* instances
|
||||||
|
world-wide.
|
||||||
|
|
||||||
|
January: added BearSSL support
|
||||||
|
|
||||||
|
March: removed support for PolarSSL, added wolfSSH support
|
||||||
|
|
||||||
|
April: experimental MQTT support
|
||||||
|
|
||||||
|
August: zstd support
|
||||||
|
|
||||||
|
November: the website moves to curl.se. The website serves 10TB data monthly.
|
||||||
|
|
||||||
|
December: alt-svc support
|
||||||
|
|
||||||
|
2021
|
||||||
|
----
|
||||||
|
|
||||||
|
February 3: curl 7.75.0 ships with support for Hyper as an HTTP backend
|
||||||
|
|
||||||
|
March 31: curl 7.76.0 ships with support for rustls
|
||||||
|
|
||||||
|
July: HSTS is supported
|
||||||
|
|
||||||
|
2022
|
||||||
|
----
|
||||||
|
|
||||||
|
March: added --json, removed mesalink support
|
||||||
|
|
||||||
|
Public curl releases: 206
|
||||||
|
Command line options: 245
|
||||||
|
curl_easy_setopt() options: 295
|
||||||
|
Public functions in libcurl: 86
|
||||||
|
Contributors: 2601
|
||||||
|
|
||||||
|
The curl.se website serves 16,500 GB/month over 462M requests, the
|
||||||
|
official docker image has been pulled 4,098,015,431 times.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue