Skip to content

feat(c/time): restore native clock and calendar APIs - #51

Draft
MeteorsLiu wants to merge 4 commits into
goplus:mainfrom
MeteorsLiu:codex/c-time-native-bindings
Draft

MeteorsLiu wants to merge 4 commits into
goplus:mainfrom
MeteorsLiu:codex/c-time-native-bindings

Conversation

@MeteorsLiu

@MeteorsLiu MeteorsLiu commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Restore native clock and calendar APIs from unified libc generation.

The implementation includes:

  • Generate the macOS 14 and glibc 2.24 time headers for macOS arm64 and Linux amd64/arm64.
  • Use generated declarations for compatible existing clock and calendar entry points, preserving their names and global calling forms.
  • Retain Ctime and Strftime compatibility declarations where the raw character-pointer types differ, without changing root c.Char.
  • Pass layout, calendar conversion, output-buffer, and clock-query tests with GC and nogc on all three targets.

The cleanup removes duplicate native names while preserving existing C symbol coverage.

@MeteorsLiu

MeteorsLiu commented Oct 19, 2026 •

Copy link
Copy Markdown
Member Author

Merge order: #45 → #51 → #48 → #49 → #44 → #47 → #46 → #50 → #52.

Each draft changes one folder only. This refresh regenerates native APIs without omitting functions merely to preserve handwritten entry points. Existing compatibility APIs remain available; colliding native names use the Native prefix.

The combined prerequisite snapshot passes llgo build and executed llgo test runs on macOS arm64, Linux amd64 and Linux arm64, both with GC and -tags=nogc (54 package test runs and 6 complete builds). Generation uses unmodified llcppg main da227ff4, macOS SDK 14.0 and Bootlin glibc 2.24 headers. The earlier Timeval receiver and Signal layout failures are resolved.

These PRs remain draft for review. Documented generator/ABI failures and previously approved va_list exclusions remain; there are zero handwritten-retention exclusions.

@MeteorsLiu MeteorsLiu changed the title feat(c/time): add classified native time APIs feat(c/time): restore native clock and calendar APIs Oct 20, 2026
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.

1 participant