Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

netbsd patch: core/sys/posix #1494

Merged
merged 1 commit into from
Mar 15, 2017
Merged

Conversation

sibnick
Copy link
Contributor

@sibnick sibnick commented Feb 4, 2016

A part of NetBSD support (joakim-noah suggests to split original big pull request)

@sibnick sibnick mentioned this pull request Feb 4, 2016
int inet_pton(int, in char*, void*);
}

else version( Solaris )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've also added a solaris path here. :-)

else
{
DIR* opendir(in char*);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usual penance if you discover a discrepancy on one platform is to write a version block for each known tested platform, using static assert (0) for the else branch.

This alerts the next person who will port this code to go check and verify that it's defined properly.

@sibnick
Copy link
Contributor Author

sibnick commented Feb 4, 2016

to ibuclaw : fixed (remove solaris duplicate block)

@@ -124,6 +124,31 @@ else version( FreeBSD )
const(char)* inet_ntop(int, in void*, char*, socklen_t);
int inet_pton(int, in char*, void*);
}
else version( NetBSD )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am aware that druntime is inconsistent everywhere about this. But I'd rather all new code follow the same (standard?) convention for version statements.

else version (NetBSD)
{

@joakim-noah
Copy link
Contributor

Skimmed just to make sure all changes are isolated to version(NetBSD) blocks, looks good on that front.

@sibnick
Copy link
Contributor Author

sibnick commented Feb 4, 2016

replace version( NetBSD ) with version(NetBSD)
remove blank lines
dirent.d : add version block for each known tested platform, using static assert (0) for the else branch

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request head (netbsd_core_sys_posix@a21504b).


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0bf08d...a21504b. Read the comment docs.

@ibuclaw
Copy link
Member

ibuclaw commented Feb 13, 2017

Looks like you missed one blank line. Other than that looks ok to me.

@sibnick
Copy link
Contributor Author

sibnick commented Feb 13, 2017

Iain
Are you talking about last empty line in termios.d?

I added empty line to termios.d and remove one blank line in poll.d

@ibuclaw
Copy link
Member

ibuclaw commented Feb 14, 2017

@nrTQgc - there was a comment from @joakim-noah that was listed as not updated last time I looked. I can't see it now so I guess all is OK.

Copy link
Contributor

@joakim-noah joakim-noah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed to make sure changes are encapsulated and for formatting: once these changes are made, can approve.

enum PTHREAD_COND_INITIALIZER = pthread_cond_t(0x55550005);
enum PTHREAD_RWLOCK_INITIALIZER = pthread_rwlock_t(0x99990009);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove blank line

int sa_flags;
}
}
else version(NetBSD)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be OpenBSD

int sigpause(int);
int sigrelse(int);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank line

@sibnick
Copy link
Contributor Author

sibnick commented Mar 15, 2017

joakim-noah - I fixed you issues

@dnadlinger
Copy link
Member

Merging as it has been okay'd by two reviewers.

@dlang-bot dlang-bot merged commit be8b8ea into dlang:master Mar 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants