mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 19:43:32 +00:00
2db2f40a98
This change gets GNU grep working. What caused it to not work, is it wouldn't write to an output file descriptor when its dev/ino equaled /dev/null's. So now we invent special dev/ino values for these files
25 lines
820 B
C
25 lines
820 B
C
#ifndef COSMOPOLITAN_LIBC_CALLS_STATE_INTERNAL_H_
|
|
#define COSMOPOLITAN_LIBC_CALLS_STATE_INTERNAL_H_
|
|
#include "libc/calls/calls.h"
|
|
#include "libc/nt/struct/securityattributes.h"
|
|
#include "libc/thread/thread.h"
|
|
#include "libc/thread/tls.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
extern int __vforked;
|
|
extern pthread_mutex_t __fds_lock_obj;
|
|
extern unsigned __sighandrvas[NSIG + 1];
|
|
extern unsigned __sighandflags[NSIG + 1];
|
|
extern uint64_t __sighandmask[NSIG + 1];
|
|
extern const struct NtSecurityAttributes kNtIsInheritable;
|
|
|
|
void __fds_wipe(void);
|
|
void __fds_lock(void);
|
|
void __fds_unlock(void);
|
|
|
|
#define __vforked (__tls_enabled && (__get_tls()->tib_flags & TIB_FLAG_VFORKED))
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_STATE_INTERNAL_H_ */
|