News for hackers. Stuff that matters.
Re:The perils of transition to 64-bit time_t by clhodapp on Saturday September 28, 2024 @06:58PM (#41683509)
Making the stable boundary be C headers is insane!

It means that there's not actually any sort of ABI, only a C source API.

Re:The perils of transition to 64-bit time_t by westurner on Saturday September 28, 2024 @09:28PM (#41684111)
cibuildwheel builds manylinux packages for glibc>= and musl because of this ABI.

manylinux: https://github.com/pypa/manylinux :

> Python wheels that work on any linux (almost)

Static Go binaries that make direct syscalls and do not depend upon libc or musl run within very minimal containers.

Fuschia's syscall docs are nice too; Linux plus additional syscalls.

Re:The perils of transition to 64-bit time_t by kazinator on Saturday September 28, 2024 @09:51PM (#41684214)
Headers can do the magic to select the right ABI more or less transparently, based on preprocessor symbols which indicate the selection: is a certain type 32 or 64.

This is similar to what Microsoft did in Win32 with the W and A functions (wide char and ascii/ansi). You just call MessageBox and the header file will map that to MessageBoxA or MessageBoxW based on whether you are a UNICODE build.

The character element type in the strings accepted by MessageBox is TCHAR. That can either be CHAR or WCHAR.

Once the code is compiled, it depends on the appropriate ABI: MessageBoxA or MessageBoxW; MessageBox doesn't exist; it is a source-level fiction, so to speak.