-
-
Notifications
You must be signed in to change notification settings - Fork 426
Removing __mbstate_t union definition from core/stdc/stdio.d #2473
Conversation
…BSD and OpenBSD versions as they are already defined in core/stdc/wchar_.d and it is not used for any structure definition in stdio.d for Net/OpenBSD.
Thanks for your pull request and interest in making D better, @rmboggs! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. 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#2473" |
Thanks! Can you move the FreeBSD and DragonFlyBSD definitions to wchar_.d as well? |
LGTM, just noted comments to address. |
I was wondering about the other BSDs, actually. The only reason why I left them as is was because I didn't know what else relied on mbstate being in stdio.d, for FreeBSD at least since it is a supported platform. If you guys feel that such a change is safe, I'll do it. I'm just being cautious. |
Perhaps it should go in its own, but given a choice between the two, wchar_.d looks to be the better place to have the definition. In stdio.d, just be sure to have |
…ested. Really only impacts FreeBSD as DragonFlyBSD doesn't use it in stdio.d.
As far as I could see, in FreeBSD's libc implementation |
Ok, makes sense. I'll push an update as soon as I can. Thanks. |
The remaining odd one out looks to be Solaris, but I'm OK with handling that separately. |
Ok, well. All the other BSDS are updated accordingly now. Please take a good look at the FreeBSD and DragonFlyBSD updates as I can't test those at home currently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me, nice work!
Thanks, glad to help. Do you still need me to refactor mbstate_t for solaris? Looking at the code, I thought that one was fine as-is. |
Both NetBSD and OpenBSD have _mbstate_t union definitions in both stdio.d and wchar.d files in src/core/std. Since _mbstate_t should be defined in wchar.d and __mbstate_t isn't used by Net/OpenBSD in stdio.d anyway, just remove the defs from stdio.d and it should be ok.
Please let me know if anything else needs to be modified.