From 1c448f35514778bcc27dbb5af916ecd8a48ff3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 8 Sep 2004 16:22:28 +0000 Subject: [PATCH] Removed all inline functions. Also no longer let getc()/putc() point to libio functions directly (they were even only macros there, too...). Should now be backwards compatible, too. Thanks to Waldemar for pointing this out! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8894 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/stdio_post.h | 60 +++----------------------------------- 1 file changed, 4 insertions(+), 56 deletions(-) diff --git a/headers/posix/stdio_post.h b/headers/posix/stdio_post.h index 9bcd878f86..8f4db8a5f2 100644 --- a/headers/posix/stdio_post.h +++ b/headers/posix/stdio_post.h @@ -1,5 +1,5 @@ /* -** Distributed under the terms of the OpenBeOS License. +** Distributed under the terms of the Haiku License. */ #ifndef _STDIO_POST_H_ #define _STDIO_POST_H_ @@ -8,8 +8,7 @@ // ToDo: this is a work in progress to make our stdio // BeOS' GNU/libio (almost) binary compatible -// We are not yet compatible! -// Currently only function names are compatible +// We may not yet be compatible! #ifndef _STDIO_H_ # error "This file must be included from stdio.h!" @@ -20,60 +19,9 @@ extern char _single_threaded; // running - as soon as you spawn the first thread, it's set to // false (0) -#ifdef __cplusplus -# define __INLINE inline -#else -# define __INLINE extern __inline -#endif - - -__INLINE int -feof_unlocked(FILE *stream) -{ - return _IO_feof_unlocked(stream); -} - - -__INLINE int -ferror_unlocked(FILE *stream) -{ - return _IO_ferror_unlocked(stream); -} - - #define getc(stream) \ - (_single_threaded ? _IO_getc_unlocked(stream) : _IO_getc(stream)) + (_single_threaded ? getc_unlocked(stream) : getc(stream)) #define putc(c, stream) \ - (_single_threaded ? _IO_putc_unlocked(c, stream) : _IO_putc(c, stream)) - - -__INLINE int -putc_unlocked(int c, FILE *stream) -{ - return _IO_putc_unlocked(c, stream); -} - - -__INLINE int -putchar_unlocked(int c) -{ - return _IO_putc_unlocked(c, stdout); -} - - -__INLINE int -getc_unlocked(FILE *stream) -{ - return _IO_getc_unlocked(stream); -} - - -__INLINE int -getchar_unlocked(void) -{ - return _IO_getc_unlocked(stdin); -} - -#undef __INLINE + (_single_threaded ? putc_unlocked(c, stream) : putc(c, stream)) #endif /* _STDIO_POST_H_ */