Skip to content
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

Need / want Solaris / illumos support #95

Closed
gdamore opened this issue Sep 4, 2015 · 3 comments
Closed

Need / want Solaris / illumos support #95

gdamore opened this issue Sep 4, 2015 · 3 comments

Comments

@gdamore
Copy link

gdamore commented Sep 4, 2015

On illumos/Solaris systems I cannot compile due to many undefined syscall_XXXX warnings. It looks like you generated the values automatically? Any chance I can help with that and get you a pull request?

@nsf
Copy link
Owner

nsf commented Sep 5, 2015

Yes, as you can see they are generated automatically. And in each of automatically generated files there is a line showing how it was generated: cgo -godefs syscalls.go

But I think right now cgo is available through go tool, So:

Run go tool cgo -godefs syscalls.go on your solaris machine.

@gdamore
Copy link
Author

gdamore commented Sep 21, 2015

So I've been looking at this quite a bit, because it turns out that illumos/solaris lacks also ioctl. Which is silly but ...

I've come up with a quite different approach, that I think will be far superior. It turns out that tcsetattr() and tcgetattr() need to be present as they are required for POSIX compliance (OpenGroup), and are present on all the UNIX like systems (also plan9!) go supports, so we can just change the code to call those directly.

Additionally, there is little or no value in the use of SIGIO and non-blocking IO, or even low level file descriptors. We can make this all work with standard os.File operations, resulting in a simpler read loop.

I'll be sending you a PR shortly that has both these changes -- basically vastly improving portability to UNIX systems, and allowing us to remove the need to predefine syscalls for every UNIX. Stay tuned -- will post this later today.

@gdamore
Copy link
Author

gdamore commented Sep 21, 2015

Ok, this is fixed in PR #99 -- please have a look.

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

No branches or pull requests

3 participants