From 86f4e10cb03af034eb436dce24d79c16a5aade08 Mon Sep 17 00:00:00 2001
From: Rob Landley
Date: Mon, 2 Mar 2020 14:52:16 -0600
Subject: Update the LP64 section.
---
www/design.html | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/www/design.html b/www/design.html
index b2595fd4..e6519135 100644
--- a/www/design.html
+++ b/www/design.html
@@ -351,13 +351,25 @@ are always the same size (on both 32 and 64 bit). Pointer and int are _not_
the same size on 64 bit systems, but pointer and long are.
This is guaranteed by the LP64 memory model, a Unix standard (which Linux
and MacOS X both implement, and which modern 64 bit processors such as
-x86-64 were designed for). See
-the LP64 standard and
-the LP64
-rationale for details.
+x86-64 were designed for).
+
+Back
+before unix.org went down, they hosted the
+LP64 standard and
+the LP64 rationale, but the important part is
+LP64 gives all the basic C integer types defined sizes:
+
+
+C type | 32 bit sizeof | 64 bit sizeof |
+char | 1 byte | 1 byte |
+short | 2 bytes | 2 bytes |
+int | 4 bytes | 4 bytes |
+long | 4 bytes | 8 bytes |
+long long | 8 bytes | 8 bytes |
+
Note that Windows doesn't work like this, and I don't care.
-The
+The
insane legacy reasons why this is broken on Windows are explained here.
Signedness of char
--
cgit v1.2.3