aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdio-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdio-impl.h')
-rw-r--r--lib/stdio-impl.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index 878e9f8c97d..4b4263fe908 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -30,6 +30,49 @@
30# endif 30# endif
31#endif 31#endif
32 32
33/* Haiku stdio implementation. */
34#if defined __HAIKU__
35# include <stdint.h>
36/* This FILE structure was made into an incomplete type in 2025.
37 See <https://cgit.haiku-os.org/haiku/tree/src/system/libroot/posix/glibc/libio/libio.h>. */
38# define fp_ ((struct { int _flags; \
39 char *_IO_read_ptr; \
40 char *_IO_read_end; \
41 char *_IO_read_base; \
42 char *_IO_write_base; \
43 char *_IO_write_ptr; \
44 char *_IO_write_end; \
45 char *_IO_buf_base; \
46 char *_IO_buf_end; \
47 char *_IO_save_base; \
48 char *_IO_backup_base; \
49 char *_IO_save_end; \
50 void *_markers; \
51 void *_chain; \
52 int _fileno; \
53 int _flags2; \
54 off_t _old_offset; \
55 unsigned short _cur_column; \
56 signed char _vtable_offset; \
57 char _shortbuf[1]; \
58 void *_lock; \
59 int64_t _offset; \
60 /* More fields, not relevant here. */ \
61 } *) fp)
62# if !defined _IO_UNBUFFERED
63# define _IO_UNBUFFERED 0x2
64# endif
65# if !defined _IO_EOF_SEEN
66# define _IO_EOF_SEEN 0x10
67# endif
68# if !defined _IO_IN_BACKUP
69# define _IO_IN_BACKUP 0x100
70# endif
71# if !defined _IO_LINE_BUF
72# define _IO_LINE_BUF 0x200
73# endif
74#endif
75
33/* BSD stdio derived implementations. */ 76/* BSD stdio derived implementations. */
34 77
35#if defined __NetBSD__ /* NetBSD */ 78#if defined __NetBSD__ /* NetBSD */