-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
OpenBSD Improvements #5558
OpenBSD Improvements #5558
Conversation
chris-huxtable
commented
Jan 9, 2018
- Improves readability of arguments
- Improves similarity to referenced c headers
- Expands several sets of constants, functions, and function like macros
Reorders and comments constants to be more consistant with the contents of unistd.h
Based on termios.h
Based on sysctl.h
“The explicit_bzero() variant behaves the same [as bzero()], but will not be removed by a compiler's dead store optimization pass, making it useful for clearing sensitive memory such as a password.”
Based of pthread.h and pthread_np.h
Based on netdb.h
Based on netdb.h
Based on fcntl.h
Based on errno.h
Consistant with fcntl.h
To meet pre-existing requirements
ba5ca21
to
5c4343f
Compare
I'm sorry you took so much time to update C bindings for OpenBSD. They were automatically generated, and OpenBSD C headers don't set names for function arguments, hence the placeholder. Hence absense of comments, ... We aim to eventually generate bindings on-the-fly, so any manual work in C bindings is superfluous, since bindings will be overwritten sooner or later with other automatically generated ones. |
Maybe we should add some comment at the top of these files that they're generated and manual changes might get overwritten? Ideally the generator would add such. |
It's my opinion that saying "these C bindings are automatically generated" doesn't make any sense when we don't even have up-to-date manifests equivalent to all the manual definitions that have accumulated since these were automatically bootstrapped. We can't (without work) generate the equivalent set of C bindings in the stdlib today, so how can we say they're automatically generated? To me it's a double standard (we accept some manual edits but not others) which must be rectified by re-generating the bindings from scratch and not accepting any more edits which aren't generated by the generator. |
Why would we discard manually built documents if they were superior to ones auto-generated? That artificially keeps the base only as good as it can be auto-generated which has pretty big limitations without arg names and type errors. The end goal may be to auto-generate bindings on-the-fly but useful information is missed or doesn't make its way through. Shouldn't these files be as human friendly as possible? Wouldn't a better and easier solution be a checker then a generator? Something that picks up on differences between the crystal and c headers and flags discrepancies rather then writing over everything wholesale? This would allow the best of both worlds. |
@chris-huxtable I believe all the docs about this is in |