From dc55af6452f6318468dc518fd54f7635ef65dfc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 30 Sep 2008 10:04:22 +0000 Subject: [PATCH] Applied patch by Urias McCullough: * Added stdio_ext.h header with declaration for the only currently implemented stdio extensions fsetlocking() and flushlbf() and associated constants. This helps compiling some software like gettext and cvs. NOTE: I have not tested this myself, but trust the review done by Andreas and Scott. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27789 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/stdio_ext.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 headers/posix/stdio_ext.h diff --git a/headers/posix/stdio_ext.h b/headers/posix/stdio_ext.h new file mode 100644 index 0000000000..e5f3a6e773 --- /dev/null +++ b/headers/posix/stdio_ext.h @@ -0,0 +1,36 @@ +/* + * Copyright 2008, Haiku Inc. All Rights Reserved. + * Distributed under the terms of the MIT/X11 License. + */ +#ifndef _STDIO_EXT_H_ +#define _STDIO_EXT_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define FSETLOCKING_QUERY 0 +#define FSETLOCKING_INTERNAL 1 +#define FSETLOCKING_BYCALLER 2 + +/* The following stdio extensions are not implemented yet */ +/* extern size_t __fufsize(FILE* stream); */ +/* extern int __freading(FILE* stream); */ +/* extern int __fwriting(FILE* stream); */ +/* extern int __freadable(FILE* stream); */ +/* extern int __fwritable(FILE* stream); */ +/* extern int __flbf(FILE* stream); */ +/* extern void __fpurge(FILE* stream); */ +/* extern size_t __fpending(FILE* stream); */ + +extern void _flushlbf(void); +extern int __fsetlocking(FILE* stream, int type); + +#ifdef __cplusplus +} +#endif + +#endif /* _STDIO_EXT_H_ */ +