summaryrefslogtreecommitdiff
path: root/curl
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-04-01 21:48:26 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-04-05 15:12:58 +0300
commit1ff5c0d21aeccc82f07cecbba20c8725f9db53e2 (patch)
tree31da60b5f25a55646cc6f6f6530f671e63692fd5 /curl
parent3b321915f741f148189439a2d3bba837d4e8e4c1 (diff)
Upgrade to 7.76.0
Diffstat (limited to 'curl')
-rw-r--r--curl/README2
-rw-r--r--curl/README-DEV7
l---------curl/curl/curl_multibyte.c1
l---------curl/curl/dynbuf.c1
-rw-r--r--curl/curl/tool_main.c105
l---------curl/curl/version_win32.c1
-rw-r--r--curl/manifest8
7 files changed, 43 insertions, 82 deletions
diff --git a/curl/README b/curl/README
index b5338d6..1d9c311 100644
--- a/curl/README
+++ b/curl/README
@@ -2,7 +2,7 @@ cURL is a client-side software for transferring data using URLs. The curl
command line tool makes the various features of libcurl available from the
shell. For more information see:
-https://curl.haxx.se/
+https://curl.se/
This package contains the original curl program source code overlaid with the
build2-based build system and packaged for the build2 package manager (bpkg).
diff --git a/curl/README-DEV b/curl/README-DEV
index 6b9f99e..df275f1 100644
--- a/curl/README-DEV
+++ b/curl/README-DEV
@@ -5,10 +5,13 @@ understanding will be useful when upgrading to a new upstream version. See
Symlink the required upstream directories into curl/:
$ ln -s ../../upstream/{src,lib} curl
-$ ln -s lib/{strtoofft,nonblock,warnless,curl_ctype}.c curl
-$ ln -s src/tool_hugehelp.c.cvs curl/tool_hugehelp.c
+$ ln -s lib/{strtoofft,nonblock,warnless,curl_ctype,dynbuf,version_win32,curl_multibyte}.c curl
$ ln -s ../../libcurl/libcurl/curl_config.h curl
+$ cp curl/src/tool_hugehelp.c.cvs curl/tool_hugehelp.c
+
+Edit tool_hugehelp.c to make hugehelp() be empty.
+
Patch curl to use CA certificate bundle provided by the
libca-certificates-curl package by default:
diff --git a/curl/curl/curl_multibyte.c b/curl/curl/curl_multibyte.c
new file mode 120000
index 0000000..a44109d
--- /dev/null
+++ b/curl/curl/curl_multibyte.c
@@ -0,0 +1 @@
+lib/curl_multibyte.c \ No newline at end of file
diff --git a/curl/curl/dynbuf.c b/curl/curl/dynbuf.c
new file mode 120000
index 0000000..6ebb8c1
--- /dev/null
+++ b/curl/curl/dynbuf.c
@@ -0,0 +1 @@
+lib/dynbuf.c \ No newline at end of file
diff --git a/curl/curl/tool_main.c b/curl/curl/tool_main.c
index 0a86304..913f8d6 100644
--- a/curl/curl/tool_main.c
+++ b/curl/curl/tool_main.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, 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.haxx.se/docs/copyright.html.
+ * 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
@@ -23,6 +23,10 @@
#include <sys/stat.h>
+#ifdef WIN32
+#include <tchar.h>
+#endif
+
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
@@ -205,17 +209,17 @@ static CURLcode main_init(struct GlobalConfig *config)
config->first->global = config;
}
else {
- helpf(stderr, "error retrieving curl library information\n");
+ errorf(config, "error retrieving curl library information\n");
free(config->first);
}
}
else {
- helpf(stderr, "error initializing curl library\n");
+ errorf(config, "error initializing curl library\n");
free(config->first);
}
}
else {
- helpf(stderr, "error initializing curl\n");
+ errorf(config, "error initializing curl\n");
result = CURLE_FAILED_INIT;
}
@@ -264,62 +268,36 @@ static void main_free(struct GlobalConfig *config)
config->last = NULL;
}
-#ifdef WIN32
-/* TerminalSettings for Windows */
-static struct TerminalSettings {
- HANDLE hStdOut;
- DWORD dwOutputMode;
-} TerminalSettings;
-
-static void configure_terminal(void)
-{
- /*
- * If we're running Windows, enable VT output.
- * Note: VT mode flag can be set on any version of Windows, but VT
- * processing only performed on Win10 >= Creators Update)
- */
-
- /* Define the VT flags in case we're building with an older SDK */
-#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
- #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
-#endif
-
- memset(&TerminalSettings, 0, sizeof(TerminalSettings));
-
- /* Enable VT output */
- TerminalSettings.hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
- if((TerminalSettings.hStdOut != INVALID_HANDLE_VALUE)
- && (GetConsoleMode(TerminalSettings.hStdOut,
- &TerminalSettings.dwOutputMode))) {
- SetConsoleMode(TerminalSettings.hStdOut,
- TerminalSettings.dwOutputMode
- | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
- }
-}
-#else
-#define configure_terminal()
-#endif
-
-static void restore_terminal(void)
-{
-#ifdef WIN32
- /* Restore Console output mode and codepage to whatever they were
- * when Curl started */
- SetConsoleMode(TerminalSettings.hStdOut, TerminalSettings.dwOutputMode);
-#endif
-}
-
/*
** curl tool main function.
*/
+#ifdef _UNICODE
+int wmain(int argc, wchar_t *argv[])
+#else
int main(int argc, char *argv[])
+#endif
{
CURLcode result = CURLE_OK;
struct GlobalConfig global;
memset(&global, 0, sizeof(global));
- /* Perform any platform-specific terminal configuration */
- configure_terminal();
+#ifdef WIN32
+ /* Undocumented diagnostic option to list the full paths of all loaded
+ modules. This is purposely pre-init. */
+ if(argc == 2 && !_tcscmp(argv[1], _T("--dump-module-paths"))) {
+ struct curl_slist *item, *head = GetLoadedModulePaths();
+ for(item = head; item; item = item->next)
+ printf("%s\n", item->data);
+ curl_slist_free_all(head);
+ return head ? 0 : 1;
+ }
+ /* win32_init must be called before other init routines. */
+ result = win32_init();
+ if(result) {
+ fprintf(stderr, "curl: (%d) Windows-specific init failed.\n", result);
+ return result;
+ }
+#endif
main_checkfds();
@@ -333,37 +311,14 @@ int main(int argc, char *argv[])
/* Initialize the curl library - do not call any libcurl functions before
this point */
result = main_init(&global);
-
-#ifdef WIN32
- /* Undocumented diagnostic option to list the full paths of all loaded
- modules, regardless of whether or not initialization succeeded. */
- if(argc == 2 && !strcmp(argv[1], "--dump-module-paths")) {
- struct curl_slist *item, *head = GetLoadedModulePaths();
- for(item = head; item; item = item->next) {
- printf("%s\n", item->data);
- }
- curl_slist_free_all(head);
- if(!result)
- main_free(&global);
- }
- else
-#endif /* WIN32 */
if(!result) {
/* Start our curl operation */
result = operate(&global, argc, argv);
-#ifdef __SYMBIAN32__
- if(global.showerror)
- tool_pressanykey();
-#endif
-
/* Perform the main cleanup */
main_free(&global);
}
- /* Return the terminal to its original state */
- restore_terminal();
-
#ifdef __NOVELL_LIBC__
if(getenv("_IN_NETWARE_BASH_") == NULL)
tool_pressanykey();
diff --git a/curl/curl/version_win32.c b/curl/curl/version_win32.c
new file mode 120000
index 0000000..85da520
--- /dev/null
+++ b/curl/curl/version_win32.c
@@ -0,0 +1 @@
+lib/version_win32.c \ No newline at end of file
diff --git a/curl/manifest b/curl/manifest
index 8bb2d5e..a3b185b 100644
--- a/curl/manifest
+++ b/curl/manifest
@@ -1,12 +1,12 @@
: 1
name: curl
-version: 7.67.0+8
+version: 7.76.0-a.0.z
summary: Command line tool for transferring data with URLs
license: cURL ; MIT/X derivate license.
topics: HTTP, FTP, URL, data transfer
description-file: README
-url: https://curl.haxx.se/
-doc-url: https://curl.haxx.se/docs/manpage.html
+url: https://curl.se/
+doc-url: https://curl.se/docs/manpage.html
src-url: https://git.build2.org/cgit/packaging/curl/curl/tree/curl/
package-url: https://git.build2.org/cgit/packaging/curl/
email: curl-users@cool.haxx.se ; Mailing list.
@@ -16,4 +16,4 @@ builds: all
depends: * build2 >= 0.12.0
depends: * bpkg >= 0.12.0
depends: libcurl == $
-depends: libca-certificates-curl >= 1.0.0
+depends: libca-certificates-curl ^1.0.0