Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004589OCamlotherlibspublic2008-07-23 14:572016-12-07 16:31
Assigned To 
PlatformOSOS Version
Product Version3.10.2 
Target VersionFixed in Version 
Summary0004589: Wish: FFI API for the Unix module
DescriptionI'm often writing extensions to the Unix module using the FFI. Currently, this is a bit awkward, because there is no API, and one has to rely on undocumented features. What would be helpful (at minimum):

- C functions for accessing and creating file descriptors
- C functions for accessing and creating inet_addr
- C function to turn an OS error into a Unix.error

This API would hide the differences between Unix and Win32.

For Win32 there is additionally a linking problem. Currently, functions like uerror cannot be called from a custom DLL because these functions aren't exported. Furthermore, there is no import lib for dllunix.dll.
Additional InformationFor ocamlnet I'm currently working around by

- calling undocumented functions like uerror
- for Win32, by even including a copy of unixsupport.c

See here for code: [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
frisch (developer)
2008-07-23 22:53

Note that on the current CVS trunk, the semantics of dynamic libraries is similar to the Unix one on Win32: you are able to access symbols defined in dllunix.dll even though there is no import library and symbols are not exported explicitly.

- Issue History
Date Modified Username Field Change
2008-07-23 14:57 gerd New Issue
2008-07-23 22:53 frisch Note Added: 0004536
2008-09-23 19:48 doligez Status new => acknowledged
2016-12-07 16:31 shinwell Category OCaml general => OCaml otherlibs
2017-02-23 16:42 doligez Category OCaml otherlibs => otherlibs

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker