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

More extensive ioctl support for OSX #1485

Merged
merged 7 commits into from
May 7, 2016
Merged

More extensive ioctl support for OSX #1485

merged 7 commits into from
May 7, 2016

Conversation

sanjayss
Copy link
Contributor

I followed the .h structure on OSX and split the ioctl functionality into ioccom.d (for some basic macros), ttycom.d (that separates out terminal functionality) and filio.d (which has some file related ioctl commands).

@@ -323,13 +323,7 @@ else version (OSX)
import core.sys.posix.termios; // termios
import core.sys.posix.sys.time; // timeval

struct winsize
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is winsize defined now for non-OSX posixes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you mean -- I only moved the 'struct winsize' from the version (OSX) block into ttycom.d. This is to reflect how it is placed in the C header files on OSX so someone moving to D from C on OSX knows where to look for this based on C documentation.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, I see what you mean, I didn't realize the context of the file in the diff. cool.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will move winsize back into ioctl.d. Even though I decided to follow the OSX header file model (and I will for the remaining things if there are no objections), I realized there may be existing D programs that include only ioctl.d and would have expected winsize to be present in ioctl.d itself (i.e for backwards compatibility).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of getting winsize back into ioctl.d, I reverted to your original suggestion and made the ttycom and filio imports public. This way, now people can simply include ioctl module and don't need to include the additional ttycom and filio modules. This avoids having to include ioctl in ttycom module, but also keeps the separation of definitions like in the C headers.

Copy link
Contributor

Choose a reason for hiding this comment

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

On Sun, Jan 31, 2016 at 07:39:35PM -0800, sanjayss wrote:

Instead of getting winsize back into ioctl.d, I reverted to our original suggestion and made the ttycom and filio imports public. This way, now people can simply include ioctl module and don't need to include the additional ttycom and filio modules. This avoids having to include ioctl in ttycom module, but also keeps the separation of definitions like in the C headers.

Cool, I think that will please everyone.

@DmitryOlshansky
Copy link
Member

What's the state of this? @adamdruppe

@sanjayss
Copy link
Contributor Author

If the question was directed to me -- there is nothing more to add or
change and the pull request is in it's final state unless someone points
out any issues.

On Fri, Apr 1, 2016 at 6:03 AM, Dmitry Olshansky notifications@github.com
wrote:

What's the state of this? @adamdruppe https://github.com/adamdruppe


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1485 (comment)

@DmitryOlshansky
Copy link
Member

Auto-merge toggled on

@DmitryOlshansky DmitryOlshansky merged commit 6ea3a58 into dlang:master May 7, 2016
@sanjayss sanjayss deleted the ioctl-for-osx branch January 20, 2017 18:01
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.

3 participants