Merge pull request #9904 from dra27/unix-io-prims

Declare primitives used by unix in io.h
master
David Allsopp 2020-09-11 09:35:31 +01:00 committed by GitHub
commit 28789cd045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -64,10 +64,6 @@ static int unix_check_stream_semantics(int fd)
}
}
/* From runtime/io.c. To be declared in <caml/io.h> ? */
extern value caml_ml_open_descriptor_in(value fd);
extern value caml_ml_open_descriptor_out(value fd);
CAMLprim value unix_inchannel_of_filedescr(value fd)
{
int err;

View File

@ -128,6 +128,10 @@ CAMLextern struct channel * caml_all_opened_channels;
#define Val_file_offset(fofs) caml_copy_int64(fofs)
#define File_offset_val(v) ((file_offset) Int64_val(v))
/* Primitives required by the Unix library */
CAMLextern value caml_ml_open_descriptor_in(value fd);
CAMLextern value caml_ml_open_descriptor_out(value fd);
#endif /* CAML_INTERNALS */
#endif /* CAML_IO_H */