mirror of
https://github.com/curl/curl.git
synced 2026-08-26 08:53:32 +03:00
lib: use correct printf flags for sockets and timediffs
Introduces CURL_FORMAT_SOCKET_T for outputting socket numbers. Fixes #10737 Reported-by: Gisle Vanem Closes #10855
This commit is contained in:
parent
9a607fd728
commit
8455013359
5 changed files with 51 additions and 20 deletions
|
|
@ -34,6 +34,23 @@ struct Curl_easy;
|
|||
struct connectdata;
|
||||
struct Curl_sockaddr_ex;
|
||||
|
||||
#ifndef SIZEOF_CURL_SOCKET_T
|
||||
/* configure and cmake check and set the define */
|
||||
# ifdef _WIN64
|
||||
# define SIZEOF_CURL_SOCKET_T 8
|
||||
# else
|
||||
/* default guess */
|
||||
# define SIZEOF_CURL_SOCKET_T 4
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if SIZEOF_CURL_SOCKET_T < 8
|
||||
# define CURL_FORMAT_SOCKET_T "d"
|
||||
#else
|
||||
# define CURL_FORMAT_SOCKET_T "qd"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The Curl_sockaddr_ex structure is basically libcurl's external API
|
||||
* curl_sockaddr structure with enough space available to directly hold any
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue