tidy-up: miscellaneous

- avoid "will" in builds scripts, scripts folder, curl_easy_ssls_export.md,
  and few other files.
- badwords: add "initialise", "nul terminated", "thread safety" and
  variations.
- prefer "null-terminat", where missing (two places).
- fix "null-terminat*" missing dash.
- hostip: merge two `#if` blocks.
- tool_doswin: fix comment
  Spotted by GitHub Code Quality
  Follow-up to 9a2663322c #17572
- fix stray spaces and newlines.

Closes #21638
This commit is contained in:
Viktor Szakats 2026-05-14 20:37:42 +02:00
parent 47f411c6d8
commit 614b94eecc
No known key found for this signature in database
64 changed files with 203 additions and 213 deletions

View file

@ -34,8 +34,7 @@ if(!$cmake) {
exit;
}
# this lists complete lines that will be removed from the output if
# matching
# this lists complete lines that are removed from the output if matching
my %remove = (
'#define CURL_EXTERN_SYMBOL' => 1,
'#define CURL_OS "Linux"' => 1,

View file

@ -2,12 +2,11 @@
#
# SPDX-License-Identifier: curl
# This workflow will triage pull requests and apply a label based on the
# This workflow triages pull requests and applies a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler
# To use this workflow, you need to set up a .github/labeler.yml file with
# configuration. For more information, see: https://github.com/actions/labeler
name: 'Labeler'

View file

@ -283,7 +283,7 @@ static void check(char c)
int main(void)
{
char buffer[1024];
/* This will not compile if strerror_r does not return a char* */
/* This does not compile if strerror_r does not return a char* */
/* !checksrc! disable ERRNOVAR 1 */
check(strerror_r(EACCES, buffer, sizeof(buffer))[0]);
return 0;
@ -303,7 +303,7 @@ static void check(float f)
int main(void)
{
char buffer[1024];
/* This will not compile if strerror_r does not return an int */
/* This does not compile if strerror_r does not return an int */
/* !checksrc! disable ERRNOVAR 1 */
check(strerror_r(EACCES, buffer, sizeof(buffer)));
return 0;

View file

@ -592,7 +592,7 @@ option(BUILD_MISC_DOCS "Build misc man pages (e.g. curl-config and mk-ca-bundle)
option(ENABLE_CURL_MANUAL "Build the man page for curl and enable its -M/--manual option" ON)
if((ENABLE_CURL_MANUAL OR BUILD_LIBCURL_DOCS) AND NOT Perl_FOUND)
message(WARNING "Perl not found. Will not build manuals.")
message(WARNING "Perl not found. Cannot build manuals.")
endif()
# If we are on AIX, do the _ALL_SOURCE magic
@ -2163,8 +2163,8 @@ if(NOT CURL_DISABLE_INSTALL)
set(_explicit_libs "")
get_target_property(_imported "${_lib}" IMPORTED)
if(NOT _imported)
# Reading the LOCATION property on non-imported target will error out.
# Assume the user will not need this information in the .pc file.
# Reading the LOCATION property on non-imported target does error out.
# Assume the user does not need this information in the .pc file.
continue()
endif()
set(_libdirs "")

View file

@ -27,7 +27,7 @@ This release includes the following bugfixes:
o ldap: fix minor leak on write callback error [24]
o lib: two minor typos [16]
o libcurl-easy.md: minor clarifications [19]
o mbedtls: null terminate the private key blob [36]
o mbedtls: null-terminate the private key blob [36]
o mqtt: validate PINGRESP and DISCONNECT have remaining_length == 0 [7]
o schannel_verify: avoid out of blob access [11]
o setopt: changing the proxy port is also a proxy change [23]

View file

@ -25,11 +25,11 @@
dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
dnl -------------------------------------------------
dnl Use the C preprocessor to find out if the given object-style symbol
dnl is defined and get its expansion. This macro will not use default
dnl includes even if no INCLUDES argument is given. This macro will run
dnl is defined and get its expansion. This macro does not use default
dnl includes even if no INCLUDES argument is given. This macro runs
dnl silently when invoked with three arguments. If the expansion would
dnl result in a set of double-quoted strings the returned expansion will
dnl actually be a single double-quoted string concatenating all them.
dnl result in a set of double-quoted strings the returned expansion is
dnl actually a single double-quoted string concatenating all them.
AC_DEFUN([CURL_CHECK_DEF], [
AC_REQUIRE([CURL_CPP_P])
@ -79,9 +79,9 @@ AC_DEFUN([CURL_CHECK_DEF], [
dnl CURL_CHECK_DEF_CC (SYMBOL, [INCLUDES], [SILENT])
dnl -------------------------------------------------
dnl Use the C compiler to find out only if the given symbol is defined
dnl or not, this can not find out its expansion. This macro will not use
dnl or not, this can not find out its expansion. This macro does not use
dnl default includes even if no INCLUDES argument is given. This macro
dnl will run silently when invoked with three arguments.
dnl runs silently when invoked with three arguments.
AC_DEFUN([CURL_CHECK_DEF_CC], [
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])
@ -860,7 +860,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
case X-"$curl_cv_gclk_LIBS" in
X-unknown)
AC_MSG_RESULT([cannot find clock_gettime])
AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC will not be defined])
AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC is not defined])
curl_func_clock_gettime="no"
;;
X-)
@ -869,7 +869,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
;;
*)
if test "$dontwant_rt" = "yes"; then
AC_MSG_WARN([needs -lrt but asked not to use it, HAVE_CLOCK_GETTIME_MONOTONIC will not be defined])
AC_MSG_WARN([needs -lrt but asked not to use it, HAVE_CLOCK_GETTIME_MONOTONIC is not defined])
curl_func_clock_gettime="no"
else
if test -z "$curl_cv_save_LIBS"; then
@ -908,7 +908,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC will not be defined])
AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC is not defined])
curl_func_clock_gettime="no"
LIBS="$curl_cv_save_LIBS"
])
@ -1028,7 +1028,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
dnl CURL_VERIFY_RUNTIMELIBS
dnl -------------------------------------------------
dnl Verify that the shared libs found so far can be used when running
dnl programs, since otherwise the situation will create odd configure errors
dnl programs, since otherwise the situation creates odd configure errors
dnl that are misleading people.
dnl
dnl Make sure this test is run BEFORE the first test in the script that
@ -1063,7 +1063,7 @@ dnl CURL_CHECK_CA_BUNDLE
dnl -------------------------------------------------
dnl Check if a default ca-bundle should be used
dnl
dnl regarding the paths this will scan:
dnl regarding the paths this scans:
dnl /etc/ssl/certs/ca-certificates.crt Debian systems
dnl /etc/pki/tls/certs/ca-bundle.crt Redhat and Mandriva
dnl /usr/share/ssl/certs/ca-bundle.crt old(er) Redhat
@ -1258,7 +1258,7 @@ AS_HELP_STRING([--without-ca-embed], [Do not embed a default CA bundle in the cu
AC_MSG_RESULT([$want_ca_embed])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([perl was not found. Will not do CA embed.])
AC_MSG_WARN([perl was not found. Cannot do CA embed.])
fi
else
AC_MSG_RESULT([no])
@ -1498,7 +1498,7 @@ dnl CURL_CPP_P
dnl
dnl Check if $cpp -P should be used for extract define values due to gcc 5
dnl splitting up strings and defines between line outputs. gcc by default
dnl (without -P) will show TEST EINVAL TEST as
dnl (without -P) shows TEST EINVAL TEST as
dnl
dnl # 13 "conftest.c"
dnl TEST

View file

@ -678,8 +678,8 @@ esac
AM_CONDITIONAL(BUILD_UNITTESTS, test "$supports_unittests" = "yes")
dnl In order to detect support of sendmmsg() and accept4(), we need to escape the POSIX
dnl jail by defining _GNU_SOURCE or <sys/socket.h> will not expose it.
dnl In order to detect support of sendmmsg() and accept4(), we need to escape
dnl the POSIX jail by defining _GNU_SOURCE or <sys/socket.h> does not expose it.
case $host_os in
*linux*|cygwin*|msys*|gnu*)
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
@ -733,7 +733,7 @@ AS_HELP_STRING([--disable-unity],[Disable unity (default)]),
AC_MSG_RESULT([no])
)
if test -z "$PERL" && test "$want_unity" = "yes"; then
AC_MSG_WARN([perl was not found. Will not enable unity.])
AC_MSG_WARN([perl was not found. Cannot enable unity.])
want_unity='no'
fi
AM_CONDITIONAL([USE_UNITY], [test "$want_unity" = "yes"])
@ -1150,7 +1150,7 @@ AS_HELP_STRING([--disable-docs],[Disable documentation]),
BUILD_DOCS=1
)
if test -z "$PERL" && test "$BUILD_DOCS" != "0"; then
AC_MSG_WARN([perl was not found. Will not build documentation.])
AC_MSG_WARN([perl was not found. Cannot build documentation.])
BUILD_DOCS=0
fi
@ -3873,7 +3873,7 @@ case "$OPT_ZSH_FPATH" in
;;
esac
if test -z "$PERL" && test -n "$ZSH_FUNCTIONS_DIR"; then
AC_MSG_WARN([perl was not found. Will not install zsh completions.])
AC_MSG_WARN([perl was not found. Cannot install zsh completions.])
ZSH_FUNCTIONS_DIR=''
fi
AM_CONDITIONAL(USE_ZSH_COMPLETION, test -n "$ZSH_FUNCTIONS_DIR")
@ -3908,7 +3908,7 @@ case "$OPT_FISH_FPATH" in
;;
esac
if test -z "$PERL" && test -n "$FISH_FUNCTIONS_DIR"; then
AC_MSG_WARN([perl was not found. Will not install fish completions.])
AC_MSG_WARN([perl was not found. Cannot install fish completions.])
FISH_FUNCTIONS_DIR=''
fi
AM_CONDITIONAL(USE_FISH_COMPLETION, test -n "$FISH_FUNCTIONS_DIR")

