aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2025-02-06 19:11:50 +0100
committerThijs Schreijer <thijs@thijsschreijer.nl>2025-02-06 21:03:47 +0100
commit9160d1211f7ff51d08a039239b744da684ae70c2 (patch)
tree504ecde575478626635850e40bf09dff71927b7e
parent9e0790c5060c5346039f92f4c9d97a2dbc7316ed (diff)
downloadluasystem-9160d1211f7ff51d08a039239b744da684ae70c2.tar.gz
luasystem-9160d1211f7ff51d08a039239b744da684ae70c2.tar.bz2
luasystem-9160d1211f7ff51d08a039239b744da684ae70c2.zip
fix(terminal): failing NetBSD compilation, missing symbols
fixes #43
-rw-r--r--CHANGELOG.md4
-rw-r--r--src/term.c14
2 files changed, 13 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a64d29..7ae7189 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,10 @@ The scope of what is covered by the version number excludes:
28 28
29## Version history 29## Version history
30 30
31### unreleased
32
33- Fix: NetBSD fix compilation, undeclared directives
34
31### version 0.4.5, released 18-Dec-2024 35### version 0.4.5, released 18-Dec-2024
32 36
33- Fix: suppress a warning when building with clang 37- Fix: suppress a warning when building with clang
diff --git a/src/term.c b/src/term.c
index 4deb5f1..3a30d2b 100644
--- a/src/term.c
+++ b/src/term.c
@@ -166,7 +166,7 @@ static const struct ls_RegConst nix_console_i_flags[] = {
166 {"I_INLCR", CHECK_NIX_FLAG_OR_ZERO(INLCR)}, 166 {"I_INLCR", CHECK_NIX_FLAG_OR_ZERO(INLCR)},
167 {"I_IGNCR", CHECK_NIX_FLAG_OR_ZERO(IGNCR)}, 167 {"I_IGNCR", CHECK_NIX_FLAG_OR_ZERO(IGNCR)},
168 {"I_ICRNL", CHECK_NIX_FLAG_OR_ZERO(ICRNL)}, 168 {"I_ICRNL", CHECK_NIX_FLAG_OR_ZERO(ICRNL)},
169#if !defined(__APPLE__) && !defined(__FreeBSD__) 169#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
170 {"I_IUCLC", CHECK_NIX_FLAG_OR_ZERO(IUCLC)}, // Might not be available on all systems 170 {"I_IUCLC", CHECK_NIX_FLAG_OR_ZERO(IUCLC)}, // Might not be available on all systems
171#else 171#else
172 {"I_IUCLC", 0}, 172 {"I_IUCLC", 0},
@@ -181,7 +181,7 @@ static const struct ls_RegConst nix_console_i_flags[] = {
181static const struct ls_RegConst nix_console_o_flags[] = { 181static const struct ls_RegConst nix_console_o_flags[] = {
182 // Output flags (c_oflag) 182 // Output flags (c_oflag)
183 {"O_OPOST", CHECK_NIX_FLAG_OR_ZERO(OPOST)}, 183 {"O_OPOST", CHECK_NIX_FLAG_OR_ZERO(OPOST)},
184#if !defined(__APPLE__) && !defined(__FreeBSD__) 184#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
185 {"O_OLCUC", CHECK_NIX_FLAG_OR_ZERO(OLCUC)}, // Might not be available on all systems 185 {"O_OLCUC", CHECK_NIX_FLAG_OR_ZERO(OLCUC)}, // Might not be available on all systems
186#else 186#else
187 {"O_OLCUC", 0}, 187 {"O_OLCUC", 0},
@@ -190,7 +190,7 @@ static const struct ls_RegConst nix_console_o_flags[] = {
190 {"O_OCRNL", CHECK_NIX_FLAG_OR_ZERO(OCRNL)}, 190 {"O_OCRNL", CHECK_NIX_FLAG_OR_ZERO(OCRNL)},
191 {"O_ONOCR", CHECK_NIX_FLAG_OR_ZERO(ONOCR)}, 191 {"O_ONOCR", CHECK_NIX_FLAG_OR_ZERO(ONOCR)},
192 {"O_ONLRET", CHECK_NIX_FLAG_OR_ZERO(ONLRET)}, 192 {"O_ONLRET", CHECK_NIX_FLAG_OR_ZERO(ONLRET)},
193#ifndef __FreeBSD__ 193#if !defined(__FreeBSD__) && !defined(__NetBSD__)
194 {"O_OFILL", CHECK_NIX_FLAG_OR_ZERO(OFILL)}, 194 {"O_OFILL", CHECK_NIX_FLAG_OR_ZERO(OFILL)},
195 {"O_OFDEL", CHECK_NIX_FLAG_OR_ZERO(OFDEL)}, 195 {"O_OFDEL", CHECK_NIX_FLAG_OR_ZERO(OFDEL)},
196 {"O_NLDLY", CHECK_NIX_FLAG_OR_ZERO(NLDLY)}, 196 {"O_NLDLY", CHECK_NIX_FLAG_OR_ZERO(NLDLY)},
@@ -201,8 +201,12 @@ static const struct ls_RegConst nix_console_o_flags[] = {
201 {"O_NLDLY", 0}, 201 {"O_NLDLY", 0},
202 {"O_CRDLY", 0}, 202 {"O_CRDLY", 0},
203#endif 203#endif
204#if !defined(__NetBSD__)
204 {"O_TABDLY", CHECK_NIX_FLAG_OR_ZERO(TABDLY)}, 205 {"O_TABDLY", CHECK_NIX_FLAG_OR_ZERO(TABDLY)},
205#ifndef __FreeBSD__ 206#else
207 {"O_TABDLY", 0},
208#endif
209#if !defined(__FreeBSD__) && !defined(__NetBSD__)
206 {"O_BSDLY", CHECK_NIX_FLAG_OR_ZERO(BSDLY)}, 210 {"O_BSDLY", CHECK_NIX_FLAG_OR_ZERO(BSDLY)},
207 {"O_VTDLY", CHECK_NIX_FLAG_OR_ZERO(VTDLY)}, 211 {"O_VTDLY", CHECK_NIX_FLAG_OR_ZERO(VTDLY)},
208 {"O_FFDLY", CHECK_NIX_FLAG_OR_ZERO(FFDLY)}, 212 {"O_FFDLY", CHECK_NIX_FLAG_OR_ZERO(FFDLY)},
@@ -218,7 +222,7 @@ static const struct ls_RegConst nix_console_l_flags[] = {
218 // Local flags (c_lflag) 222 // Local flags (c_lflag)
219 {"L_ISIG", CHECK_NIX_FLAG_OR_ZERO(ISIG)}, 223 {"L_ISIG", CHECK_NIX_FLAG_OR_ZERO(ISIG)},
220 {"L_ICANON", CHECK_NIX_FLAG_OR_ZERO(ICANON)}, 224 {"L_ICANON", CHECK_NIX_FLAG_OR_ZERO(ICANON)},
221#if !defined(__APPLE__) && !defined(__FreeBSD__) 225#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
222 {"L_XCASE", CHECK_NIX_FLAG_OR_ZERO(XCASE)}, // Might not be available on all systems 226 {"L_XCASE", CHECK_NIX_FLAG_OR_ZERO(XCASE)}, // Might not be available on all systems
223#else 227#else
224 {"L_XCASE", 0}, 228 {"L_XCASE", 0},