-
Notifications
You must be signed in to change notification settings - Fork 77
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
getpagesize() was removed from OSX (and posix) #177
Conversation
PAGE_SIZE is a macro that can be used (which I'm guessing is defined to be `sysconf(_SC_PAGESIZE)` probably)
Thanks for the PR! The SO post suggests that |
PAGE_SIZE didn't give warnings for me that it would be undefined, but OSX is literally all over the place per minor OS update, I wouldn't be surprised (btw _SC_PAGESIZE is a POSIX thing, not Mac specific https://stackoverflow.com/questions/37193749/getpagesize-vs-sysconf-sc-pagesize) |
I will try that later tonight |
Ok I think this makes a little bit more sense, but I also don't like it. |
ok this makes more sense I think, use the new way if possible, otherwise fallback to the old ways ofcourse the reason why getpagesize works on linux is because glibc tries to be backwards compatible with the middleages, and posix is embedded into that, Apple doesn't give a crap about backwards compatibility |
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.
Thank you so much, lgtm! I think this is probably the best way to go about it.
PAGE_SIZE is a macro that can be used (which I'm guessing is defined to be
sysconf(_SC_PAGESIZE)
probably)https://stackoverflow.com/questions/37897645/page-size-undeclared-c