10#ifndef LIBOPENMPT_STREAM_CALLBACKS_FD_H
11#define LIBOPENMPT_STREAM_CALLBACKS_FD_H
48 fd = (int)(uintptr_t)stream;
56 if ( bytes < (
size_t)INT_MAX ) {
61 ret_read = _read( fd, dst, to_read );
62 if ( ret_read <= 0 ) {
70 retval = read( fd, dst, bytes );
71 }
while ( ( retval == -1 ) && ( errno == EINTR ) );
static size_t openmpt_stream_fd_read_func(void *stream, void *dst, size_t bytes)
Definition: libopenmpt_stream_callbacks_fd.h:39
static openmpt_stream_callbacks openmpt_stream_get_fd_callbacks(void)
Provide openmpt_stream_callbacks for standard POSIX file descriptors.
Definition: libopenmpt_stream_callbacks_fd.h:90
Stream callbacks.
Definition: libopenmpt.h:300
openmpt_stream_read_func read
Read callback.
Definition: libopenmpt.h:306