-
Notifications
You must be signed in to change notification settings - Fork 73
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
Update mkfile #318
Update mkfile #318
Conversation
Hi Jens, Just to make sure I'm understanding this : the problem is that, for Plan 9, we ought to use If we know it'll all be available, then we can just pull your change. If not, we should do something more specific. One possibility would be to modify this line to add something like #if defined( _DEFAULT_SOURCE) || defined( _BSD_SOURCE) || defined( _PLAN_9)
(or similar macro specifying we're on Plan 9). Alternatively, we could add a very specific Thanks! -- Bill |
Hi. I have -D_BSD_EXTENSION defined so most stuff should be covered. I have not done a new test of the library against demos yet, but the library built just fine without any complaints. If the build would have assumed some other functionality under _BSD_SOURCE I guess it would already have been during compilation or linking? Just after I made that change, I noticed that you now have term.h and some terminfo stub stuff so I changed again in a 2nd commit to the same pull request. |
but indeed we have gettimeofday in sys/time.h https://github.com/rdbyk/9front/blob/master/sys/include/ape/sys/time.h |
I think that at present, you are correct in thinking that #defining However... further inspection makes me think that #defining #if defined( _DEFAULT_SOURCE) || defined( _BSD_SOURCE) || defined(_BSD_EXTENSION)
and we'd get the desired behavior without any knock-on effects. Thanks for taking this on. I've had thoughts for some time of setting up Plan 9 and learning a bit about it (seems to have some interesting ideas in it), but haven't actually done so. So I could have broken things in Plan 9 PDCursesMod without realizing it... hope that hasn't happened! |
Sure that sounds great to me. Also the option of a -DGETTIMEOFDAY_AVAILABLE would be perfectly fine for me as a more granular definition if we indeed expect more general divergence based on _BSD_SOURCE. From I read about the above discussion that had to do with the implementation in glibc, which of course is not relevant for Plan9. I can change the pull request to utilize -DGETTIMEOFDAY_AVAILABLE if you want |
Please go with standard names: -DHAVE_GETTIMEOFDAY
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - can you please squash those commits into one?
Add -D_BSD_SOURCE to successfully include <sys/time.h> in some files that have changed. Update mkfile - add term.h terminfo / term.h now installed add -DHAVE_GETTIMEOFDAY instead of -D_BSD_SOURCE added some new demo tests to mkfile
I've stayed away from the |
t is totally fine (and correct) to use the |
Add -D_BSD_SOURCE to successfully include <sys/time.h> in some files that have changed.