mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Polish recent changes and make improvements
- Simulate SIGPIPE on Windows NT - Fix commandv() regression on Windows NT - Fix sigprocmask() strace bug on OpenBSD - Add many more system calls to --strace logging - Make errno state more pristine in redbean strace
This commit is contained in:
parent
10a766ebd0
commit
39688a73e4
69 changed files with 460 additions and 1976 deletions
|
@ -242,6 +242,20 @@ forceinline char *__strstr(const char *haystack, const char *needle) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
forceinline char16_t *__strstr16(const char16_t *haystack,
|
||||
const char16_t *needle) {
|
||||
size_t i;
|
||||
for (;;) {
|
||||
for (i = 0;; ++i) {
|
||||
if (!needle[i]) return (/*unconst*/ char16_t *)haystack;
|
||||
if (!haystack[i]) break;
|
||||
if (needle[i] != haystack[i]) break;
|
||||
}
|
||||
if (!*haystack++) break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
forceinline char *__getenv(char **p, const char *s) {
|
||||
size_t i, j;
|
||||
if (p) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue