16#error "Include this file before internal.h"
19#if defined(__cplusplus)
29#if defined(HAVE_STDIO_EXT_H)
33#include "ruby/config.h"
37# define reqevents events
38# define rtnevents revents
47# define RB_WAITFD_IN POLLIN
48# define RB_WAITFD_PRI POLLPRI
49# define RB_WAITFD_OUT POLLOUT
51# define RB_WAITFD_IN 0x001
52# define RB_WAITFD_PRI 0x002
53# define RB_WAITFD_OUT 0x004
106#define HAVE_RB_IO_T 1
108#define FMODE_READABLE 0x00000001
109#define FMODE_WRITABLE 0x00000002
110#define FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE)
111#define FMODE_BINMODE 0x00000004
112#define FMODE_SYNC 0x00000008
113#define FMODE_TTY 0x00000010
114#define FMODE_DUPLEX 0x00000020
115#define FMODE_APPEND 0x00000040
116#define FMODE_CREATE 0x00000080
118#define FMODE_EXCL 0x00000400
119#define FMODE_TRUNC 0x00000800
120#define FMODE_TEXTMODE 0x00001000
122#define FMODE_SETENC_BY_BOM 0x00100000
127#define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
129#define MakeOpenFile(obj, fp) do {\
130 (fp) = rb_io_make_open_file(obj);\
162#define rb_io_mode_flags(modestr) [<"rb_io_mode_flags() is obsolete; use rb_io_modestr_fmode()">]
163#define rb_io_modenum_flags(oflags) [<"rb_io_modenum_flags() is obsolete; use rb_io_oflags_fmode()">]
178#if defined(__cplusplus)
int rb_io_oflags_fmode(int oflags)
int rb_io_modestr_fmode(const char *modestr)
VALUE rb_io_get_io(VALUE io)
int rb_io_modestr_oflags(const char *modestr)
void rb_io_check_byte_readable(rb_io_t *fptr)
rb_io_t * rb_io_make_open_file(VALUE obj)
int rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p)
int rb_wait_for_single_fd(int fd, int events, struct timeval *tv)
struct rb_io_enc_t rb_io_enc_t
VALUE rb_io_taint_check(VALUE)
RUBY_SYMBOL_EXPORT_BEGIN PACKED_STRUCT_UNALIGNED(struct rb_io_buffer_t { char *ptr;int off;int len;int capa;})
void rb_io_check_closed(rb_io_t *)
int rb_io_fptr_finalize(rb_io_t *)
void rb_io_check_writable(rb_io_t *)
NORETURN(void rb_eof_error(void))
FILE * rb_io_stdio_file(rb_io_t *fptr)
FILE * rb_fdopen(int, const char *)
void rb_io_check_readable(rb_io_t *)
int rb_io_read_pending(rb_io_t *)
CONSTFUNC(int rb_io_oflags_fmode(int oflags))
VALUE rb_io_check_io(VALUE io)
ssize_t rb_io_bufwrite(VALUE io, const void *buf, size_t size)
void rb_io_read_check(rb_io_t *)
void rb_io_check_char_readable(rb_io_t *fptr)
struct rb_io_buffer_t rb_io_buffer_t
VALUE rb_io_get_write_io(VALUE io)
void rb_io_set_nonblock(rb_io_t *fptr)
void rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, int *oflags_p, int *fmode_p, rb_io_enc_t *convconfig_p)
VALUE rb_io_set_write_io(VALUE io, VALUE w)
VALUE rb_stat_new(const struct stat *)
void rb_io_synchronized(rb_io_t *)
int rb_io_wait_readable(int)
int rb_io_wait_writable(int)
void rb_io_check_initialized(rb_io_t *)
unsigned char buf[MIME_BUF_SIZE]
struct rb_io_t::rb_io_enc_t encs
VALUE writeconv_asciicompat
int writeconv_initialized
int writeconv_pre_ecflags
VALUE writeconv_pre_ecopts
VALUE tied_io_for_writing
void(* finalize)(struct rb_io_t *, int)