diff options
| author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-08-28 10:15:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-28 10:15:54 +0200 |
| commit | 60b66fce58b64d121b124e64ef78d37512e3a8a2 (patch) | |
| tree | 55590869085a2f9954e30cc728a63e6b87ba3ea8 /src/term.c | |
| parent | 227743a147967bf1418525770082a5943b3f9f41 (diff) | |
| download | luasystem-60b66fce58b64d121b124e64ef78d37512e3a8a2.tar.gz luasystem-60b66fce58b64d121b124e64ef78d37512e3a8a2.tar.bz2 luasystem-60b66fce58b64d121b124e64ef78d37512e3a8a2.zip | |
Re-add FreeBSD support (broken since c1a64c1) (#33)
Co-authored-by: cos <cos>
Diffstat (limited to '')
| -rw-r--r-- | src/term.c | 19 |
1 files changed, 16 insertions, 3 deletions
| @@ -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 | #ifndef __APPLE__ | 169 | #if !defined(__APPLE__) && !defined(__FreeBSD__) |
| 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[] = { | |||
| 181 | static const struct ls_RegConst nix_console_o_flags[] = { | 181 | static 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 | #ifndef __APPLE__ | 184 | #if !defined(__APPLE__) && !defined(__FreeBSD__) |
| 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,14 +190,27 @@ 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 | {"O_OFILL", CHECK_NIX_FLAG_OR_ZERO(OFILL)}, | 194 | {"O_OFILL", CHECK_NIX_FLAG_OR_ZERO(OFILL)}, |
| 194 | {"O_OFDEL", CHECK_NIX_FLAG_OR_ZERO(OFDEL)}, | 195 | {"O_OFDEL", CHECK_NIX_FLAG_OR_ZERO(OFDEL)}, |
| 195 | {"O_NLDLY", CHECK_NIX_FLAG_OR_ZERO(NLDLY)}, | 196 | {"O_NLDLY", CHECK_NIX_FLAG_OR_ZERO(NLDLY)}, |
| 196 | {"O_CRDLY", CHECK_NIX_FLAG_OR_ZERO(CRDLY)}, | 197 | {"O_CRDLY", CHECK_NIX_FLAG_OR_ZERO(CRDLY)}, |
| 198 | #else | ||
| 199 | {"O_OFILL", 0}, | ||
| 200 | {"O_OFDEL", 0}, | ||
| 201 | {"O_NLDLY", 0}, | ||
| 202 | {"O_CRDLY", 0}, | ||
| 203 | #endif | ||
| 197 | {"O_TABDLY", CHECK_NIX_FLAG_OR_ZERO(TABDLY)}, | 204 | {"O_TABDLY", CHECK_NIX_FLAG_OR_ZERO(TABDLY)}, |
| 205 | #ifndef __FreeBSD__ | ||
| 198 | {"O_BSDLY", CHECK_NIX_FLAG_OR_ZERO(BSDLY)}, | 206 | {"O_BSDLY", CHECK_NIX_FLAG_OR_ZERO(BSDLY)}, |
| 199 | {"O_VTDLY", CHECK_NIX_FLAG_OR_ZERO(VTDLY)}, | 207 | {"O_VTDLY", CHECK_NIX_FLAG_OR_ZERO(VTDLY)}, |
| 200 | {"O_FFDLY", CHECK_NIX_FLAG_OR_ZERO(FFDLY)}, | 208 | {"O_FFDLY", CHECK_NIX_FLAG_OR_ZERO(FFDLY)}, |
| 209 | #else | ||
| 210 | {"O_BSDLY", 0}, | ||
| 211 | {"O_VTDLY", 0}, | ||
| 212 | {"O_FFDLY", 0}, | ||
| 213 | #endif | ||
| 201 | {NULL, 0} | 214 | {NULL, 0} |
| 202 | }; | 215 | }; |
| 203 | 216 | ||
| @@ -205,7 +218,7 @@ static const struct ls_RegConst nix_console_l_flags[] = { | |||
| 205 | // Local flags (c_lflag) | 218 | // Local flags (c_lflag) |
| 206 | {"L_ISIG", CHECK_NIX_FLAG_OR_ZERO(ISIG)}, | 219 | {"L_ISIG", CHECK_NIX_FLAG_OR_ZERO(ISIG)}, |
| 207 | {"L_ICANON", CHECK_NIX_FLAG_OR_ZERO(ICANON)}, | 220 | {"L_ICANON", CHECK_NIX_FLAG_OR_ZERO(ICANON)}, |
| 208 | #ifndef __APPLE__ | 221 | #if !defined(__APPLE__) && !defined(__FreeBSD__) |
| 209 | {"L_XCASE", CHECK_NIX_FLAG_OR_ZERO(XCASE)}, // Might not be available on all systems | 222 | {"L_XCASE", CHECK_NIX_FLAG_OR_ZERO(XCASE)}, // Might not be available on all systems |
| 210 | #else | 223 | #else |
| 211 | {"L_XCASE", 0}, | 224 | {"L_XCASE", 0}, |
