Skip to content

urldata: convert 'long' fields to fixed variable types - #20227

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/more-urldata-long
Closed

bagder wants to merge 1 commit into
masterfrom
bagder/more-urldata-long

Conversation

@bagder

@bagder bagder commented Jan 9, 2026 •

Copy link
Copy Markdown
Member

Makes sure they work identically cross-platform, as long varies in size
between Windows vs non-Windows. Makes Curl_easy 16 bytes smaller on 64
bit Linux.

This reduces support for the RTSP cseq counters to 32 bit (down from 63
bit previously on 64 bit non-Windows), but it is probably safe.
Implementations probably rarely support anything above 32 bits anyway
and this is how curl has worked on Windows since always.

There is now only one 'long' left in urldata.h (in the ssl_config_data
struct). That field, certverifyresult, is used to store the response
code from TLS backend code and in the OpenSSL case that function returns
an actual 'long'.

Comment thread lib/urldata.h Resolved
bagder added a commit that referenced this pull request Jan 9, 2026
Makes sure they work identically cross-platform, as long varies in size
between Windows vs non-Windows. Makes Curl_easy 16 bytes smaller on 64
bit Linux.

This reduces support for the RTSP cseq counters to 32 bit (down from 63
bit previously on 64 bit non-Windows), but it is probably safe.
Implementations probably rarely support anything above 32 bits anyway
and this is how curl has worked on Windows since always.

There is now only one 'long' left in urldata.h (in the ssl_config_data
struct). That field, certverifyresult, is used to store the response
code from TLS backend code and in the OpenSSL case that function returns
an actual 'long'.

Closes #20227
@bagder
bagder force-pushed the bagder/more-urldata-long branch from 997427c to b2dfa27 Compare January 9, 2026 10:17
@testclutch

Copy link
Copy Markdown

Analysis of PR #20227 at b276df6f:

Test 570 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 60 different CI jobs (the link just goes to one of them).

Generated by Testclutch

Makes sure they work identically cross-platform, as long varies in size
between Windows vs non-Windows. Makes Curl_easy 16 bytes smaller on 64
bit Linux.

This reduces support for the RTSP cseq counters to 32 bit (down from 63
bit previously on 64 bit non-Windows), but it is probably safe.
Implementations probably rarely support anything above 32 bits anyway
and this is how curl has worked on Windows since always.

There is now only one 'long' left in urldata.h (in the ssl_config_data
struct). That field, certverifyresult, is used to store the response
code from TLS backend code and in the OpenSSL case that function returns
an actual 'long'.

Closes #20227
@bagder
bagder force-pushed the bagder/more-urldata-long branch from e28aaca to d371a52 Compare January 9, 2026 12:31
@bagder
bagder marked this pull request as ready for review January 9, 2026 12:36
@bagder bagder closed this in d881b91 Jan 9, 2026
@bagder
bagder deleted the bagder/more-urldata-long branch January 9, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants