From: Viktor Szakats Date: Tue, 16 Dec 2025 19:01:16 +0000 (+0100) Subject: badwords: catch and fix threading-related words X-Git-Url: https://git.feebdaed.xyz/?a=commitdiff_plain;h=61273f58125c41a84febe90a50238ee7fb12a9ad;p=0xmirror%2Fcurl.git badwords: catch and fix threading-related words Also: - sync newlines between the two threaded examples. Closes #20001 --- diff --git a/.github/scripts/badwords.txt b/.github/scripts/badwords.txt index 9e43c03fa8..c5f91795dc 100644 --- a/.github/scripts/badwords.txt +++ b/.github/scripts/badwords.txt @@ -10,6 +10,9 @@ tool chain:toolchain tool-chain:toolchain wild-card:wildcard wild card:wildcard +\bthread ?safe[^."t]:thread-safe +\bthread ?unsafe[^."t]:thread-unsafe +multi ?thread:multi-thread \bit's:it is aren't:are not can't:cannot diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8c70d4e7f1..d8e311f7f0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -107,7 +107,7 @@ This release includes the following bugfixes: o example: fix formatting nits [232] o examples/crawler: fix variable [92] o examples/multi-uv: fix invalid req->data access [177] - o examples/multithread: fix race condition [101] + o examples/threaded: fix race condition [101] o examples: fix minor typo [203] o examples: make functions/data static where missing [139] o examples: tidy-up headers and includes [138] diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore index 788eefe1ef..ffda1ce70a 100644 --- a/docs/examples/.gitignore +++ b/docs/examples/.gitignore @@ -79,7 +79,6 @@ multi-legacy multi-post multi-single multi-uv -multithread netrc parseurl persistent @@ -123,6 +122,7 @@ smtp-tls smtp-vrfy sslbackend synctime +threaded threaded-ssl unixsocket url2file diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc index 29c4e3e997..39b2efcd59 100644 --- a/docs/examples/Makefile.inc +++ b/docs/examples/Makefile.inc @@ -146,8 +146,8 @@ check_PROGRAMS = \ COMPLICATED_MAY_BUILD = \ cacertinmem.c \ multi-uv.c \ - multithread.c \ sessioninfo.c \ + threaded.c \ threaded-ssl.c \ usercertinmem.c diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index 7becf51169..162c4c0d36 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -161,7 +161,7 @@ static int my_trace(CURL *curl, curl_infotype type, known_offset = 1; } secs = epoch_offset + tv.tv_sec; - now = localtime(&secs); /* not thread safe but we do not care */ + now = localtime(&secs); /* not thread-safe but we do not care */ snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld", now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec); diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c deleted file mode 100644 index 3d2f1df7de..0000000000 --- a/docs/examples/multithread.c +++ /dev/null @@ -1,112 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) Daniel Stenberg, , 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 - * - ***************************************************************************/ -/* - * A multi-threaded program using pthreads to fetch several files at once - * - */ - -/* Requires: HAVE_PTHREAD_H */ - -#include - -#include - -#include - -#define NUMT 4 - -/* - List of URLs to fetch. - - If you intend to use an SSL-based protocol here you might need to setup TLS - library mutex callbacks as described here: - - https://curl.se/libcurl/c/threadsafe.html - -*/ -static const char * const urls[NUMT] = { - "https://curl.se/", - "ftp://example.com/", - "https://example.net/", - "www.example" -}; - -struct targ { - const char *url; -}; - -static void *pull_one_url(void *p) -{ - CURL *curl; - struct targ *targ = p; - - curl = curl_easy_init(); - if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, targ->url); - (void)curl_easy_perform(curl); /* ignores error */ - curl_easy_cleanup(curl); - } - - return NULL; -} - -/* - int pthread_create(pthread_t *new_thread_ID, - const pthread_attr_t *attr, - void * (*start_func)(void *), void *arg); -*/ - -int main(void) -{ - CURLcode res; - pthread_t tid[NUMT]; - struct targ targs[NUMT]; - int i; - - /* Must initialize libcurl before any threads are started */ - res = curl_global_init(CURL_GLOBAL_ALL); - if(res) - return (int)res; - - for(i = 0; i < NUMT; i++) { - int error; - targs[i].url = urls[i]; - error = pthread_create(&tid[i], - NULL, /* default attributes please */ - pull_one_url, - (void *)&targs[i]); - if(error) - fprintf(stderr, "Could not run thread number %d, errno %d\n", i, error); - else - fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]); - } - - /* now wait for all threads to terminate */ - for(i = 0; i < NUMT; i++) { - pthread_join(tid[i], NULL); - fprintf(stderr, "Thread %d terminated\n", i); - } - curl_global_cleanup(); - return 0; -} diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c index 6bf8946721..bf165f7e42 100644 --- a/docs/examples/smooth-gtk-thread.c +++ b/docs/examples/smooth-gtk-thread.c @@ -22,8 +22,8 @@ * ***************************************************************************/ /* - * A multi threaded application that uses a progress bar to show - * status. It uses Gtk+ to make a smooth pulse. + * A multi-threaded application that uses a progress bar to show + * status. It uses Gtk+ to make a smooth pulse. * */ /* diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c index 8d5d1234fc..d8053d3ccc 100644 --- a/docs/examples/threaded-ssl.c +++ b/docs/examples/threaded-ssl.c @@ -29,7 +29,7 @@ /* A multi-threaded example that uses pthreads and fetches 4 remote files at * once over HTTPS. * - * Recent versions of OpenSSL and GnuTLS are thread safe by design, assuming + * Recent versions of OpenSSL and GnuTLS are thread-safe by design, assuming * support for the underlying OS threading API is built-in. Older revisions * of this example demonstrated locking callbacks for the SSL library, which * are no longer necessary. An older revision with callbacks can be found at @@ -40,7 +40,9 @@ /* Also requires TLS support to run */ #include + #include + #include #define NUMT 4 diff --git a/docs/examples/threaded.c b/docs/examples/threaded.c new file mode 100644 index 0000000000..4e56312cbd --- /dev/null +++ b/docs/examples/threaded.c @@ -0,0 +1,114 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) Daniel Stenberg, , 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 + * + ***************************************************************************/ +/* + * A multi-threaded program using pthreads to fetch several files at once + * + */ + +/* Requires: HAVE_PTHREAD_H */ + +#include + +#include + +#include + +#define NUMT 4 + +/* + List of URLs to fetch. + + If you intend to use an SSL-based protocol here you might need to setup TLS + library mutex callbacks as described here: + + https://curl.se/libcurl/c/threadsafe.html + +*/ +static const char * const urls[NUMT] = { + "https://curl.se/", + "ftp://example.com/", + "https://example.net/", + "www.example" +}; + +struct targ { + const char *url; +}; + +static void *pull_one_url(void *p) +{ + CURL *curl; + struct targ *targ = p; + + curl = curl_easy_init(); + if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, targ->url); + (void)curl_easy_perform(curl); /* ignores error */ + curl_easy_cleanup(curl); + } + + return NULL; +} + +/* + int pthread_create(pthread_t *new_thread_ID, + const pthread_attr_t *attr, + void * (*start_func)(void *), void *arg); +*/ + +int main(void) +{ + CURLcode res; + pthread_t tid[NUMT]; + struct targ targs[NUMT]; + int i; + + /* Must initialize libcurl before any threads are started */ + res = curl_global_init(CURL_GLOBAL_ALL); + if(res) + return (int)res; + + for(i = 0; i < NUMT; i++) { + int error; + targs[i].url = urls[i]; + error = pthread_create(&tid[i], + NULL, /* default attributes please */ + pull_one_url, + (void *)&targs[i]); + if(error) + fprintf(stderr, "Could not run thread number %d, errno %d\n", i, error); + else + fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]); + } + + /* now wait for all threads to terminate */ + for(i = 0; i < NUMT; i++) { + pthread_join(tid[i], NULL); + fprintf(stderr, "Thread %d terminated\n", i); + } + + curl_global_cleanup(); + + return 0; +} diff --git a/docs/libcurl/curl_global_cleanup.md b/docs/libcurl/curl_global_cleanup.md index 60a761ed5c..1c3dac9aa3 100644 --- a/docs/libcurl/curl_global_cleanup.md +++ b/docs/libcurl/curl_global_cleanup.md @@ -40,7 +40,7 @@ If this is not thread-safe, you must not call this function when any other thread in the program (i.e. a thread sharing the same memory) is running. This does not just mean no other thread that is using libcurl. Because curl_global_cleanup(3) calls functions of other libraries that are -similarly thread unsafe, it could conflict with any other thread that uses +similarly thread-unsafe, it could conflict with any other thread that uses these other libraries. See the description in libcurl(3) of global environment requirements for diff --git a/docs/libcurl/curl_global_init.md b/docs/libcurl/curl_global_init.md index 724f90cddc..093a530351 100644 --- a/docs/libcurl/curl_global_init.md +++ b/docs/libcurl/curl_global_init.md @@ -52,7 +52,7 @@ If this is not thread-safe (the bit mentioned above is not set), you must not call this function when any other thread in the program (i.e. a thread sharing the same memory) is running. This does not just mean no other thread that is using libcurl. Because curl_global_init(3) calls functions of other libraries -that are similarly thread unsafe, it could conflict with any other thread that +that are similarly thread-unsafe, it could conflict with any other thread that uses these other libraries. If you are initializing libcurl from a Windows DLL you should not initialize diff --git a/docs/libcurl/curl_global_trace.md b/docs/libcurl/curl_global_trace.md index 10ec21b4bd..fa08df7c72 100644 --- a/docs/libcurl/curl_global_trace.md +++ b/docs/libcurl/curl_global_trace.md @@ -43,7 +43,7 @@ If this is not thread-safe, you must not call this function when any other thread in the program (i.e. a thread sharing the same memory) is running. This does not just mean no other thread that is using libcurl. Because curl_global_init(3) may call functions of other libraries that are similarly -thread unsafe, it could conflict with any other thread that uses these other +thread-unsafe, it could conflict with any other thread that uses these other libraries. If you are initializing libcurl from a Windows DLL you should not initialize diff --git a/docs/libcurl/libcurl-thread.md b/docs/libcurl/libcurl-thread.md index ef7ae9b7d9..a56f6b19c8 100644 --- a/docs/libcurl/libcurl-thread.md +++ b/docs/libcurl/libcurl-thread.md @@ -17,7 +17,7 @@ libcurl-thread - libcurl thread safety # Multi-threading with libcurl -libcurl is thread safe but has no internal thread synchronization. You may have +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 below. @@ -84,10 +84,10 @@ the former signal handler while another thread should still ignore it. # Name resolving The **gethostbyname** or **getaddrinfo** and other name resolving system -calls used by libcurl are provided by your operating system and must be thread -safe. It is important that libcurl can find and use thread safe versions of -these and other system calls, as otherwise it cannot function fully thread -safe. Some operating systems are known to have faulty thread +calls used by libcurl are provided by your operating system and must be +thread-safe. It is important that libcurl can find and use thread-safe versions +of these and other system calls, as otherwise it cannot function fully +thread-safe. Some operating systems are known to have faulty thread implementations. We have previously received problem reports on *BSD (at least in the past, they may be working fine these days). Some operating systems that are known to have solid and working thread support are Linux, Solaris and @@ -110,7 +110,7 @@ libcurl(3) section **GLOBAL CONSTANTS**. # Memory functions These functions, provided either by your operating system or your own -replacements, must be thread safe. You can use curl_global_init_mem(3) +replacements, must be thread-safe. You can use curl_global_init_mem(3) to set your own replacement memory functions. # Non-safe functions diff --git a/docs/libcurl/libcurl-tutorial.md b/docs/libcurl/libcurl-tutorial.md index a5bebc6655..6cfe354fc1 100644 --- a/docs/libcurl/libcurl-tutorial.md +++ b/docs/libcurl/libcurl-tutorial.md @@ -272,7 +272,7 @@ all the details needed to get the file moved from one machine to another. # Multi-threading Issues -libcurl is thread safe but there are a few exceptions. Refer to +libcurl is thread-safe but there are a few exceptions. Refer to libcurl-thread(3) for more information. # When It does not Work diff --git a/docs/libcurl/libcurl.md b/docs/libcurl/libcurl.md index b6d4af36e3..47bf210087 100644 --- a/docs/libcurl/libcurl.md +++ b/docs/libcurl/libcurl.md @@ -129,7 +129,7 @@ the same, on any of the platforms it compiles and builds on. # THREADS -libcurl is thread safe but there are a few exceptions. Refer to +libcurl is thread-safe but there are a few exceptions. Refer to libcurl-thread(3) for more information. # PERSISTENT CONNECTIONS @@ -176,7 +176,7 @@ 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. -If the global constant functions are *not thread safe*, then you must +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 is not good enough that no other thread is using libcurl at the time, because these functions internally call similar functions of other @@ -184,7 +184,7 @@ libraries, and those functions are similarly thread-unsafe. You cannot generally know what these libraries are, or whether other threads are using them. -If the global constant functions are *not thread safe*, then the basic rule +If the global constant functions are *not thread-safe*, then the basic rule for constructing a program that uses libcurl is this: Call curl_global_init(3), with a *CURL_GLOBAL_ALL* argument, immediately after the program starts, while it is still only one thread and before it uses diff --git a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md index 67fba79142..0bc37a6a4e 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md +++ b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md @@ -51,7 +51,7 @@ int main(void) if(curl) { CURLcode ret; curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); - /* switch off the use of a global, thread unsafe, cache */ + /* switch off the use of a global, thread-unsafe, cache */ curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 0L); ret = curl_easy_perform(curl); curl_easy_cleanup(curl); diff --git a/include/curl/easy.h b/include/curl/easy.h index 85cfd830f7..5b3cdbd64e 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -66,7 +66,7 @@ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); * Creates a new curl session handle with the same options set for the handle * passed in. Duplicating a handle could only be a matter of cloning data and * options, internal state info and things like persistent connections cannot - * be transferred. It is useful in multithreaded applications when you can run + * be transferred. It is useful in multi-threaded applications when you can run * curl_easy_duphandle() for each new thread to avoid a series of identical * curl_easy_setopt() invokes in every thread. */ diff --git a/lib/amigaos.c b/lib/amigaos.c index d32ee5e790..d4c1c2c856 100644 --- a/lib/amigaos.c +++ b/lib/amigaos.c @@ -116,7 +116,7 @@ void Curl_amiga_cleanup(void) * Because we need to handle the different cases in hostip4.c at runtime, * not at compile-time, based on what was detected in Curl_amiga_init(), * we replace it completely with our own as to not complicate the baseline - * code. Assumes malloc/calloc/free are thread safe because Curl_he2ai() + * code. Assumes malloc/calloc/free are thread-safe because Curl_he2ai() * allocates memory also. */ @@ -144,7 +144,7 @@ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, int port) } else { #ifdef CURLRES_THREADED - /* gethostbyname() is not thread safe, so we need to reopen bsdsocket + /* gethostbyname() is not thread-safe, so we need to reopen bsdsocket * on the thread's context */ struct Library *base = OpenLibrary("bsdsocket.library", 4); diff --git a/lib/config-os400.h b/lib/config-os400.h index ab7f670d83..ec6c002efd 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -38,9 +38,9 @@ /* OS400 supports a 3-argument ASCII version of gethostbyaddr_r(), but its * prototype is incompatible with the "standard" one (1st argument is not * const). However, getaddrinfo() is supported (ASCII version defined as - * a local wrapper in setup-os400.h) in a threadsafe way: we can then + * a local wrapper in setup-os400.h) in a thread-safe way: we can then * configure getaddrinfo() as such and get rid of gethostbyname_r() without - * loss of threadsafeness. */ + * loss of thread-safeness. */ #undef HAVE_GETHOSTBYNAME_R #undef HAVE_GETHOSTBYNAME_R_3 #undef HAVE_GETHOSTBYNAME_R_5 diff --git a/lib/hostip.h b/lib/hostip.h index 3672a03506..8b3b962078 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -131,7 +131,7 @@ void Curl_dnscache_prune(struct Curl_easy *data); /* clear the DNS cache */ void Curl_dnscache_clear(struct Curl_easy *data); -/* IPv4 threadsafe resolve function used for synch and asynch builds */ +/* IPv4 thread-safe resolve function used for synch and asynch builds */ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, int port); CURLcode Curl_once_resolved(struct Curl_easy *data, diff --git a/lib/hostip4.c b/lib/hostip4.c index ada0211769..9d5987c68a 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -93,10 +93,10 @@ struct Curl_addrinfo *Curl_sync_getaddrinfo(struct Curl_easy *data, #if defined(CURLRES_IPV4) && !defined(CURLRES_ARES) && !defined(CURLRES_AMIGA) /* - * Curl_ipv4_resolve_r() - ipv4 threadsafe resolver function. + * Curl_ipv4_resolve_r() - ipv4 thread-safe resolver function. * * This is used for both synchronous and asynchronous resolver builds, - * implying that only threadsafe code and function calls may be used. + * implying that only thread-safe code and function calls may be used. * */ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, @@ -153,7 +153,7 @@ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, &h_errnop); /* If the buffer is too small, it returns NULL and sets errno to - * ERANGE. The errno is thread safe if this is compiled with + * ERANGE. The errno is thread-safe if this is compiled with * -D_REENTRANT as then the 'errno' variable is a macro defined to get * used properly for threads. */ @@ -263,7 +263,7 @@ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, #else /* (HAVE_GETADDRINFO && HAVE_GETADDRINFO_THREADSAFE) || HAVE_GETHOSTBYNAME_R */ /* - * Here is code for platforms that do not have a thread safe + * Here is code for platforms that do not have a thread-safe * getaddrinfo() nor gethostbyname_r() function or for which * gethostbyname() is the preferred one. */ diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 8d15a8a162..62a33021ba 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -176,7 +176,7 @@ CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy) #ifdef USE_WINDOWS_SSPI if(!Curl_pSecFn) { - /* not thread safe and leaks - use curl_global_init() to avoid */ + /* not thread-safe and leaks - use curl_global_init() to avoid */ CURLcode err = Curl_sspi_global_init(); if(!Curl_pSecFn) return err; diff --git a/lib/memdebug.c b/lib/memdebug.c index 05cd45a6f9..7587a1001c 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -52,7 +52,7 @@ struct memdebug { * For advanced analysis, record a log file and write perl scripts to analyze * them! * - * Do not use these with multithreaded test programs! + * Do not use these with multi-threaded test programs! */ FILE *curl_dbg_logfile = NULL; diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index b9e462342a..9e88367737 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -149,7 +149,7 @@ static ssize_t gtls_pull(void *s, void *buf, size_t blen) * gtls_init() * * Global GnuTLS init, called from Curl_ssl_init(). This calls functions that - * are not thread-safe (It is thread safe since GnuTLS 3.3.0) and thus this + * are not thread-safe (It is thread-safe since GnuTLS 3.3.0) and thus this * function itself is not thread-safe and must only be called from within * curl_global_init() to keep the thread situation under control! * diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index 932b1de2d9..52885d84a8 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -1265,7 +1265,7 @@ 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 to find out if getaddrinfo happens to be threadsafe, +dnl to find out if getaddrinfo happens to be thread-safe, dnl defining HAVE_GETADDRINFO_THREADSAFE when true. AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ @@ -1414,7 +1414,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ fi # if test "$curl_cv_func_getaddrinfo" = "yes"; then - AC_MSG_CHECKING([if getaddrinfo is threadsafe]) + AC_MSG_CHECKING([if getaddrinfo is thread-safe]) if test "$curl_cv_apple" = "yes"; then dnl Darwin 6.0 and macOS 10.2.X and newer tst_tsafe_getaddrinfo="yes" @@ -1479,7 +1479,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ AC_MSG_RESULT([$tst_tsafe_getaddrinfo]) if test "$tst_tsafe_getaddrinfo" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1, - [Define to 1 if the getaddrinfo function is threadsafe.]) + [Define to 1 if the getaddrinfo function is thread-safe.]) curl_cv_func_getaddrinfo_threadsafe="yes" else curl_cv_func_getaddrinfo_threadsafe="no" diff --git a/tests/server/util.c b/tests/server/util.c index 043de037ae..529ead7b86 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -407,7 +407,7 @@ static void exit_signal_handler(int signum) * SIGINT is not supported for any Win32 application. When a CTRL+C * interrupt occurs, Win32 operating systems generate a new thread * to specifically handle that interrupt. This can cause a single-thread - * application, such as one in UNIX, to become multithreaded and cause + * application, such as one in UNIX, to become multi-threaded and cause * unexpected behavior. * [...] * The SIGKILL and SIGTERM signals are not generated under Windows.