#include <poll.h>
#include <errno.h>
-int stream_FDStream_FDStream_native_read_char_1(FDStream s, int fd) {
+int stream_FDStream_FDStream_native_read_char_1(void *s, int fd) {
int result;
char buf;
ssize_t r = read(fd, &buf, 1);
result = buf;
return result;
}
-
-void stream_FDStream_FDStream_write_char_1(FDStream s, int fd, int c) {
- write(fd, &c, 1);
-}
-
+#ifndef NONITCNI
/*
C implementation of stream::Object::intern_poll
/* input streams */
for ( i=0; i<in_len; i ++ ) {
+ int fd;
tmp_nit_obj = Array__index( in_fds, i );
- int fd = nullable_Object_as_Int( tmp_nit_obj );
+ fd = nullable_Object_as_Int( tmp_nit_obj );
c_fds[i].fd = fd;
c_fds[i].events = POLLIN;
/* output streams */
for ( i=0; i<out_len; i ++ ) {
+ int fd;
tmp_nit_obj = Array__index( out_fds, i );
- int fd = nullable_Object_as_Int( tmp_nit_obj );
+ fd = nullable_Object_as_Int( tmp_nit_obj );
c_fds[i].fd = fd;
c_fds[i].events = POLLOUT;
return null_Int();
}
+#endif