newlib/winsup/cygwin/include/sys/stdio.h
Christopher Faylor 70300fdb1c Perform whitespace cleanup throughout.
* dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility.
(check_sanity_and_sync): Ditto.
* winsup.h (SIGTOMASK): Ditto.  Just use constant in signal calculation.
* include/cygwin/version: Remove backwards signal mask compatibility define.
* path.cc (symlink_info::check_sysfile): Cosmetic change.
* registry.cc (get_registry_hive_path): Remove unneeded variable.
* exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use
either main sigmask or current thread sigmask.
(set_process_mask): Ditto.
(sighold): Ditto.
(sigrelse): Ditto.
(sigset): Ditto.
(set_process_mask_delta): Ditto.
(_cygtls::call_signal_handler): Ditto.
* fhandler_process.cc (format_process_status): Ditto.
* fhandler_termios.cc (fhandler_termios::bg_check): Ditto.
* pinfo.h (class pinfo): Ditto.
* select.cc (pselect): Ditto.
* signal.cc (sigprocmask): Ditto.
(abort): Ditto.
(sigpause): Ditto.
(sigsend): Ditto.
(wait_sig): Ditto.
* thread.h (pthread::parent_tls): New member.
* thread.cc (pthread::pthread): Record parent_tls here.
(pthread::thread_init_wrapper): Initialize sigmask from parent thread.
2008-02-15 17:53:11 +00:00

45 lines
1.1 KiB
C

/* sys/stdio.h
Copyright 2004, 2005 Red Hat, Inc.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#ifndef _SYS_STDIO_H_
#define _SYS_STDIO_H_
#include <sys/cdefs.h>
#include <sys/lock.h>
/* These definitions should be kept in sync with those in the newlib
header of the same name (newlib/libc/include/sys/stdio.h). */
#if !defined(__SINGLE_THREAD__)
# if !defined(_flockfile)
# define _flockfile(fp) ({ if (!((fp)->_flags & __SSTR)) \
__cygwin_lock_lock ((_LOCK_T *)&(fp)->_lock); })
# endif
# if !defined(_ftrylockfile)
# define _ftrylockfile(fp) (((fp)->_flags & __SSTR) ? 0 : \
__cygwin_lock_trylock ((_LOCK_T *)&(fp)->_lock))
# endif
# if !defined(_funlockfile)
# define _funlockfile(fp) ({ if (!((fp)->_flags & __SSTR)) \
__cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock); })
# endif
#endif
__BEGIN_DECLS
#ifdef _GNU_SOURCE
ssize_t _EXFUN(getline, (char **, size_t *, FILE *));
ssize_t _EXFUN(getdelim, (char **, size_t *, int, FILE *));
#endif /* _GNU_SOURCE */
__END_DECLS
#endif