mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 08:20:28 +00:00
Improve signal handling and math
- Polyfill ucontext_t on FreeBSD/OpenBSD/NetBSD - Add tests confirming signals can edit CPU state - Work towards supporting ZIP filesystem on bare metal - Add more tinymath unit tests for POSIX conformance - Add X87 and SSE status flags to crash report - Fix some bugs in blinkenlights - Fix llvm build breakage
This commit is contained in:
parent
cdc54ea1fd
commit
40291c9db3
109 changed files with 2316 additions and 520 deletions
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
||||
axdx_t ad;
|
||||
if (!IsWindows()) {
|
||||
if (!IsWindows() && !IsMetal()) {
|
||||
ad = sys_gettimeofday(tv, tz, NULL);
|
||||
assert(ad.ax != -1);
|
||||
if (SupportsXnu() && ad.ax && tv) {
|
||||
|
@ -43,6 +43,8 @@ int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
|||
tv->tv_usec = ad.dx;
|
||||
}
|
||||
return 0;
|
||||
} else if (IsMetal()) {
|
||||
return enosys();
|
||||
} else {
|
||||
return sys_gettimeofday_nt(tv, tz);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue