Skip to content

Port transform and use libbsd #13

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

Merged

Conversation

KatashiMonosato
Copy link
Contributor

Rebased branch
Just tackling some very low hanging fruits without understanding much yet :)

@MadCoder
Copy link
Contributor

Looks interesting, I don't have a linux setup (yet?) so @dgrove-oss (or any other people involved with the linux port) should have a look that it works for them.

@dgrove-oss
Copy link
Contributor

I can take a look and verify whether or not it builds for me.

The main question I have is whether or not we want to add libbsd as a pre-req for libdispatch. It would make somethings simpler and maybe is expedient. But it is one more thing to install. Any guidance?

@dgrove-oss
Copy link
Contributor

To successfully link and run a test program, I had to put back in the stub definitions for mach_error_string and mach_task_self in shims/linux_stubs.c. With that tweak, it seems fine. On a previous pull request, Daniel had requested we use #ifdef APPLE instead of #if HAVE_MACH. Not sure if that also applies to this pull request too or if HAVE_MACH is ok to use in these files.

void _dispatch_runloop_queue_dispose() { LINUX_PORT_ERROR(); }
char* mach_error_string(mach_msg_return_t x) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I had to leave mach_error_string stubbed out to get a test program to link.

@MadCoder
Copy link
Contributor

the libbsd-dev thing makes sense to me, it's available on all platforms, else you will have to redo what it does in dispatch which sounds like a waste. The argument against would be performance but I don't think strlcpy() and getprogname() are worth considering this.

linux distro package systems will handle the rdeps for you just fine.

@KatashiMonosato
Copy link
Contributor Author

I fixed what @dgrove-oss asked for, and merged master to fix the libdispatch_la_LIBADD variable that was touched in two places now.

MadCoder added a commit that referenced this pull request Dec 15, 2015
@MadCoder MadCoder merged commit e7ca00f into swiftlang:master Dec 15, 2015
das pushed a commit that referenced this pull request Jun 14, 2016
…bbsd

Port transform and use libbsd

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants