Conversation
src/core/sys/netbsd/sys/cdefs.d
Outdated
| @@ -0,0 +1,16 @@ | |||
| /** | |||
| * D header file for FreeBSD | |||
| * | |||
|
I diffed this PR against the pre-existing Fix that comment and the five remaining links to FreeBSD SVN headers, and I see no harm in merging. |
f3835cd to
d460689
Compare
|
Fixed |
|
Do we have links to NetBSD reference C headers? |
|
What about Makefile changes to maybe compile and install these interface modules? |
|
LDC doesn't use the upstream build system, and DMD doesn't support NetBSD... |
|
Hmm, you might have a point regarding doc building. I always forget how that is handled, cross-platform-wise. |
Documentation for those who could support it when the time comes to downstream. :-) |
Actual NetBSD layout is differ. Currently I have FreeBSD layout + NetBSD changes. I should reorganize elf related files to conform NetBSD headers. |
d460689 to
a9955f4
Compare
a9955f4 to
d7ad4d0
Compare
cbeac82 to
5960696
Compare
5960696 to
a9f4e7a
Compare
Codecov Report
Continue to review full report at Codecov.
|
a9f4e7a to
60e2a2f
Compare
|
So I guess this still has to be reorganized to conform to the NetBSD layout? We try to keep these include files the same as the headers, so that would help. |
60e2a2f to
accddad
Compare
|
I added links to netbsd headers in each file and remove one file which is not related to netbsd. |
joakim-noah
left a comment
There was a problem hiding this comment.
Downloaded and diffed this against the FreeBSD directory, looks pretty much the same with some tweaks. Try diffing it against the latest FreeBSD version and making any updates needed, like the alias syntax I mentioned. If you're happy with it after that, we might as well merge, considering the other NetBSD changes are in and we can always modify this later.
src/core/sys/netbsd/dlfcn.d
Outdated
| int __dlfunc_dummy; | ||
| }; | ||
|
|
||
| alias void function(__dlfunc_arg) dlfunc_t; |
There was a problem hiding this comment.
Can you change this to the alias = syntax, as now done in the same FreeBSD module? Same with the __externC alias below.
src/core/sys/netbsd/sys/link_elf.d
Outdated
| private alias extern(C) int function(dl_phdr_info*, size_t, void *) @nogc dl_iterate_phdr_cb_ngc; | ||
| extern int dl_iterate_phdr(dl_iterate_phdr_cb __callback, void*__data); | ||
| extern int dl_iterate_phdr(dl_iterate_phdr_cb_ngc __callback, void*__data) @nogc; | ||
|
|
accddad to
f7f2836
Compare
|
I fixed issues (alias & empty line). I did not find anything new in current FreeBSD sources. I agree to merge this PR now. I will wait while LDC team merge current druntime master to their repository and after this I can refresh unit tests status (new LDC, new druntime, and new NetBSD 7.1 too) and may be send additional PRs. |
|
|
||
| version (NetBSD): | ||
| extern (C): | ||
| nothrow: |
There was a problem hiding this comment.
FreeBSD file has @nogc attribute here, missing in yours. Why not add that attribute to all the header files?
There was a problem hiding this comment.
Thanks, my fault - fixed
f7f2836 to
24bc730
Compare
joakim-noah
left a comment
There was a problem hiding this comment.
Would be better if all the files had the@nogc attribute, but not a big deal.
|
btw, it will take a while before these patches get to ldc, so let me know if you'd rather work with the beta 1.2 branch or master 1.3 branch and I will cherry-pick these commits for ldc earlier. |
|
Pinging @klickverbot, maybe Kai can announce NetBSD support at DConf. ;) |
dnadlinger
left a comment
There was a problem hiding this comment.
This only continues what has been started already, so should be fine.
|
joakim-noah |
|
I've cherry-picked the three NetBSD druntime commits into ldc's master 1.3 branch. You will need to check out the latest druntime HEAD manually, until the submodule is updated. |
A part of NetBSD support (joakim-noah suggests to split original big pull request)