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

Add functions that are missing on Android #54

Closed
wants to merge 2 commits into from

Conversation

rwbarton
Copy link
Contributor

No description provided.

@rwbarton
Copy link
Contributor Author

I have built the unix package for Android with these changes and verified that the functions involved appear to work as expected (drainOutput does not appear to do anything and getControllingTerminalName returns "/dev/tty", which even exists and acts as normal).

/* Provide ctermid() if it is missing (as on some Android versions). */

#include "HsUnixConfig.h"
#ifndef HAVE_CTERMID
Copy link
Member

Choose a reason for hiding this comment

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

Fwiw, I consider the use of #ifdefs for boolean macros bad style; I know that the unix package currently still has a lot of #ifdef HAVE_* around, but I'm considering replacing those at some point

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to make that change at some point, including the occurrences in this file.

@hvr
Copy link
Member

hvr commented Jan 28, 2016

In conclusion, I suggest a more principled way to address this issue.

@rwbarton
Copy link
Contributor Author

I can change the function names to hsunix_tcdrain and hsunix_ctermid.

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.

2 participants