Opened 16 years ago

Closed 15 years ago

#3059 closed bug (fixed)

implement _IO_feof_unlocked and _IO_ferror_unlocked in libio.h [PATCH] — at Version 2

Reported by: kaliber Owned by: axeld
Priority: normal Milestone: R1
Component: System/libroot.so Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by korli)

commit 359d499fd541d6eb43b42ac96c16a008e0d436bc
Author: Grzegorz Dabrowski <grzegorz.dabrowski@gmail.com>
Date:   Sun Nov 2 14:42:36 2008 +0100

    implemented _IO_feof_unlocked and _IO_ferror_unlocked

diff --git a/headers/posix/libio.h b/headers/posix/libio.h
index 83caf1d..f284aec 100644
--- a/headers/posix/libio.h
+++ b/headers/posix/libio.h
@@ -170,9 +170,9 @@ extern "C" {
 #endif
 
 extern int _IO_feof(_IO_FILE *stream);
-extern int _IO_feof_unlocked(_IO_FILE *stream);
+#define    _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0)
 extern int _IO_ferror(_IO_FILE *stream);
-extern int _IO_ferror_unlocked(_IO_FILE *stream);
+#define    _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0)
 extern int _IO_putc(int c, _IO_FILE *stream);
 extern int _IO_putc_unlocked(int c, _IO_FILE *stream);
 extern int _IO_getc(_IO_FILE *stream);

Change History (2)

comment:1 by kaliber, 15 years ago

Component: - GeneralSystem/libroot.so

Please review the patch.

comment:2 by korli, 15 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Applied in hrev30861.

Note: See TracTickets for help on using tickets.