Repository navigation
Commit cdaaeb6
authored
compat.fribidi on macOS and Windows; compat.xdmcp without arc4random_buf (#571)
* compat.fribidi on macOS and Windows; compat.xdmcp without arc4random_buf
compat.fribidi declared a Linux build only, so every macOS and Windows build
that reaches it (openmui's text engine, pango) stopped at install. fribidi is
portable C99 whose tables ship in the tarball and whose two config headers are
written out here, so the same tarball serves all three platforms. The
generated config.h no longer claims <strings.h> and <memory.h>: lib/common.h
would include <strings.h>, which MSVC's headers do not have, and nothing in
lib/ uses a function from either.
compat.xdmcp declared HAVE_ARC4RANDOM_BUF, which assumes glibc 2.36+; on an
older sysroot (the aarch64 one) Key.c's call is an implicit declaration, an
error under C11. It now declares getentropy (glibc 2.25+) and lets Key.c's own
arc4random_buf emulation use it.
* compat.xdmcp: decide arc4random_buf from the libc, in config.h
The x86_64 sysroot's glibc (2.36+) declares arc4random_buf, so Key.c's own
static definition conflicts with it; the aarch64 sysroot's older glibc does
not, so a fixed HAVE_ARC4RANDOM_BUF is an implicit declaration there. A
generated config.h reads the libc's version macros and chooses: the libc's
arc4random_buf, or Key.c's emulation over getentropy (glibc 2.25+, musl).1 parent 2dd30cb commit cdaaeb6
2 files changed
Lines changed: 55 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
59 | 80 | | |
60 | 81 | | |
61 | 82 | | |
| |||
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
123 | | - | |
124 | | - | |
125 | 144 | | |
126 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
127 | 150 | | |
128 | 151 | | |
129 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
28 | 56 | | |
29 | 57 | | |
30 | 58 | | |
| |||
0 commit comments