You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4919 Reporter: goswin Status: acknowledged (set by @damiendoligez on 2009-12-08T16:31:33Z) Resolution: open Priority: normal Severity: feature Version: 3.11.0 Category: otherlibs Tags: patch Monitored by: tgazagna @ygrek
Bug description
The C interface to the Unix module provides a unix_error_of_code() to convert C errno numbers into OCaml Unix.error. It does not provide the reverse function though. In libfuse I have callbacks that can return a C errno number. The libfuse OCaml bindings then need a way to convert a Unix.error into a C errno number before returning it to libfuse. The attached patch adds the missing code_of_unix_error() function for this.
I tested goswin's patch, it is working for me.
Attached: A completed version of the patch (win32's unixsupport.{c,h} patched as well), and a little test program for it.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 4919
Reporter: goswin
Status: acknowledged (set by @damiendoligez on 2009-12-08T16:31:33Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.11.0
Category: otherlibs
Tags: patch
Monitored by: tgazagna @ygrek
Bug description
The C interface to the Unix module provides a unix_error_of_code() to convert C errno numbers into OCaml Unix.error. It does not provide the reverse function though. In libfuse I have callbacks that can return a C errno number. The libfuse OCaml bindings then need a way to convert a Unix.error into a C errno number before returning it to libfuse. The attached patch adds the missing code_of_unix_error() function for this.
File attachments
The text was updated successfully, but these errors were encountered: