Make fixes and improvements

- Polyfill UTIME_OMIT on XNU
- Refactor Lua build code so it's better
- Add unix module to lua.com (Discord request)
- Add unix.utimensat() and unix.futimens() to redbean
- Avoid creating double slash path in linenoise (#428)
- Remove double slashes in NT paths automatically (#428)
- Make strerror() smarter about showing NT errors (#428)

Fixes #428
This commit is contained in:
Justine Tunney 2022-06-18 01:10:29 -07:00
parent 67b28b9af1
commit c1cfca8ae1
18 changed files with 569 additions and 194 deletions

View file

@ -49,6 +49,14 @@ TEST(open, eexist) {
ASSERT_SYS(EEXIST, -1, open("exists", O_WRONLY | O_CREAT | O_EXCL));
}
TEST(open, doubleSlash_worksAndGetsNormalizedOnWindows) {
ASSERT_SYS(0, 0, mkdir("o", 0755));
ASSERT_SYS(0, 3,
open(gc(xjoinpaths(gc(getcwd(0, 0)), "o//deleteme")),
O_WRONLY | O_CREAT | O_TRUNC, 0644));
ASSERT_SYS(0, 0, close(3));
}
TEST(open, enametoolong) {
size_t n = 260;
char *s = gc(xcalloc(1, n + 1));