← Commit list

a935481d4e

Jay Satiro
Jay Satiro
2026-09-12
SUCCESS Duration: 394s

Subject

lib: CURL_GLOBAL_WIN32 -> CURL_GLOBAL_WINSOCK

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/libcurl/curl_global_init.md+7 -3
@@ -84,22 +84,26 @@ backend libcurl uses.
Doing TLS based transfers without having the TLS layer initialized may lead to
unexpected behaviors.
-## CURL_GLOBAL_WIN32
+## CURL_GLOBAL_WINSOCK
-Initialize the Win32 socket libraries.
+Initialize the Windows sockets library (Winsock).
The implication here is that if this bit is not set, the initialization of
Winsock has to be done by the application or you risk getting undefined
behaviors. This option exists for when the initialization is handled outside
of libcurl so there is no need for libcurl to do it again.
+Prior to 8.23.0 this flag was called CURL_GLOBAL_WIN32. The name was changed
+to eliminate confusion. Most of libcurl's Windows initialization is required
+and is not controlled by this flag.
+
## CURL_GLOBAL_NOTHING
Initialize nothing extra. This sets no bit.
## CURL_GLOBAL_DEFAULT
-A sensible default. It initializes both SSL and Win32. Right now, this equals
+A sensible default. It initializes both SSL and Winsock. Right now, this equals
the functionality of the **CURL_GLOBAL_ALL** mask.
## CURL_GLOBAL_ACK_EINTR
docs/libcurl/libcurl-tutorial.md+2 -2
@@ -109,10 +109,10 @@ initialize. Using *CURL_GLOBAL_ALL* makes it initialize all known internal
sub modules, and might be a good default option. The current two bits that are
specified are:
-## CURL_GLOBAL_WIN32
+## CURL_GLOBAL_WINSOCK
which only does anything on Windows machines. When used on a Windows machine,
-it makes libcurl initialize the Win32 socket stuff. Without having that
+it makes libcurl initialize the Windows socket stuff. Without having that
initialized properly, your program cannot use sockets properly. You should
only do this once for each application, so if your program already does this
or of another library in use does it, you should not tell libcurl to do this
docs/libcurl/symbols-in-versions+2 -1
@@ -44,7 +44,8 @@ CURL_GLOBAL_ALL 7.8
CURL_GLOBAL_DEFAULT 7.8
CURL_GLOBAL_NOTHING 7.8
CURL_GLOBAL_SSL 7.8
-CURL_GLOBAL_WIN32 7.8.1
+CURL_GLOBAL_WIN32 7.8.1 8.23.0
+CURL_GLOBAL_WINSOCK 8.23.0
CURL_HAS_DECLSPEC_ATTRIBUTE 8.13.0
CURL_HET_DEFAULT 7.59.0
CURL_HTTP_VERSION_1_0 7.9.1
include/curl/curl.h+3 -2
@@ -3042,8 +3042,9 @@ typedef enum {
} curl_closepolicy;
#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
-#define CURL_GLOBAL_WIN32 (1 << 1)
-#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
+#define CURL_GLOBAL_WINSOCK (1 << 1)
+#define CURL_GLOBAL_WIN32 CURL_GLOBAL_WINSOCK /* for compatibility */
+#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WINSOCK)
#define CURL_GLOBAL_NOTHING 0
#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
#define CURL_GLOBAL_ACK_EINTR (1 << 2)
lib/easy.c+3 -7
@@ -159,20 +159,16 @@ static CURLcode global_init(long flags, bool memoryfuncs)
}
#endif
-#ifdef _WIN32
- /* CURL_GLOBAL_WIN32 controls the *optional* part of the initialization which
- is for Winsock at the moment. */
- if(flags & CURL_GLOBAL_WIN32) {
#ifdef USE_WINSOCK
+ /* CURL_GLOBAL_WINSOCK controls the *optional* part of the Windows
+ initialization which is for the Windows sockets library (Winsock). */
+ if(flags & CURL_GLOBAL_WINSOCK) {
WSADATA wsa;
if(WSAStartup(MAKEWORD(2, 2), &wsa)) {
DEBUGF(curl_mfprintf(stderr, "Error: WSAStartup() failed\n"));
goto fail;
}
winsock_initialized = TRUE;
-#elif defined(USE_LWIPSOCK)
- lwip_init();
-#endif
}
#endif
projects/OS400/curl.inc.in+1 -1
@@ -79,7 +79,7 @@
*
d CURL_GLOBAL_SSL...
d c X'00000001'
- d CURL_GLOBAL_WIN32...
+ d CURL_GLOBAL_WINSOCK...
d c X'00000002'
d CURL_GLOBAL_ALL...
d c X'00000003'