mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-23 11:00:31 +00:00
Make more fixes and improvements
- Fix Makefile flaking due to ZIPOBJ_FLAGS generation - Make printf() floating point and gdtoa thread safe - Polish up the runit / runitd programs some more - Prune some more makefile dependencies
This commit is contained in:
parent
3c285337a2
commit
a3865ecc3c
61 changed files with 316 additions and 132 deletions
21
third_party/gdtoa/lock.h
vendored
Normal file
21
third_party/gdtoa/lock.h
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_GDTOA_LOCK_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_GDTOA_LOCK_H_
|
||||
#include "libc/intrin/nopl.h"
|
||||
#include "libc/nexgen32e/threaded.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int __gdtoa_lock(void);
|
||||
int __gdtoa_unlock(void);
|
||||
|
||||
#if defined(__GNUC__) && !defined(__llvm__) && !defined(__STRICT_ANSI__)
|
||||
#define __gdtoa_lock() _NOPL0("__threadcalls", __gdtoa_lock)
|
||||
#define __gdtoa_unlock() _NOPL0("__threadcalls", __gdtoa_unlock)
|
||||
#else
|
||||
#define __gdtoa_lock() (__threaded ? __gdtoa_lock() : 0)
|
||||
#define __gdtoa_unlock() (__threaded ? __gdtoa_unlock() : 0)
|
||||
#endif
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_GDTOA_LOCK_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue