stdio_ext.h 552 B

1234567891011121314151617181920212223
  1. #ifndef _STDIO_EXT_H
  2. #include <stdio-common/stdio_ext.h>
  3. # ifndef _ISOMAC
  4. libc_hidden_proto (__fsetlocking)
  5. #define __fsetlocking(fp, type) \
  6. ({ int __result = ((fp->_flags & _IO_USER_LOCK) \
  7. ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL); \
  8. \
  9. if (type != FSETLOCKING_QUERY) \
  10. { \
  11. fp->_flags &= ~_IO_USER_LOCK; \
  12. if (type == FSETLOCKING_BYCALLER) \
  13. fp->_flags |= _IO_USER_LOCK; \
  14. } \
  15. \
  16. __result; \
  17. })
  18. # endif /* !_ISOMAC */
  19. #endif /* stdio_ext.h */