View file

@ -986,7 +986,7 @@ programs. libcurl uses thread-safe functions instead of non-safe ones if your
system has such. Note that you must never share the same handle in multiple
threads.
There may be some exceptions to thread safety depending on how libcurl was
There may be some exceptions to thread-safety depending on how libcurl was
built. Please review [the guidelines for thread
safety](https://curl.se/libcurl/c/threadsafe.html) to learn more.

View file

@ -25,7 +25,7 @@
# This is a list of names we have recorded that already are thanked
# appropriately in THANKS. This list contains variations of their names and
# their "canonical" name. This file is used for scripting purposes to avoid
# duplicate entries and will not be included in release tarballs.
# duplicate entries and is not included in release tarballs.
# When removing dupes that are not identical names from THANKS, add a line
# here!
#

View file

@ -149,8 +149,7 @@ int main(void)
if(curl) {
curl_easy_setopt(curl, CURLOPT_SHARE, share);
/* run a transfer, all TLS sessions received will be added
* to the share. */
/* run a transfer, all TLS sessions received are added to the share. */
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_perform(curl);

View file

@ -13,12 +13,12 @@ Added-in: n/a
# NAME
libcurl-thread - libcurl thread safety
libcurl-thread - libcurl thread-safety
# Multi-threading with libcurl
libcurl is thread-safe but has no internal thread synchronization. You may have
to provide your own locking should you meet any of the thread safety exceptions
to provide your own locking should you meet any of the thread-safety exceptions
below.
# Handles

View file

@ -174,7 +174,7 @@ to select the active SSL backend.
The global constant functions are thread-safe since libcurl 7.84.0 if
curl_version_info(3) has the CURL_VERSION_THREADSAFE feature bit set
(most platforms). Read libcurl-thread(3) for thread safety guidelines.
(most platforms). Read libcurl-thread(3) for thread-safety guidelines.
If the global constant functions are *not thread-safe*, then you must
not call them when any other thread in the program is running. It

View file

@ -113,11 +113,11 @@ static struct altsvc *altsvc_createid(const char *srchost,
return NULL;
as->src.host = (char *)as + sizeof(struct altsvc);
memcpy(as->src.host, srchost, hlen);
/* the null terminator is already there */
/* the null-terminator is already there */
as->dst.host = (char *)as + sizeof(struct altsvc) + hlen + 1;
memcpy(as->dst.host, dsthost, dlen);
/* the null terminator is already there */
/* the null-terminator is already there */
as->src.alpnid = srcalpnid;
as->dst.alpnid = dstalpnid;

View file

@ -38,7 +38,6 @@
/* Use the system keyring as the default CA bundle. */
#define CURL_CA_BUNDLE "/QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB"
/* Definition to make a library symbol externally visible. */
#define CURL_EXTERN_SYMBOL

View file

@ -63,7 +63,7 @@ CURLcode Curl_creds_create(const char *user,
goto out;
}
/* NUL terminator for user already part of struct */
/* null-terminator for user already part of struct */
creds = curlx_calloc(1, sizeof(*creds) +
ulen + plen + 1 + olen + 1 + salen + 1 + sslen + 1);
if(!creds) {
@ -187,5 +187,4 @@ void Curl_creds_trace(struct Curl_easy *data, struct Curl_creds *creds,
else
CURL_TRC_M(data, "%s: -", msg);
}
#endif

View file

@ -69,17 +69,16 @@ bool Curl_creds_same(struct Curl_creds *c1, struct Curl_creds *c2);
bool Curl_creds_same_user(struct Curl_creds *creds, const char *user);
bool Curl_creds_same_passwd(struct Curl_creds *creds, const char *passwd);
/* Provides properties for creds or, if creds is NULL, the empty string */
#define Curl_creds_has_user(c) ((c) && (c)->user[0])
#define Curl_creds_has_passwd(c) ((c) && (c)->passwd[0])
#define Curl_creds_has_oauth_bearer(c) ((c) && (c)->oauth_bearer[0])
#define Curl_creds_has_sasl_service(c) ((c) && (c)->sasl_service[0])
#define Curl_creds_user(c) ((c)? (c)->user : "")
#define Curl_creds_passwd(c) ((c)? (c)->passwd : "")
#define Curl_creds_oauth_bearer(c) ((c)? (c)->oauth_bearer : "")
#define Curl_creds_sasl_authzid(c) ((c)? (c)->sasl_authzid : "")
#define Curl_creds_sasl_service(c) ((c)? (c)->sasl_service : "")
#define Curl_creds_user(c) ((c) ? (c)->user : "")
#define Curl_creds_passwd(c) ((c) ? (c)->passwd : "")
#define Curl_creds_oauth_bearer(c) ((c) ? (c)->oauth_bearer : "")
#define Curl_creds_sasl_authzid(c) ((c) ? (c)->sasl_authzid : "")
#define Curl_creds_sasl_service(c) ((c) ? (c)->sasl_service : "")
#ifdef CURLVERBOSE
void Curl_creds_trace(struct Curl_easy *data, struct Curl_creds *creds,

View file

@ -30,10 +30,10 @@
*
* Provide the target buffer @dest and size of the target buffer @dsize, If
* the source string @src with its *string length* @slen fits in the target
* buffer it is copied there - including storing a null terminator.
* buffer it is copied there - including storing a null-terminator.
*
* If the target buffer is too small, the copy is not performed but if the
* target buffer has a non-zero size it gets a null terminator stored.
* target buffer has a non-zero size it gets a null-terminator stored.
*/
void curlx_strcopy(char *dest, /* destination buffer */
size_t dsize, /* size of target buffer */

View file

@ -167,7 +167,6 @@ void Curl_doh_cleanup(struct Curl_easy *data,
struct Curl_resolv_async *async);
#define Curl_doh_wanted(d) (!!(d)->set.doh)
#else /* CURL_DISABLE_DOH */
#define Curl_doh(a, b) NULL
#define Curl_doh_take_result(x, y, z) CURLE_COULDNT_RESOLVE_HOST

View file

@ -507,7 +507,6 @@ const struct Curl_addrinfo *Curl_resolv_get_ai(struct Curl_easy *data,
return Curl_async_get_ai(data, async, ai_family, index);
}
#ifdef USE_HTTPSRR
const struct Curl_https_rrinfo *
Curl_resolv_get_https(struct Curl_easy *data, uint32_t resolv_id)
@ -525,7 +524,6 @@ bool Curl_resolv_knows_https(struct Curl_easy *data, uint32_t resolv_id)
return TRUE;
return Curl_async_knows_https(data, async);
}
#endif /* USE_HTTPSRR */
#endif /* USE_CURL_ASYNC */
@ -791,9 +789,6 @@ CURL_NORETURN static void alarmfunc(int sig)
(void)sig;
siglongjmp(curl_jmpenv, 1);
}
#endif /* USE_ALARM_TIMEOUT */
#ifdef USE_ALARM_TIMEOUT
static CURLcode resolv_alarm_timeout(struct Curl_easy *data,
uint8_t dns_queries,

View file

@ -121,7 +121,7 @@ static CURLcode hsts_create(struct hsts *h,
struct stsentry *sts = curlx_calloc(1, sizeof(struct stsentry) + hlen);
if(!sts)
return CURLE_OUT_OF_MEMORY;
/* the null terminator is already there */
/* the null-terminator is already there */
memcpy(sts->host, hostname, hlen);
sts->expires = expires;
sts->includeSubDomains = subdomains;
@ -445,7 +445,7 @@ static CURLcode hsts_add_host_expire(struct hsts *h,
e = hsts_check(h, host, hostlen, subdomain);
if(!e)
result = hsts_create(h, host, hostlen, subdomain, expires);
/* 'host' is not necessarily null terminated */
/* 'host' is not necessarily null-terminated */
else if((hostlen == strlen(e->host) &&
curl_strnequal(host, e->host, hostlen))) {
/* the same hostname, use the largest expire time and keep the strictest
@ -509,7 +509,7 @@ static CURLcode hsts_pull(struct Curl_easy *data, struct hsts *h)
const char *date = e.expire;
if(!e.name[0] || e.expire[MAX_HSTS_DATELEN] ||
e.name[MAX_HSTS_HOSTLEN])
/* bail out if no name was stored or if a null terminator is gone */
/* bail out if no name was stored or if a null-terminator is gone */
return CURLE_BAD_FUNCTION_ARGUMENT;
if(!date[0])
date = UNLIMITED;

View file

@ -423,7 +423,6 @@ static bool parse_conversion(const char f, unsigned int *flagp,
return FALSE;
}
static int parsefmt(const char *format,
struct outsegment *out,
struct va_input *in,
@ -968,7 +967,6 @@ static bool out_pointer(void *userp,
*
* All output is sent to the 'stream()' callback, one byte at a time.
*/
static int formatf(void *userp, /* untouched by format(), sent to the
stream() function in the second argument */
/* function pointer called for each output character */

View file

@ -78,8 +78,8 @@
/* On a debug build, we want to fail hard on multi handles that
* are not NULL, but no longer have the MAGIC touch. This gives
* us early warning on things only discovered by valgrind otherwise. */
#define GOOD_MULTI_HANDLE(x) \
(((x) && (x)->magic == CURL_MULTI_HANDLE)? TRUE: \
#define GOOD_MULTI_HANDLE(x) \
(((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
(DEBUGASSERT(!(x)), FALSE))
#else
#define GOOD_MULTI_HANDLE(x) \

View file

@ -117,7 +117,7 @@ static CURLcode peer_create(struct peer_parse *pp,
}
zone_alen = pp->zoneid.len ? (pp->zoneid.len + 1) : 0;
/* NUL terminator already part of struct */
/* null-terminator already part of struct */
peer = curlx_calloc(1, sizeof(*peer) +
pp->host_user.len + host_alen + zone_alen);
if(!peer) {

View file

@ -94,7 +94,6 @@ static const char * const cf_socks_statename[] = {
#define SOCKS_CHUNK_SIZE 1024
#define SOCKS_CHUNKS 1
struct socks_ctx {
enum socks_state_t state;
struct bufq iobuf;

View file

@ -1972,7 +1972,6 @@ nomem:
return CURLUE_OUT_OF_MEMORY;
}
}
else if(what == CURLUPART_HOST) {
size_t n = curlx_dyn_len(&enc);
if(!n && (flags & CURLU_NO_AUTHORITY)) {

View file

@ -64,7 +64,7 @@ AC_DEFUN([CURL_CHECK_COMPILER], [
*** compiler you are using, relative to the flags required to enable or
*** disable generation of debug info, optimization options or warnings.
***
*** Whatever settings are present in CFLAGS will be used for this run.
*** Whatever settings are present in CFLAGS are used for this run.
***
*** If you wish to help the curl project to better support your compiler
*** you can report this and the required info on the libcurl development
@ -173,7 +173,7 @@ dnl CURL_CHECK_COMPILER_GNU_C
dnl -------------------------------------------------
dnl Verify if compiler being used is GNU C
dnl
dnl $compiler_num will be set to MAJOR * 100 + MINOR for gcc less than version
dnl $compiler_num is set to MAJOR * 100 + MINOR for gcc less than version
dnl 7 and just $MAJOR * 100 for gcc version 7 and later.
dnl
dnl Examples:
@ -526,8 +526,8 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
CLANG|APPLECLANG)
dnl Disable warnings for unused arguments, otherwise clang will
dnl warn about compile-time arguments used during link-time, like
dnl Disable warnings for unused arguments, otherwise clang warns
dnl about compile-time arguments used during link-time, like
dnl -O and -g and -pedantic.
tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
@ -713,7 +713,7 @@ AC_DEFUN([CURL_SET_COMPILER_OPTIMIZE_OPTS], [
dnl If optimization request setting has not been explicitly specified,
dnl it has been derived from the debug setting and initially assumed.
dnl This initially assumed optimizer setting will finally be ignored
dnl This initially assumed optimizer setting are finally ignored
dnl if CFLAGS or CPPFLAGS already hold optimizer flags. This implies
dnl that an initially assumed optimizer setting might not be honored.

View file

@ -150,25 +150,25 @@ AS_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
OPT_COMPILER_OPTIMIZE=$enableval)
case "$OPT_COMPILER_OPTIMIZE" in
no)
dnl --disable-optimize option used. We will handle this as
dnl a request to disable compiler optimizations if possible.
dnl If the compiler is known CFLAGS and CPPFLAGS will be
dnl overridden, otherwise this can not be honored.
dnl --disable-optimize option used. We handle this as a request
dnl to disable compiler optimizations if possible. If the compiler
dnl is known CFLAGS and CPPFLAGS are overridden, otherwise this
dnl can not be honored.
want_optimize="no"
AC_MSG_RESULT([no])
;;
default)
dnl configure's optimize option not specified. Initially we will
dnl handle this as a request contrary to configure's setting
dnl for --enable-debug. IOW, initially, for debug-enabled builds
dnl this will be handled as a request to disable optimizations if
dnl possible, and for debug-disabled builds this will be handled
dnl initially as a request to enable optimizations if possible.
dnl Finally, if the compiler is known and CFLAGS and CPPFLAGS do
dnl not have any optimizer flag the request will be honored, in
dnl any other case the request can not be honored.
dnl configure's optimize option not specified. Initially we handle
dnl this as a request contrary to configure's setting for
dnl --enable-debug. IOW, initially, for debug-enabled builds this
dnl is handled as a request to disable optimizations if possible,
dnl and for debug-disabled builds this is handled initially as
dnl a request to enable optimizations if possible. Finally, if the
dnl compiler is known and CFLAGS and CPPFLAGS do not have any
dnl optimizer flag the request is honored, in any other case the
dnl request can not be honored.
dnl IOW, existing optimizer flags defined in CFLAGS or CPPFLAGS
dnl will always take precedence over any initial assumption.
dnl always take precedence over any initial assumption.
if test "$want_debug" = "yes"; then
want_optimize="assume_no"
AC_MSG_RESULT([(assumed) no])
@ -178,10 +178,10 @@ AS_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
fi
;;
*)
dnl --enable-optimize option used. We will handle this as
dnl a request to enable compiler optimizations if possible.
dnl If the compiler is known CFLAGS and CPPFLAGS will be
dnl overridden, otherwise this can not be honored.
dnl --enable-optimize option used. We handle this as a request
dnl to enable compiler optimizations if possible. If the compiler
dnl is known CFLAGS and CPPFLAGS are overridden, otherwise this
dnl can not be honored.
want_optimize="yes"
AC_MSG_RESULT([yes])
;;
@ -207,7 +207,7 @@ AS_HELP_STRING([--disable-symbol-hiding],[Disable hiding of library internal sym
no)
dnl --disable-symbol-hiding option used.
dnl This is an indication to not attempt hiding of library internal
dnl symbols. Default symbol visibility will be used, which normally
dnl symbols. Default symbol visibility is used, which normally
dnl exposes all library internal symbols.
want_symbol_hiding="no"
AC_MSG_RESULT([no])
@ -361,13 +361,13 @@ dnl CURL_CONFIGURE_SYMBOL_HIDING
dnl -------------------------------------------------
dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding
dnl configure option, and compiler capability to actually honor such
dnl option, this will modify compiler flags as appropriate and also
dnl provide needed definitions for configuration and Makefile.am files.
dnl option, this modifies compiler flags as appropriate and also
dnl provides needed definitions for configuration and Makefile.am files.
dnl This macro should not be used until all compilation tests have
dnl been done to prevent interferences on other tests.
AC_DEFUN([CURL_CONFIGURE_SYMBOL_HIDING], [
AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen])
AC_MSG_CHECKING([whether hiding of library internal symbols does actually happen])
CFLAG_CURL_SYMBOL_HIDING=""
doing_symbol_hiding="no"
if test "$want_symbol_hiding" = "yes" &&
@ -456,7 +456,7 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
])
if test "$want_ares" = "yes"; then
dnl finally c-ares will be used
dnl finally c-ares is used
AC_DEFINE(USE_ARES, 1, [Define to enable c-ares support])
USE_ARES=1
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libcares"

View file

@ -467,7 +467,7 @@ dnl Verify if alarm is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_alarm, then
dnl HAVE_ALARM will be defined.
dnl HAVE_ALARM is defined.
AC_DEFUN([CURL_CHECK_FUNC_ALARM], [
AC_REQUIRE([CURL_INCLUDES_UNISTD])
@ -552,7 +552,7 @@ dnl Verify if basename is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_basename, then
dnl HAVE_BASENAME will be defined.
dnl HAVE_BASENAME is defined.
AC_DEFUN([CURL_CHECK_FUNC_BASENAME], [
AC_REQUIRE([CURL_INCLUDES_STRING])
@ -643,7 +643,7 @@ dnl Verify if closesocket is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_closesocket, then
dnl HAVE_CLOSESOCKET will be defined.
dnl HAVE_CLOSESOCKET is defined.
AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
@ -733,7 +733,7 @@ dnl Verify if CloseSocket is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_closesocket_camel,
dnl then HAVE_CLOSESOCKET_CAMEL will be defined.
dnl then HAVE_CLOSESOCKET_CAMEL is defined.
AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET_CAMEL], [
AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])
@ -810,7 +810,7 @@ dnl Verify if fcntl is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_fcntl, then
dnl HAVE_FCNTL will be defined.
dnl HAVE_FCNTL is defined.
AC_DEFUN([CURL_CHECK_FUNC_FCNTL], [
AC_REQUIRE([CURL_INCLUDES_FCNTL])
@ -895,7 +895,7 @@ dnl -------------------------------------------------
dnl Verify if fcntl with status flag O_NONBLOCK is
dnl available, can be compiled, and seems to work. If
dnl all of these are true, then HAVE_FCNTL_O_NONBLOCK
dnl will be defined.
dnl is defined.
AC_DEFUN([CURL_CHECK_FUNC_FCNTL_O_NONBLOCK], [
@ -959,7 +959,7 @@ dnl Verify if freeaddrinfo is available, prototyped,
dnl and can be compiled. If all of these are true,
dnl and usage has not been previously disallowed with
dnl shell variable curl_disallow_freeaddrinfo, then
dnl HAVE_FREEADDRINFO will be defined.
dnl HAVE_FREEADDRINFO is defined.
AC_DEFUN([CURL_CHECK_FUNC_FREEADDRINFO], [
AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])
@ -1055,7 +1055,7 @@ dnl Verify if fsetxattr is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_fsetxattr, then
dnl HAVE_FSETXATTR will be defined.
dnl HAVE_FSETXATTR is defined.
AC_DEFUN([CURL_CHECK_FUNC_FSETXATTR], [
AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])
@ -1177,8 +1177,8 @@ dnl Verify if getaddrinfo is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable curl_disallow_getaddrinfo, then
dnl HAVE_GETADDRINFO will be defined. Additionally when
dnl HAVE_GETADDRINFO gets defined this will also attempt
dnl HAVE_GETADDRINFO is defined. Additionally when
dnl HAVE_GETADDRINFO gets defined this also attempts
dnl to find out if getaddrinfo happens to be thread-safe,
dnl defining HAVE_GETADDRINFO_THREADSAFE when true.
@ -1408,7 +1408,7 @@ dnl Verify if gethostbyname_r is available, prototyped,
dnl and can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_gethostbyname_r, then
dnl HAVE_GETHOSTBYNAME_R will be defined.
dnl HAVE_GETHOSTBYNAME_R is defined.
AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [
AC_REQUIRE([CURL_INCLUDES_NETDB])
@ -1553,7 +1553,7 @@ dnl Verify if gethostname is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_gethostname, then
dnl HAVE_GETHOSTNAME will be defined.
dnl HAVE_GETHOSTNAME is defined.
AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
@ -1689,7 +1689,7 @@ dnl Verify if getpeername is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_getpeername, then
dnl HAVE_GETPEERNAME will be defined.
dnl HAVE_GETPEERNAME is defined.
AC_DEFUN([CURL_CHECK_FUNC_GETPEERNAME], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
@ -1787,7 +1787,7 @@ dnl Verify if getsockname is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_getsockname, then
dnl HAVE_GETSOCKNAME will be defined.
dnl HAVE_GETSOCKNAME is defined.
AC_DEFUN([CURL_CHECK_FUNC_GETSOCKNAME], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
@ -1886,7 +1886,7 @@ dnl Verify if getifaddrs is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable curl_disallow_getifaddrs, then
dnl HAVE_GETIFADDRS will be defined.
dnl HAVE_GETIFADDRS is defined.
AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [
AC_REQUIRE([CURL_INCLUDES_STDLIB])
@ -2004,7 +2004,7 @@ dnl Verify if gmtime_r is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable curl_disallow_gmtime_r, then
dnl HAVE_GMTIME_R will be defined.
dnl HAVE_GMTIME_R is defined.
AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [
AC_REQUIRE([CURL_INCLUDES_STDLIB])
@ -2124,7 +2124,7 @@ dnl Verify if localtime_r is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable curl_disallow_localtime_r, then
dnl HAVE_LOCALTIME_R will be defined.
dnl HAVE_LOCALTIME_R is defined.
AC_DEFUN([CURL_CHECK_FUNC_LOCALTIME_R], [
AC_REQUIRE([CURL_INCLUDES_STDLIB])
@ -2244,7 +2244,7 @@ dnl Verify if inet_ntop is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable curl_disallow_inet_ntop, then
dnl HAVE_INET_NTOP will be defined.
dnl HAVE_INET_NTOP is defined.
AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
AC_REQUIRE([CURL_INCLUDES_STDLIB])
@ -2405,7 +2405,7 @@ dnl Verify if inet_pton is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable curl_disallow_inet_pton, then
dnl HAVE_INET_PTON will be defined.
dnl HAVE_INET_PTON is defined.
AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [
AC_REQUIRE([CURL_INCLUDES_STDLIB])
@ -2643,7 +2643,7 @@ dnl -------------------------------------------------
dnl Verify if ioctl with the FIONBIO command is
dnl available, can be compiled, and seems to work. If
dnl all of these are true, then HAVE_IOCTL_FIONBIO
dnl will be defined.
dnl is defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTL_FIONBIO], [
@ -2699,7 +2699,7 @@ dnl -------------------------------------------------
dnl Verify if ioctl with the SIOCGIFADDR command is available,
dnl struct ifreq is defined, they can be compiled, and seem to
dnl work. If all of these are true, then HAVE_IOCTL_SIOCGIFADDR
dnl will be defined.
dnl is defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
@ -2757,7 +2757,7 @@ dnl Verify if ioctlsocket is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_ioctlsocket, then
dnl HAVE_IOCTLSOCKET will be defined.
dnl HAVE_IOCTLSOCKET is defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
@ -2847,7 +2847,7 @@ dnl -------------------------------------------------
dnl Verify if ioctlsocket with the FIONBIO command is
dnl available, can be compiled, and seems to work. If
dnl all of these are true, then HAVE_IOCTLSOCKET_FIONBIO
dnl will be defined.
dnl is defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_FIONBIO], [
@ -2904,7 +2904,7 @@ dnl Verify if IoctlSocket is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_ioctlsocket_camel,
dnl then HAVE_IOCTLSOCKET_CAMEL will be defined.
dnl then HAVE_IOCTLSOCKET_CAMEL is defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL], [
AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
@ -2978,7 +2978,7 @@ dnl CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL_FIONBIO
dnl -------------------------------------------------
dnl Verify if IoctlSocket with FIONBIO command is available,
dnl can be compiled, and seems to work. If all of these are
dnl true, then HAVE_IOCTLSOCKET_CAMEL_FIONBIO will be defined.
dnl true, then HAVE_IOCTLSOCKET_CAMEL_FIONBIO is defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL_FIONBIO], [
AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
@ -3036,7 +3036,7 @@ dnl Verify if memrchr is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_memrchr, then
dnl HAVE_MEMRCHR will be defined.
dnl HAVE_MEMRCHR is defined.
AC_DEFUN([CURL_CHECK_FUNC_MEMRCHR], [
AC_REQUIRE([CURL_INCLUDES_STRING])
@ -3141,7 +3141,7 @@ dnl Verify if sigaction is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_sigaction, then
dnl HAVE_SIGACTION will be defined.
dnl HAVE_SIGACTION is defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGACTION], [
AC_REQUIRE([CURL_INCLUDES_SIGNAL])
@ -3226,7 +3226,7 @@ dnl Verify if siginterrupt is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_siginterrupt, then
dnl HAVE_SIGINTERRUPT will be defined.
dnl HAVE_SIGINTERRUPT is defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGINTERRUPT], [
AC_REQUIRE([CURL_INCLUDES_SIGNAL])
@ -3311,7 +3311,7 @@ dnl Verify if signal is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_signal, then
dnl HAVE_SIGNAL will be defined.
dnl HAVE_SIGNAL is defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGNAL], [
AC_REQUIRE([CURL_INCLUDES_SIGNAL])
@ -3396,7 +3396,7 @@ dnl Verify if sigsetjmp is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_sigsetjmp, then
dnl HAVE_SIGSETJMP will be defined.
dnl HAVE_SIGSETJMP is defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGSETJMP], [
AC_REQUIRE([CURL_INCLUDES_SETJMP])
@ -3503,7 +3503,7 @@ dnl Verify if socket is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_socket, then
dnl HAVE_SOCKET will be defined.
dnl HAVE_SOCKET is defined.
AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
@ -3600,7 +3600,7 @@ dnl Verify if socketpair is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_socketpair, then
dnl HAVE_SOCKETPAIR will be defined.
dnl HAVE_SOCKETPAIR is defined.
AC_DEFUN([CURL_CHECK_FUNC_SOCKETPAIR], [
AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])
@ -3686,7 +3686,7 @@ dnl Verify if strcasecmp is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_strcasecmp, then
dnl HAVE_STRCASECMP will be defined.
dnl HAVE_STRCASECMP is defined.
AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [
AC_REQUIRE([CURL_INCLUDES_STRING])
@ -3770,7 +3770,7 @@ dnl Verify if strcmpi is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_strcmpi, then
dnl HAVE_STRCMPI will be defined.
dnl HAVE_STRCMPI is defined.
AC_DEFUN([CURL_CHECK_FUNC_STRCMPI], [
AC_REQUIRE([CURL_INCLUDES_STRING])
@ -3854,7 +3854,7 @@ dnl -------------------------------------------------
dnl Verify if strerror_r is available, prototyped, can be compiled and
dnl seems to work. If all of these are true, and usage has not been
dnl previously disallowed with shell variable curl_disallow_strerror_r,
dnl then HAVE_STRERROR_R will be defined, as well as one of
dnl then HAVE_STRERROR_R is defined, as well as one of
dnl HAVE_GLIBC_STRERROR_R or HAVE_POSIX_STRERROR_R.
dnl
dnl glibc-style strerror_r:
@ -4120,7 +4120,7 @@ dnl Verify if stricmp is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_stricmp, then
dnl HAVE_STRICMP will be defined.
dnl HAVE_STRICMP is defined.
AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [
AC_REQUIRE([CURL_INCLUDES_STRING])
@ -4205,7 +4205,7 @@ dnl Verify if memset_s is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_memset_s, then
dnl HAVE_MEMSET_S will be defined.
dnl HAVE_MEMSET_S is defined.
AC_DEFUN([CURL_CHECK_FUNC_MEMSET_S], [
AC_REQUIRE([CURL_INCLUDES_STRING])
@ -4356,6 +4356,7 @@ dnl CURL_ATOMIC
dnl -------------------------------------------------------------
dnl Check if _Atomic works. But only check if stdatomic.h exists.
dnl
AC_DEFUN([CURL_ATOMIC],[
AC_CHECK_HEADERS(stdatomic.h, [
AC_MSG_CHECKING([if _Atomic is available])
@ -4437,5 +4438,4 @@ AC_DEFUN([CURL_SIZEOF], [
eval "$tname=$r"
AC_DEFINE_UNQUOTED(TYPE, [$r], [Size of $1 in number of bytes])
])

View file

@ -80,7 +80,7 @@ if test "x$OPT_OPENSSL" != "xno"; then
dnl the user told us to look
OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
if test -f "$OPENSSL_PCDIR/openssl.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR is set to "$OPENSSL_PCDIR"])
PKGTEST="yes"
fi
@ -88,7 +88,7 @@ if test "x$OPT_OPENSSL" != "xno"; then
dnl try lib64 instead
OPENSSL_PCDIR="$OPT_OPENSSL/lib64/pkgconfig"
if test -f "$OPENSSL_PCDIR/openssl.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR is set to "$OPENSSL_PCDIR"])
PKGTEST="yes"
fi
fi
@ -385,14 +385,14 @@ if test "$OPENSSL_ENABLED" = "1"; then
])
dnl ---
dnl Whether the OpenSSL configuration will be loaded automatically
dnl Whether the OpenSSL configuration is loaded automatically
dnl ---
AC_ARG_ENABLE(openssl-auto-load-config,
AS_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration])
AS_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]),
[ if test "x$enableval" = "xno"; then
AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled])
AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration will not be loaded automatically])
AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration is not loaded automatically])
fi
])

View file

@ -28,7 +28,7 @@ dnl serial 7
dnl CURL_OVERRIDE_AUTOCONF
dnl -------------------------------------------------
dnl Placing a call to this macro in configure.ac after
dnl the one to AC_INIT will make macros in this file
dnl the one to AC_INIT makes macros in this file
dnl visible to the rest of the compilation overriding
dnl those from Autoconf.

View file

@ -320,10 +320,10 @@ AC_DEFUN([CURL_CHECK_NEED_THREAD_SAFE_SYSTEM], [
dnl CURL_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
dnl -------------------------------------------------
dnl This macro ensures that configuration tests done
dnl after this will execute with preprocessor symbol
dnl _REENTRANT defined. This macro also ensures that
dnl the generated config file defines NEED_REENTRANT
dnl and that in turn curl_setup.h will define _REENTRANT.
dnl after this execute with preprocessor symbol _REENTRANT
dnl defined. This macro also ensures that the generated
dnl config file defines NEED_REENTRANT and that in turn
dnl curl_setup.h defines _REENTRANT.
dnl Internal macro for CURL_CONFIGURE_REENTRANT.
AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [
@ -340,10 +340,10 @@ _EOF
dnl CURL_CONFIGURE_FROM_NOW_ON_WITH_THREAD_SAFE
dnl -------------------------------------------------
dnl This macro ensures that configuration tests done
dnl after this will execute with preprocessor symbol
dnl _THREAD_SAFE defined. This macro also ensures that
dnl the generated config file defines NEED_THREAD_SAFE
dnl and that in turn curl_setup.h will define _THREAD_SAFE.
dnl after this execute with preprocessor symbol_THREAD_SAFE
dnl defined. This macro also ensures that the generated
dnl config file defines NEED_THREAD_SAFE and that in turn
dnl curl_setup.h defines _THREAD_SAFE.
dnl Internal macro for CURL_CONFIGURE_THREAD_SAFE.
AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_THREAD_SAFE], [

View file

@ -57,7 +57,7 @@ if test "x$OPT_RUSTLS" != "xno"; then
RUSTLS_PCDIR="$PREFIX_RUSTLS/lib/pkgconfig"
if test -f "$RUSTLS_PCDIR/rustls.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$RUSTLS_PCDIR"])
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR is set to "$RUSTLS_PCDIR"])
PKGTEST="yes"
fi
@ -65,7 +65,7 @@ if test "x$OPT_RUSTLS" != "xno"; then
dnl try lib64 instead
RUSTLS_PCDIR="$PREFIX_RUSTLS/lib64/pkgconfig"
if test -f "$RUSTLS_PCDIR/rustls.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$RUSTLS_PCDIR"])
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR is set to "$RUSTLS_PCDIR"])
PKGTEST="yes"
fi
fi
@ -95,7 +95,7 @@ if test "x$OPT_RUSTLS" != "xno"; then
SSL_CPPFLAGS="-I$PREFIX_RUSTLS/include"
fi
dnl we will verify AC_CHECK_LIB later on
dnl we verify AC_CHECK_LIB later on
AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled])
USE_RUSTLS="yes"
fi

View file

@ -111,7 +111,7 @@ esac
dnl
dnl Default behavior on some systems where building a shared library out
dnl of non-PIC compiled objects will fail with following linker error
dnl of non-PIC compiled objects fails with following linker error
dnl "relocation R_X86_64_32 can not be used when making a shared object"
dnl is to build PIC objects even for static libraries. This behavior may
dnl be overridden using 'configure --disable-shared --without-pic'.
@ -183,10 +183,10 @@ dnl xc_lt_build_static
m4_define([_XC_CHECK_LT_BUILD_LIBRARIES],
[
#
# Verify if finally libtool shared libraries will be built
#
#
# Verify if finally libtool shared libraries are built
#
case "x$enable_shared" in @%:@ ((
xyes | xno)
xc_lt_build_shared=$enable_shared
@ -197,9 +197,8 @@ case "x$enable_shared" in @%:@ ((
esac
#
# Verify if finally libtool static libraries will be built
# Verify if finally libtool static libraries are built
#
case "x$enable_static" in @%:@ ((
xyes | xno)
xc_lt_build_static=$enable_static
@ -362,10 +361,10 @@ dnl xc_lt_build_static_only
m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
[
#
# Verify if libtool shared libraries will be built while static not built
#
#
# Verify if libtool shared libraries are built while static not built
#
AC_MSG_CHECKING([whether to build shared libraries only])
if test "$xc_lt_build_shared" = "yes" &&
test "$xc_lt_build_static" = "no"; then
@ -376,9 +375,8 @@ fi
AC_MSG_RESULT([$xc_lt_build_shared_only])
#
# Verify if libtool static libraries will be built while shared not built
# Verify if libtool static libraries are built while shared not built
#
AC_MSG_CHECKING([whether to build static libraries only])
if test "$xc_lt_build_static" = "yes" &&
test "$xc_lt_build_shared" = "no"; then

View file

@ -606,7 +606,7 @@ dnl XC_CONFIGURE_PREAMBLE macro and happens early in
dnl generated configure script. The second one shows and
dnl logs the result of the check into config.log at a later
dnl configure stage. Placement of this second stage in
dnl generated configure script will be done where first
dnl generated configure script is done where first
dnl direct or indirect usage of this macro happens.
AC_DEFUN([XC_CHECK_PATH_SEPARATOR],

View file

@ -52,8 +52,8 @@ m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
dnl XC_OVR_ZZ50
dnl -------------------------------------------------
dnl Placing a call to this macro in configure.ac will
dnl make macros in this file visible to other macros
dnl Placing a call to this macro in configure.ac
dnl makes macros in this file visible to other macros
dnl used for same configure script, overriding those
dnl provided elsewhere.

View file

@ -337,8 +337,8 @@ rem
:seterr
rem Set the caller's errorlevel.
rem %1[opt]: Errorlevel as integer.
rem If %1 is empty the errorlevel will be set to 0.
rem If %1 is not empty and not an integer the errorlevel will be set to 1.
rem If %1 is empty the errorlevel is set to 0.
rem If %1 is not empty and not an integer the errorlevel is set to 1.
setlocal
set EXITCODE=%~1
if not defined EXITCODE set EXITCODE=0

View file

@ -5,7 +5,7 @@
#
# bad[:=]correct
#
# If separator is '=', the string will be compared case sensitively.
# If separator is '=', the string is compared case sensitively.
# If separator is ':', the check is done case insensitively.
#
# To add white listed uses of bad words that are removed before checking for

View file

@ -17,10 +17,18 @@ tool-chain:toolchain
wild-card:wildcard
wild card:wildcard
thread safe:thread-safe
thread safety:thread-safety
thread unsafe:thread-unsafe
multi thread:multi-thread
nul terminate:null-terminate
null terminate:null-terminate
zero terminate:null-terminate
nul terminated:null-terminated
null terminated:null-terminated
zero terminated:null-terminated
nul terminator:null-terminator
null terminator:null-terminator
zero terminator:null-terminator
it's:it is
aren't:are not
can't:cannot
@ -96,6 +104,7 @@ will:rewrite to present tense
16-bits:16 bits
32-bits:32 bits
64-bits:64 bits
initialise:initialize
very:rephrase using an alternative word
just:rephrase using an alternative word
simply:rephrase using an alternative word

View file

@ -1199,7 +1199,7 @@ sub scanfile {
# A rather more interesting, and correct, check would be to not test
# only locally committed files but inspect all files wrt the year of
# their last commit. Removing the `git rev-list origin/master..HEAD`
# condition below will enforce copyright year checks against the year
# condition below enforces copyright year checks against the year
# the file was last committed (and thus edited to some degree).
my $commityear = undef;
@copyright = sort {$$b{year} cmp $$a{year}} @copyright;

View file

@ -27,7 +27,7 @@
# https://cmake-format.readthedocs.io/en/latest/lint-usage.html
# https://github.com/cheshirekow/cmake_format/blob/master/cmakelang/configuration.py
# Run cmakelint on the curl source code. It will check all files given on the
# Run cmakelint on the curl source code. It checks all files given on the
# command-line, or else all relevant files in git, or if not in a git
# repository, all files starting in the tree rooted in the current directory.
#
@ -36,8 +36,8 @@
#
# The xargs invocation is portable, but does not preserve spaces in filenames.
# If such a file is ever added, then this can be portably fixed by switching to
# "xargs -I{}" and appending {} to the end of the xargs arguments (which will
# call cmakelint once per file) or by using the GNU extension "xargs -d'\n'".
# "xargs -I{}" and appending {} to the end of the xargs arguments (which calls
# cmakelint once per file) or by using the GNU extension "xargs -d'\n'".
set -eu

View file

@ -153,7 +153,7 @@ sub warning_message() {
print " 3. certdata.txt file format may change, lag time to update this script\n";
print " 4. Generally unwise to blindly trust CAs without manual review & verification\n";
print " 5. Mozilla apps use additional security checks are not represented in certdata\n";
print " 6. Use of this script will make a security engineer grind his teeth and\n";
print " 6. Use of this script makes a security engineer grind his teeth and\n";
print " swear at you. ;)\n";
exit;
} else { # Short Form Warning
@ -228,7 +228,7 @@ sub parse_csv_param($$@) {
if(scalar(@invalid) > 0) {
# Tell the user which parameters were invalid and print the standard help
# message which will exit
# message which also exits
print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join(", ", map { "\"$_\"" } @invalid), "\n";
HELP_MESSAGE();
}

View file

@ -25,8 +25,8 @@
# The xargs invocation is portable, but does not preserve spaces in filenames.
# If such a file is ever added, then this can be portably fixed by switching to
# "xargs -I{}" and appending {} to the end of the xargs arguments (which will
# call cmakelint once per file) or by using the GNU extension "xargs -d'\n'".
# "xargs -I{}" and appending {} to the end of the xargs arguments (which calls
# cmakelint once per file) or by using the GNU extension "xargs -d'\n'".
set -eu

View file

@ -32,8 +32,8 @@
# $ ./scripts/release-notes.pl
#
# 2. Edit RELEASE-NOTES and remove all entries that do not belong. Unused
# references below will be cleaned up in the next step. Make sure to move
# "changes" up to the changes section. All entries will by default be listed
# references below are cleaned up in the next step. Make sure to move
# "changes" up to the changes section. All entries are by default listed
# under bug-fixes as this script cannot know where to put them.
#
# 3. Run the cleanup script and let it sort the entries and remove unused

View file

@ -219,7 +219,7 @@ void config_free(struct OperationConfig *config)
* round to verify them.
*
* The main point is to make sure that what is returned is different than what
* the regular memory functions return so that mixup will trigger problems.
* the regular memory functions return so that mixup does trigger problems.
*
* This test setup currently only works when building with a *shared* libcurl
* and not static, as in the latter case the tool and the library share some of

View file

@ -804,7 +804,7 @@ curl_socket_t win32_stdin_read_thread(void)
break;
}
/* Bind to any available loopback port */
/* Retrieve the assigned loopback port/address */
if(getsockname(tdata->socket_l, (struct sockaddr *)&selfaddr, &socksize)) {
errorf("getsockname error: %d", SOCKERRNO);
break;

View file

@ -652,8 +652,7 @@ static void param_encoder(char **ptr, char **endct, char **pencoder,
* @param str Pointer to the current position in the input string.
* Updated to point at the delimiter or terminator that
* ended the parsed part.
* @param pdata Pointer to a char * that will receive the primary data
* word.
* @param pdata Pointer to a char * that receives the primary data word.
* @param ptype [out] Optional. Receives the extracted 'type=' value.
* @param pfilename [out] Optional. Receives the extracted 'filename=' value.
* @param pencoder [out] Optional. Receives the extracted 'encoder=' value.

View file

@ -355,7 +355,7 @@ static ParameterError addvariable(const char *name,
p = curlx_calloc(1, sizeof(struct tool_var) + nlen);
if(p) {
memcpy(p->name, name, nlen);
/* the null termination byte is already present from above */
/* the null-termination byte is already present from above */
p->content = contalloc ? content : curlx_memdup0(content, clen);
if(p->content) {

View file

@ -82,8 +82,8 @@ function(curl_add_runtests _targetname _test_flags)
if(_setenvs)
set(_setenvs "${CMAKE_COMMAND}" -E env ${_setenvs})
endif()
# Use a special '$TFLAGS' placeholder as last argument which will be
# replaced by the contents of the environment variable in runtests.pl.
# Use a special '$TFLAGS' placeholder as last argument which is replaced
# by the contents of the environment variable in runtests.pl.
# This is a workaround for CMake's limitation where commands executed by
# 'make' or 'ninja' cannot portably reference environment variables.
string(REPLACE " " ";" _test_flags_list "${_test_flags}")

View file

@ -28,7 +28,7 @@
# Lines starting with '#' letters are treated as comments.
#
# Uses SRP to "a server not supporting it" but modern stunnel versions
# will silently accept it and remain happy
# silently accept it and remain happy
323
#
594

View file

@ -94,7 +94,7 @@ sub parseprotocols {
# Generate a "proto-ipv6" version of each protocol to match the
# IPv6 <server> name and a "proto-unix" to match the variant which
# uses Unix domain sockets. This works even if support is not
# compiled in because the <features> test will fail.
# compiled in because the <features> test fails.
push @protocols, map(("$_-ipv6", "$_-unix"), @protocols);
# 'http-proxy' is used in test cases to do CONNECT through

View file

@ -26,7 +26,7 @@
#
# Python3 program to print all combination of size r in an array of size n.
# This is used to generate test lines in tests/ech_test.sh.
# This will be discarded in the process of moving from experimental,
# This is discarded in the process of moving from experimental,
# but is worth preserving for the moment in case of changes to the
# ECH command line args

View file

@ -253,9 +253,9 @@ fi
wolf_cnt=$($CURL "${CURL_PARAMS[@]}" -V 2> /dev/null | grep -c wolfSSL)
if ((wolf_cnt == 1)); then
using_wolf="yes"
# for some reason curl+wolfSSL dislikes certs that are ok
# for browsers, so we will test using "insecure" mode (-k)
# but that is ok here as we are only interested in ECH testing
# for some reason curl + wolfSSL dislikes certs that are ok
# for browsers, so we test using "insecure" mode (-k)
# but that is OK here as we are only interested in ECH testing
CURL_PARAMS+=(-k)
fi
# check if we have dig and it knows https or not
@ -474,7 +474,7 @@ done
# Check various command line options, if we are good so far
if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
# use this test URL as it will tell us if things worked
# use this test URL as it tells us if things worked
turl="https://defo.ie/ech-check.php"
echo "cli_test with $turl"
echo "cli_test with $turl" >> "$logfile"
@ -498,7 +498,7 @@ if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
# ecl:ecl can be correct, incorrect or missing
# ech:pn can be correct, incorrect or missing
# in all cases the "last" argument provided should "win"
# but only one of hard, true, grease or false will apply
# but only one of hard, true, grease or false applies
turl="https://defo.ie/ech-check.php"
echconfiglist=$(get_ech_configlist defo.ie)
goodecl=$echconfiglist
@ -790,7 +790,7 @@ if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
turl="https://tcd.ie"
echo "cli_test with $turl"
echo "cli_test with $turl" >> "$logfile"
# the params below do not matter much here as we will fail anyway
# the params below do not matter much here as we fail anyway
echconfiglist=$(get_ech_configlist defo.ie)
goodecl=$echconfiglist
badecl="$goodecl"

View file

@ -196,9 +196,9 @@ my $TEXT_PASSWORD = "secret";
my $POP3_TIMESTAMP = "<1972.987654321\@curl>";
#**********************************************************************
# exit_signal_handler will be triggered to indicate that the program
# exit_signal_handler is triggered to indicate that the program
# should finish its execution in a controlled way as soon as possible.
# For now, program will also terminate from within this handler.
# For now, program also terminates from within this handler.
#
sub exit_signal_handler {
my $signame = shift;
@ -227,9 +227,9 @@ sub ftpmsg {
}
#**********************************************************************
# eXsysread is a wrapper around perl's sysread() function. This will
# repeat the call to sysread() until it has actually read the complete
# number of requested bytes or an unrecoverable condition occurs.
# eXsysread is a wrapper around perl's sysread() function. This repeats
# the call to sysread() until it has actually read the complete number
# of requested bytes or an unrecoverable condition occurs.
# On success returns a positive value, the number of bytes requested.
# On failure or timeout returns zero.
#
@ -531,7 +531,7 @@ sub senddata {
#**********************************************************************
# protocolsetup initializes the 'displaytext' and 'commandfunc' hashes
# for the given protocol. References to protocol command callbacks are
# stored in 'commandfunc' hash, and text which will be returned to the
# stored in 'commandfunc' hash, and text which is returned to the
# client before the command callback runs is stored in 'displaytext'.
#
sub protocolsetup {

View file

@ -54,7 +54,7 @@ my $trace=0;
# Normalize the part function arguments for proper caching. This includes the
# filename in the arguments since that is an implied parameter that affects the
# return value. Any error messages will only be displayed the first time, but
# return value. Any error messages are only displayed the first time, but
# those are disabled by default anyway, so should never been seen outside
# development.
sub normalize_part {
@ -195,7 +195,7 @@ sub partexists {
}
# The code currently never calls this more than once per part per file, so
# caching a result that will never be used again just slows things down.
# caching a result that is never used again just slows things down.
# memoize('partexists', NORMALIZER => 'normalize_part'); # cache each result
sub loadtest {

View file

@ -110,7 +110,7 @@ our $pwd = getcwd(); # current working directory
our $srcdir = $ENV{'srcdir'} || '.'; # root of the test source code
our $perlcmd=shell_quote($^X);
our $perl="$perlcmd -I. " . shell_quote("-I$srcdir"); # invoke perl like this
our $LOGDIR="log"; # root of the log directory; this will be different for
our $LOGDIR="log"; # root of the log directory; this is different for
# each runner in multiprocess mode
our $LIBDIR=dirsepadd("./libtest/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
our $UNITDIR=dirsepadd("./unit/" . ($ENV{'CURL_DIRSUFFIX'} || ''));

View file

@ -169,12 +169,12 @@ static CURLcode test_cli_upload_pausing(const char *URL)
/* We want to use our own read function. */
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* It will help us to continue the read function. */
/* It helps us to continue the read function. */
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback);
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, curl);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
/* It will help us to ensure that keepalive does not help. */
/* It helps us to ensure that keepalive does not help. */
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 1L);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 1L);

View file

@ -366,7 +366,7 @@ if($tstunnel_windows) {
# Put an "exec" in front of the command so that the child process
# keeps this child's process ID by being tied to the spawned shell.
exec("exec $cmd") || die "Cannot exec() $cmd: $!";
# exec() will create a new process, but ties the existence of the
# exec() creates a new process, but ties the existence of the
# new process to the parent waiting perl.exe and sh.exe processes.
# exec() should never return back here to this process. We protect

View file

@ -1348,7 +1348,7 @@ sub runhttpsserver {
if($httpspid <= 0 || !pidexists($httpspid)) {
# it is NOT alive
# do not call stopserver since that will also kill the dependent
# do not call stopserver since that also kills the dependent
# server that has already been started properly
$doesntrun{$pidfile} = 1;
$httpspid = $pid2 = 0;
@ -1552,7 +1552,7 @@ sub runsecureserver {
if($protospid <= 0 || !pidexists($protospid)) {
# it is NOT alive
# do not call stopserver since that will also kill the dependent
# do not call stopserver since that also kills the dependent
# server that has already been started properly
$doesntrun{$pidfile} = 1;
$protospid = $pid2 = 0;

View file

@ -125,7 +125,7 @@ def smbserver(options):
smb_config.set("SERVER", "share type", "0")
smb_config.set("SERVER", "path", SERVER_MAGIC)
# Have a share for tests. These files will be autogenerated from the
# Have a share for tests. These files are auto-generated from the
# test input.
smb_config.add_section("TESTS")
smb_config.set("TESTS", "comment", "tests")
@ -146,7 +146,7 @@ def smbserver(options):
# Start a thread that cleanly shuts down the server on a signal
with ShutdownHandler(smb_server):
# This will block until smb_server.shutdown() is called
# This blocks until smb_server.shutdown() is called
smb_server.serve_forever()
return 0

View file

@ -1186,7 +1186,7 @@ if($sshdid =~ /OpenSSH-Windows/) {
# Put an "exec" in front of the command so that the child process
# keeps this child's process ID by being tied to the spawned shell.
exec("exec $cmd") || die "Cannot exec() $cmd: $!";
# exec() will create a new process, but ties the existence of the
# exec() creates a new process, but ties the existence of the
# new process to the parent waiting perl.exe and sh.exe processes.
# exec() should never return back here to this process. We protect

View file

@ -62,7 +62,7 @@ my @syms;
my %doc;
my %rem;
# scanenum runs the preprocessor on curl.h so it will process all enums
# scanenum runs the preprocessor on curl.h so it processes all enums
# included by it, which *should* be all headers
sub scanenum {
my ($file) = @_;

View file

@ -71,7 +71,7 @@ my @logmessages; # array holding logged messages
#
# logmsg must only be called by one of the runner_* entry points and functions
# called by them, or else logs risk being lost, since those are the only
# functions that know about and will return buffered logs.
# functions that know about and return buffered logs.
sub logmsg {
if(!scalar(@_)) {
return;

View file

@ -35,7 +35,7 @@ struct test_1666 {
CURLcode result_exp;
};
/* the size of the object needs to deduct the null terminator */
/* the size of the object needs to deduct the null-terminator */
#define OID(x) x, sizeof(x) - 1
static bool test1666(const struct test_1666 *spec, size_t i,

View file

@ -66,7 +66,7 @@ static bool test1667(const struct test_1667 *spec, size_t i,
}
else if(!result) {
/* use strlen on the pointer instead of curlx_dyn_len() because for some
of these type, the code explicitly adds a null terminator which is then
of these type, the code explicitly adds a null-terminator which is then
counted as buffer size. */
size_t actual_len = strlen(curlx_dyn_ptr(dbuf));
if(strlen(spec->out) != actual_len) {