mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-16 03:19:54 +08:00
68509b303e
getgrgid_r, getgrnam_r and getlogin_r. * grp.cc (getgrgid_r): New function. (getgrnam_r): Ditto. * syscalls.cc (flockfile): Ditto. (ftrylockfile): Ditto. (funlockfile): Ditto. * sysconf.cc (sysconf): Return LOGIN_NAME_MAX in case of _SC_LOGIN_NAME_MAX. * thread.cc (__cygwin_lock_trylock): Define int. Return value from call to pthread_mutex_trylock. * uinfo.cc (getlogin_r): New function. * include/limits.h: Define LOGIN_NAME_MAX. * include/cygwin/version.h: Bump API minor number. * include/sys/lock.h: Add declarations for __cygwin_lock_xxx functions. * include/sys/stdio.h: Add define for _ftrylockfile.
29 lines
677 B
C
29 lines
677 B
C
/* sys/stdio.h
|
|
|
|
Copyright 2004 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/lock.h>
|
|
|
|
#if !defined(__SINGLE_THREAD__)
|
|
# if !defined(_flockfile)
|
|
# define _flockfile(fp) __cygwin_lock_lock ((_LOCK_T *)&(fp)->_lock)
|
|
# endif
|
|
# if !defined(_ftrylockfile)
|
|
# define _ftrylockfile(fp) __cygwin_lock_trylock ((_LOCK_T *)&(fp)->_lock)
|
|
# endif
|
|
# if !defined(_funlockfile)
|
|
# define _funlockfile(fp) __cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock)
|
|
# endif
|
|
#endif
|
|
|
|
#endif
|