New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make useconds_t a concrete, unsigned type. Add suseconds_t. #620
Conversation
@yallop Any feedback on this? We would need it merged to add this functionality to liquidsoap: savonet/liquidsoap#1050. We can expose these data types in https://github.com/toots/ocaml-posix-time if needed otherwise. |
Another, perhaps better approach, would be to take the whole |
The Appveyor build is failing because Do you definitely need |
Ha, I see, thanks for the explanation @yallop. Yeah, it's the data type used in https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html to bind some common functions that I would like to export such as In this case, what do you think of taking |
I think it's a good idea (although I think it's best to deprecate it first, rather than take it out straightaway). Actually, the posix-types package is already a start in that direction; I'm not sure offhand how it compares to the
That sounds very useful. As I think you know, @dsheets has quite a few of these: unix-errno, unix-fcntl, unix-sys-resource, unix-sys-stat, unix-time, and several osx-specific libraries, too. (You might also find it interesting to look at how those libraries use |
Awesome! Yes, of course deprecating first is good although with I didn't know about posix-types module, great starting point and, yes, I use already use @dsheets's modules in my own, which is also what gave me the idea to consolidate all these projects. Lastly, when working on I'll work on a proposal then and will come back to y'all soon. Thanks! |
Ok, here's a proposal: https://github.com/savonet/ocaml-posix The repositry has:
I think it looks pretty exciting. What do y'all think of it @yallop and @dsheets ? Ultimately, I'd like to bring all the various posix-related modules under that umbrella. |
Actually, |
I'm not sure why
useconds_t
was originally marked as abstract and not exported with concrete type. The posix specification is clear about it:I'm also adding
suseconds_t
while at it. Its specification is also clear:Source: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html
I'm planning on using these for https://github.com/toots/ocaml-posix-time