Commit Graph

6 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
5233370cda Fix build.rs formatting 2024-01-13 16:04:05 -06:00
Mahmoud Al-Qudsi
33f33c5f41 Simplify (and fix?) build.rs HAVE_XXX detection
Since none of the compiles(xxx) calls are to particularly complex code, we can
just use `rsconf` directly to test for the presence of the symbols or headers as
needed.

Note that it seems at least some of the previous detection was not working
correctly; in particular HAVE_PIPE2 was evaluating to false on my WSL install
where pipe2(2) was available (caught because it revealed some compilation errors
in that conditional compilation path after porting).

I kept the cfg names and the tests themselves mostly as-is, though we might want
to change that to conform with the rust convention of lowercase cfg names and
decide whether we want to prefix all these with have_, fish_, or nothing at all.
Also the posix_spawn() test should probably check for the symbol `posix_spawn()`
rather than the header `spawn.h` since we don't use it via the header but rather
via the symbol (but in reality they're almost certainly going to give the same
result).
2024-01-13 15:45:42 -06:00
Mahmoud Al-Qudsi
6e002b6d80 Use cfg directly instead of going through features
Features should be for user-specifiable build configurations but our dynamic,
target-based conditional compilation is something else.
2024-01-13 15:16:47 -06:00
Mahmoud Al-Qudsi
4f8265db47 Inline the localconv_l test
It's just one line.
2024-01-13 14:58:58 -06:00
Mahmoud Al-Qudsi
30f70f02de Feature-detect localeconv_l() presence 2024-01-13 14:21:14 -06:00
Johannes Altmanninger
3ae20bdba0 Move fish-rust to project root 2024-01-13 03:58:33 +01:00