aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/401-dlang-32bits.patch
blob: 6072546f7b22d603c92ed1bc7fcd094703806795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/libphobos/libdruntime/core/sys/posix/config.d	2019-10-29 15:54:05.000000000 +0900
+++ b/libphobos/libdruntime/core/sys/posix/config.d	2019-10-29 15:54:08.000000000 +0900
@@ -67,15 +67,21 @@ version (CRuntime_Glibc)
 }
 else version (CRuntime_Musl)
 {
+    // off_t is always 64 bits on Musl
     enum _FILE_OFFSET_BITS   = 64;

+    // Not present in Musl sources
     enum __REDIRECT          = false;

+    // Those three are irrelevant for Musl as it always uses 64 bits off_t
     enum __USE_FILE_OFFSET64 = _FILE_OFFSET_BITS == 64;
     enum __USE_LARGEFILE     = __USE_FILE_OFFSET64 && !__REDIRECT;
     enum __USE_LARGEFILE64   = __USE_FILE_OFFSET64 && !__REDIRECT;

-    enum __WORDSIZE=64;
+    version (D_LP64)
+        enum __WORDSIZE = 64;
+    else
+        enum __WORDSIZE = 32;
 }
 else version (CRuntime_UClibc)
 {