1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
|
|
|
/* Caml Special Light */
|
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
|
|
|
/* Copyright 1995 Institut National de Recherche en Informatique et */
|
|
|
|
/* Automatique. Distributed only by permission. */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
1995-05-08 08:18:32 -07:00
|
|
|
#include <mlvalues.h>
|
|
|
|
#include "unix.h"
|
|
|
|
|
|
|
|
value unix_ioctl_int(fd, request, arg)
|
|
|
|
value fd, request, arg;
|
|
|
|
{
|
|
|
|
int retcode;
|
1995-08-08 06:37:34 -07:00
|
|
|
retcode = ioctl(Int_val(fd), Int_val(request), (char *) Long_val(arg));
|
1995-05-08 08:18:32 -07:00
|
|
|
if (retcode == -1) uerror("ioctl_int", Nothing);
|
|
|
|
return Val_int(retcode);
|
|
|
|
}
|
|
|
|
|
|
|
|
value unix_ioctl_ptr(fd, request, arg)
|
|
|
|
value fd, request, arg;
|
|
|
|
{
|
|
|
|
int retcode;
|
|
|
|
retcode = ioctl(Int_val(fd), Int_val(request), String_val(arg));
|
|
|
|
if (retcode == -1) uerror("ioctl_ptr", Nothing);
|
|
|
|
return Val_int(retcode);
|
|
|
|
}
|