about summary refs log tree commit diff
path: root/REORG.TODO/include/stdio_ext.h
diff options
context:
space:
mode:
Diffstat (limited to 'REORG.TODO/include/stdio_ext.h')
-rw-r--r--REORG.TODO/include/stdio_ext.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/REORG.TODO/include/stdio_ext.h b/REORG.TODO/include/stdio_ext.h
new file mode 100644
index 0000000000..29c6e68cdb
--- /dev/null
+++ b/REORG.TODO/include/stdio_ext.h
@@ -0,0 +1,23 @@
+#ifndef	_STDIO_EXT_H
+#include <stdio-common/stdio_ext.h>
+
+# ifndef _ISOMAC
+
+libc_hidden_proto (__fsetlocking)
+
+#define __fsetlocking(fp, type) \
+  ({ int __result = ((fp->_flags & _IO_USER_LOCK)			\
+		     ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL);	\
+									\
+     if (type != FSETLOCKING_QUERY)					\
+       {								\
+	 fp->_flags &= ~_IO_USER_LOCK;					\
+	 if (type == FSETLOCKING_BYCALLER)				\
+	   fp->_flags |= _IO_USER_LOCK;					\
+       }								\
+									\
+     __result;								\
+  })
+
+# endif /* !_ISOMAC */
+#endif /* stdio_ext.h */