Conversation
|
Thanks for your pull request, @jmdavis! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2265" |
| } | ||
|
|
||
|
|
||
| enum ulong MNT_RDONLY = 0x0000000000000001; |
There was a problem hiding this comment.
I would have grouped the constants in an enum MNT : ulong { /+ ... +/ } aggregate and then "exported" out the individual members as aliases. Easily automatable via static foreach + mixin.
There was a problem hiding this comment.
Except that we haven't been doing enums like that in druntime. This file does with FFlag, but it's the only one, and I'm actually planning to create a PR after this to remove it so that they're just enums directly in the module like we've done everywhere else when porting constants from C in druntime. While it's not how I'd do it if I were writing proper D code, it's closer to how the C code actually is and thus makes using the C bindings more like using the actual C functions and constants in C.
I also don't see much benefit in having all of the values in there twice, even if the generation of the second set of them is automated.
For some reason, FreeBSD's declarations for core.sys.posix.sys.statvfs are statfs declarations that come from sys/mount.h rather than sys/statvfs.h. This adds core.sys.freebsd.sys.mount and moves the statfs stuff to there and then adds the correct declarations to core.sys.posix.sys.statvfs.