diff options
author | cos <cos> | 2024-07-27 23:38:30 +0200 |
---|---|---|
committer | cos <cos> | 2024-07-27 23:40:20 +0200 |
commit | 9e13874b5eb4e0537f26a1fd78f918ce3f184e99 (patch) | |
tree | 730cd870e577e3c70b0bb4e6a0895584303cad85 | |
parent | 45499248cea9e23b7e4d8478759414e01c645809 (diff) | |
download | luasystem-9e13874b5eb4e0537f26a1fd78f918ce3f184e99.zip |
Re-add FreeBSD support (broken since c1a64c1)
-rw-r--r-- | src/term.c | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -161,7 +161,7 @@ static const struct ls_RegConst nix_console_i_flags[] = { {"I_INLCR", CHECK_NIX_FLAG_OR_ZERO(INLCR)}, {"I_IGNCR", CHECK_NIX_FLAG_OR_ZERO(IGNCR)}, {"I_ICRNL", CHECK_NIX_FLAG_OR_ZERO(ICRNL)}, -#ifndef __APPLE__ +#if !defined(__APPLE__) && !defined(__FreeBSD__) {"I_IUCLC", CHECK_NIX_FLAG_OR_ZERO(IUCLC)}, // Might not be available on all systems #else {"I_IUCLC", 0}, @@ -176,7 +176,7 @@ static const struct ls_RegConst nix_console_i_flags[] = { static const struct ls_RegConst nix_console_o_flags[] = { // Output flags (c_oflag) {"O_OPOST", CHECK_NIX_FLAG_OR_ZERO(OPOST)}, -#ifndef __APPLE__ +#if !defined(__APPLE__) && !defined(__FreeBSD__) {"O_OLCUC", CHECK_NIX_FLAG_OR_ZERO(OLCUC)}, // Might not be available on all systems #else {"O_OLCUC", 0}, @@ -185,14 +185,27 @@ static const struct ls_RegConst nix_console_o_flags[] = { {"O_OCRNL", CHECK_NIX_FLAG_OR_ZERO(OCRNL)}, {"O_ONOCR", CHECK_NIX_FLAG_OR_ZERO(ONOCR)}, {"O_ONLRET", CHECK_NIX_FLAG_OR_ZERO(ONLRET)}, +#ifndef __FreeBSD__ {"O_OFILL", CHECK_NIX_FLAG_OR_ZERO(OFILL)}, {"O_OFDEL", CHECK_NIX_FLAG_OR_ZERO(OFDEL)}, {"O_NLDLY", CHECK_NIX_FLAG_OR_ZERO(NLDLY)}, {"O_CRDLY", CHECK_NIX_FLAG_OR_ZERO(CRDLY)}, +#else + {"O_OFILL", 0}, + {"O_OFDEL", 0}, + {"O_NLDLY", 0}, + {"O_CRDLY", 0}, +#endif {"O_TABDLY", CHECK_NIX_FLAG_OR_ZERO(TABDLY)}, +#ifndef __FreeBSD__ {"O_BSDLY", CHECK_NIX_FLAG_OR_ZERO(BSDLY)}, {"O_VTDLY", CHECK_NIX_FLAG_OR_ZERO(VTDLY)}, {"O_FFDLY", CHECK_NIX_FLAG_OR_ZERO(FFDLY)}, +#else + {"O_BSDLY", 0}, + {"O_VTDLY", 0}, + {"O_FFDLY", 0}, +#endif {NULL, 0} }; @@ -200,7 +213,7 @@ static const struct ls_RegConst nix_console_l_flags[] = { // Local flags (c_lflag) {"L_ISIG", CHECK_NIX_FLAG_OR_ZERO(ISIG)}, {"L_ICANON", CHECK_NIX_FLAG_OR_ZERO(ICANON)}, -#ifndef __APPLE__ +#if !defined(__APPLE__) && !defined(__FreeBSD__) {"L_XCASE", CHECK_NIX_FLAG_OR_ZERO(XCASE)}, // Might not be available on all systems #else {"L_XCASE", 0}, |