mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Make improvements
- Improved async signal safety of read() particularly for longjmp() - Started adding cancel cleanup handlers for locks / etc on Windows - Make /dev/tty work better particularly for uses like `foo | less` - Eagerly read console input into a linked list, so poll can signal - Fix some libc definitional bugs, which configure scripts detected
This commit is contained in:
parent
d6c2830850
commit
0c5dd7b342
85 changed files with 1062 additions and 671 deletions
|
@ -25,11 +25,6 @@
|
|||
#include "libc/testlib/testlib.h"
|
||||
|
||||
void SetUpOnce(void) {
|
||||
if (!IsWindows()) {
|
||||
// TODO(jart): mock out that win32 i/o call
|
||||
tinyprint(2, program_invocation_name, ": skipping on non-windows\n", NULL);
|
||||
exit(0);
|
||||
}
|
||||
testlib_enable_tmp_setup_teardown();
|
||||
}
|
||||
|
||||
|
@ -197,16 +192,3 @@ TEST(GetDosArgv, cmdToil) {
|
|||
free(argv);
|
||||
free(buf);
|
||||
}
|
||||
|
||||
TEST(GetDosArgv, canonicalizesCurrentDirectoryCommandPath) {
|
||||
size_t max = 4;
|
||||
size_t size = ARG_MAX / 2;
|
||||
char *buf = malloc(size * sizeof(char));
|
||||
char **argv = malloc(max * sizeof(char *));
|
||||
ASSERT_SYS(0, 0, touch("emacs.com", 0755));
|
||||
EXPECT_EQ(1, GetDosArgv(u"emacs.com", buf, size, argv, max));
|
||||
EXPECT_STREQ(".\\emacs.com", argv[0]);
|
||||
EXPECT_EQ(NULL, argv[1]);
|
||||
free(argv);
|
||||
free(buf);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue