.
[glibc.git] / include / stdio_ext.h
blobc7b77246b7799e4162c283e49e8ea69ca12d9a4e
1 #ifndef _STDIO_EXT_H
3 # include <stdio-common/stdio_ext.h>
5 extern int __fsetlocking_internal (FILE *__fp, int __type) attribute_hidden;
7 #define __fsetlocking(fp, type) \
8 ({ int __result = ((fp->_flags & _IO_USER_LOCK) \
9 ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL); \
11 if (type != FSETLOCKING_QUERY) \
12 { \
13 fp->_flags &= ~_IO_USER_LOCK; \
14 if (type == FSETLOCKING_BYCALLER) \
15 fp->_flags |= _IO_USER_LOCK; \
16 } \
18 __result; \
22 #endif