On Tue, 12 May 2026 12:27:27 +0800, makendo wrote:
Given the conservativeness of Microsoft on technical decisions
back then (they even went for 32-bit longs on 64-bit platforms
at the C ABI level) ...
Which was a bloody stupid thing to do. Dave Cutler was supposed to be creating a ?New Technology? OS, supposedly to be portable across
multiple architectures from that point on into the foreseeable future.
Didn?t he notice that 64-bit architectures were already making an
appearance in the Unix world?
Within the Windows API, 64 bit integers were there all along, so
both 32 bit and 64 bit programs just specify whether they want a 32
bit or 64 bit integer.
I'd quibble with the idea that POSIX was more forward looking at the
time. Compare time_t to FILETIME, for example - NT used 64 bit time
on a 32 bit system and didn't have a binary compatibility break to
deal with 2038. File sizes were also 64 bit from the start, whereas
POSIX ended up with _FILE_OFFSET_BITS and a different ABI for
programs with 64 bit file size support. Linux moved from 16 bit UIDs
to 32 bit in 2001 (another ABI break), etc, etc.
Not really, no. For example, there is a function to return a file
size, I think it is. It can cope with 64-bit sizes. But in the Win32
API, it returns the high half and low half as separate 32-bit
quantities. And it still does this even when running supposedly 64-bit
native code.
it makes sense to introduce a new ABI with 64-bit time_t...
All these changes just needed a recompile with appropriate compiler
flags to choose different ABIs. All the necessary integer sizes are
handled natively in all cases, without the need for fudges as with
Windows.
Note that POSIX also ended up with structs that split values into 32
bit types, such as timeval. Any interface that preceeds native 64
bit types is going to look similar.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,118 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 41:23:22 |
| Calls: | 14,341 |
| Calls today: | 1 |
| Files: | 186,357 |
| D/L today: |
26,645 files (8,560M bytes) |
| Messages: | 2,533,058 |