Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Deletion of ioctl_ptr in Caml 1.06
@ 1997-11-24  3:28 Scott Alexander
  1997-11-25 10:19 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Alexander @ 1997-11-24  3:28 UTC (permalink / raw)
  To: caml-list

I'm curious as to the reason that Unix.ioctl_ptr (and Unix.ioctl_int) no
longer exist in OCaml 1.06.  Is there a workaround for code that used
them?  (I'm using ioctl_ptr in order to get information about the
network interfaces attached to the current machine.)

Thanks,
Scott

[Poor attempt at French summary]
Je voudrais connais la raison que Unix.ioctl_ptr n'existe pas en
O'Caml 1.06.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Deletion of ioctl_ptr in Caml 1.06
  1997-11-24  3:28 Deletion of ioctl_ptr in Caml 1.06 Scott Alexander
@ 1997-11-25 10:19 ` Xavier Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 1997-11-25 10:19 UTC (permalink / raw)
  To: Scott Alexander; +Cc: caml-list

> I'm curious as to the reason that Unix.ioctl_ptr (and Unix.ioctl_int) no
> longer exist in OCaml 1.06.  Is there a workaround for code that used
> them?  (I'm using ioctl_ptr in order to get information about the
> network interfaces attached to the current machine.)

There were two problems with the Unix.ioctl functions:
1- You had to hardwire the ioctl number and couldn't use the symbolic
names provided by the C include files.  This makes code extremely
hard to read and fragile w.r.t. upgrades of the OS.
2- For ioctl_ptr, exploiting the result (which may be a complex
struct) was very incovenient.

For those two reasons, I think it's better to write a C function that
does the ioctl you're interested in, and returns to Caml the results
you're interested in.

- Xavier Leroy





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-11-26  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-24  3:28 Deletion of ioctl_ptr in Caml 1.06 Scott Alexander
1997-11-25 10:19 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox