Additionally look for `_isatty()` and adjust for more possible results
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1383
void* _func;
module.symbol ("isatty", out _func);
if (_func == null) {
- return false;
+ module.symbol ("_isatty", out _func);
+ if (_func == null) {
+ return false;
+ }
}
AttyFunc? func = (AttyFunc) _func;
- return func (fd) == 1;
+ return func (fd) > 0;
}
[PrintfFormat]
void* _func;
module.symbol ("isatty", out _func);
if (_func == null) {
- return false;
+ module.symbol ("_isatty", out _func);
+ if (_func == null) {
+ return false;
+ }
}
AttyFunc? func = (AttyFunc) _func;
- return func (fd) == 1;
+ return func (fd) > 0;
}
}