Skip to content

Drop the always true defined(SIZEOF_TIME_T) from the binary timestamp decoder - #765

Merged
larskanis merged 1 commit into
ged:masterfrom
czj:drop-always-true-sizeof-time-t-check
Oct 27, 2026
Merged

larskanis merged 1 commit into
ged:masterfrom
czj:drop-always-true-sizeof-time-t-check

Conversation

@czj

@czj czj commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

A one-line follow-up to #760, which I pushed a few minutes after you merged it, so it never made it in. pg_bin_dec_timestamp still guards its fast path with defined(SIZEOF_TIME_T) && SIZEOF_TIME_T >= 8, but Ruby's configure always defines SIZEOF_TIME_T in ruby/config.h (and win32/Makefile.sub does the same on mswin). Even where it didn't, an undefined identifier evaluates to 0 in #if, so SIZEOF_TIME_T >= 8 alone already keeps 32-bit time_t builds on the Time.at path.

No behavior change: pg_binary_decoder.o builds to identical __text and __cstring sections on master and on this branch (Ruby 4.0.9, arm64-darwin).

Would you rather take it as its own PR, or should I fold it into the next cleanup that touches this decoder?


🤖 Generated with Claude Code, but prompted, read, and verified by @czj, a caring human :)

Ruby's configure always defines it.
@larskanis
larskanis merged commit c377459 into ged:master Oct 27, 2026
34 of 35 checks passed
@czj
czj deleted the drop-always-true-sizeof-time-t-check branch October 28, 2026 04:29
@czj

czj commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the merging so fast :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants