summaryrefslogtreecommitdiff
path: root/curl
diff options
context:
space:
mode:
Diffstat (limited to 'curl')
-rw-r--r--curl/.gitignore5
-rw-r--r--curl/README-DEV6
-rw-r--r--curl/curl/.gitattributes2
-rw-r--r--curl/curl/buildfile9
l---------curl/curl/curl_ctype.c1
-rw-r--r--curl/curl/tool_hugehelp.c3
-rw-r--r--curl/curl/tool_main.c60
-rw-r--r--curl/manifest10
8 files changed, 48 insertions, 48 deletions
diff --git a/curl/.gitignore b/curl/.gitignore
index 4c4fec7..3dcc22f 100644
--- a/curl/.gitignore
+++ b/curl/.gitignore
@@ -3,9 +3,14 @@
*.d
*.t
*.i
+*.i.*
*.ii
+*.ii.*
*.o
*.obj
+*.gcm
+*.pcm
+*.ifc
*.so
*.so.*
*.dll
diff --git a/curl/README-DEV b/curl/README-DEV
index df275f1..760e273 100644
--- a/curl/README-DEV
+++ b/curl/README-DEV
@@ -5,13 +5,9 @@ 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,dynbuf,version_win32,curl_multibyte}.c curl
+$ ln -s lib/{strtoofft,nonblock,warnless,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/.gitattributes b/curl/curl/.gitattributes
new file mode 100644
index 0000000..a6bfc4e
--- /dev/null
+++ b/curl/curl/.gitattributes
@@ -0,0 +1,2 @@
+lib symlink=dir
+src symlink=dir
diff --git a/curl/curl/buildfile b/curl/curl/buildfile
index f458c0e..9780540 100644
--- a/curl/curl/buildfile
+++ b/curl/curl/buildfile
@@ -13,15 +13,8 @@ tsys = $c.target.system
#
c.poptions += -DHAVE_CONFIG_H
-# Note that the upstream package uses the -pthread compiler/linker option on
-# Linux and FreeBSD. The option is unsupported by build2 so we pass
-# -D_REENTRANT and -lpthread preprocessor/linker options instead.
-#
switch $tclass, $tsys
{
- case 'linux' | 'bsd'
- c.poptions += -D_REENTRANT
-
case 'windows', 'win32-msvc'
c.poptions += -DWIN32
}
@@ -50,7 +43,7 @@ switch $c.class
switch $tclass, $tsys
{
case 'linux' | 'bsd'
- c.libs += -lpthread
+ c.libs += -pthread
case 'windows', 'mingw32'
c.libs+= -lws2_32
diff --git a/curl/curl/curl_ctype.c b/curl/curl/curl_ctype.c
deleted file mode 120000
index 23515cd..0000000
--- a/curl/curl/curl_ctype.c
+++ /dev/null
@@ -1 +0,0 @@
-lib/curl_ctype.c \ No newline at end of file
diff --git a/curl/curl/tool_hugehelp.c b/curl/curl/tool_hugehelp.c
deleted file mode 100644
index bc33e2f..0000000
--- a/curl/curl/tool_hugehelp.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* built-in manual is disabled, blank function */
-#include "tool_hugehelp.h"
-void hugehelp(void) {}
diff --git a/curl/curl/tool_main.c b/curl/curl/tool_main.c
index 913f8d6..0eb4e6d 100644
--- a/curl/curl/tool_main.c
+++ b/curl/curl/tool_main.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * 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
@@ -18,6 +18,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
+ * SPDX-License-Identifier: curl
+ *
***************************************************************************/
#include "tool_setup.h"
@@ -31,6 +33,10 @@
#include <signal.h>
#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
#ifdef USE_NSS
#include <nspr.h>
#include <plarenas.h>
@@ -45,11 +51,9 @@
#include "curlx.h"
#include "tool_cfgable.h"
-#include "tool_convert.h"
#include "tool_doswin.h"
#include "tool_msgs.h"
#include "tool_operate.h"
-#include "tool_panykey.h"
#include "tool_vms.h"
#include "tool_main.h"
#include "tool_libinfo.h"
@@ -83,29 +87,30 @@ int _CRT_glob = 0;
/* if we build a static library for unit tests, there is no main() function */
#ifndef UNITTESTS
+#if defined(HAVE_PIPE) && defined(HAVE_FCNTL)
/*
* Ensure that file descriptors 0, 1 and 2 (stdin, stdout, stderr) are
* open before starting to run. Otherwise, the first three network
* sockets opened by curl could be used for input sources, downloaded data
* or error logs as they will effectively be stdin, stdout and/or stderr.
+ *
+ * fcntl's F_GETFD instruction returns -1 if the file descriptor is closed,
+ * otherwise it returns "the file descriptor flags (which typically can only
+ * be FD_CLOEXEC, which is not set here).
*/
-static void main_checkfds(void)
+static int main_checkfds(void)
{
-#ifdef HAVE_PIPE
- int fd[2] = { STDIN_FILENO, STDIN_FILENO };
- while(fd[0] == STDIN_FILENO ||
- fd[0] == STDOUT_FILENO ||
- fd[0] == STDERR_FILENO ||
- fd[1] == STDIN_FILENO ||
- fd[1] == STDOUT_FILENO ||
- fd[1] == STDERR_FILENO)
- if(pipe(fd) < 0)
- return; /* Out of handles. This isn't really a big problem now, but
- will be when we try to create a socket later. */
- close(fd[0]);
- close(fd[1]);
-#endif
+ int fd[2];
+ while((fcntl(STDIN_FILENO, F_GETFD) == -1) ||
+ (fcntl(STDOUT_FILENO, F_GETFD) == -1) ||
+ (fcntl(STDERR_FILENO, F_GETFD) == -1))
+ if(pipe(fd))
+ return 1;
+ return 0;
}
+#else
+#define main_checkfds() 0
+#endif
#ifdef CURLDEBUG
static void memory_tracking_init(void)
@@ -122,7 +127,7 @@ static void memory_tracking_init(void)
curl_free(env);
curl_dbg_memdebug(fname);
/* this weird stuff here is to make curl_free() get called before
- curl_gdb_memdebug() as otherwise memory tracking will log a free()
+ curl_dbg_memdebug() as otherwise memory tracking will log a free()
without an alloc! */
}
/* if CURL_MEMLIMIT is set, this enables fail-on-alloc-number-N feature */
@@ -189,7 +194,7 @@ static CURLcode main_init(struct GlobalConfig *config)
#endif
/* Initialise the global config */
- config->showerror = -1; /* Will show errors */
+ config->showerror = FALSE; /* show errors when silent */
config->errors = stderr; /* Default errors to stderr */
config->styled_output = TRUE; /* enable detection */
config->parallel_max = PARALLEL_DEFAULT;
@@ -250,11 +255,9 @@ static void main_free(struct GlobalConfig *config)
/* Cleanup the easy handle */
/* Main cleanup */
curl_global_cleanup();
- convert_cleanup();
- metalink_cleanup();
#ifdef USE_NSS
if(PR_Initialized()) {
- /* prevent valgrind from reporting still reachable mem from NSRP arenas */
+ /* prevent valgrind from reporting still reachable mem from NSPR arenas */
PL_ArenaFinish();
/* prevent valgrind from reporting possibly lost memory (fd cache, ...) */
PR_Cleanup();
@@ -299,7 +302,10 @@ int main(int argc, char *argv[])
}
#endif
- main_checkfds();
+ if(main_checkfds()) {
+ fprintf(stderr, "curl: out of file descriptors\n");
+ return CURLE_FAILED_INIT;
+ }
#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
(void)signal(SIGPIPE, SIG_IGN);
@@ -319,9 +325,9 @@ int main(int argc, char *argv[])
main_free(&global);
}
-#ifdef __NOVELL_LIBC__
- if(getenv("_IN_NETWARE_BASH_") == NULL)
- tool_pressanykey();
+#ifdef WIN32
+ /* Flush buffers of all streams opened in write or update mode */
+ fflush(NULL);
#endif
#ifdef __VMS
diff --git a/curl/manifest b/curl/manifest
index 5bbce4a..31f1348 100644
--- a/curl/manifest
+++ b/curl/manifest
@@ -1,6 +1,7 @@
: 1
name: curl
-version: 7.76.0
+version: 7.88.1-a.0.z
+priority: security
summary: Command line tool for transferring data with URLs
license: curl ; MIT/X derivate license.
topics: HTTP, FTP, URL, data transfer
@@ -9,11 +10,12 @@ 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.
+email: curl-users@lists.haxx.se ; Mailing list.
package-email: packaging@build2.org ; Mailing list.
build-warning-email: builds@build2.org
builds: all
-depends: * build2 >= 0.13.0
-depends: * bpkg >= 0.13.0
+builds: -wasm
+depends: * build2 >= 0.15.0
+depends: * bpkg >= 0.15.0
depends: libcurl == $
depends: libca-certificates-curl ^1.0.0