-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-29619: Do not rely on HAVE_LARGEFILE_SUPPORT for the size of type… #1666
Conversation
@@ -1927,14 +1927,12 @@ _pystat_fromstructstat(STRUCT_STAT *st) | |||
return NULL; | |||
|
|||
PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode)); | |||
#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS) | |||
Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino)); |
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.
I would prefer to see the build assert in the else block.
PEP 7 now requires {...} around if blocks.
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.
I think that compilers are smart enough to computes the check at compile time, and so remove the dead code. I mean, I like your change. I just ask minor changes.
It is nice to know, thanks 😄 |
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, thanks for the fix Xavier.
Thank you Xavier for taking care of Android :-)
|
Shouldn't this get backported to 3.6 after the backport #584 broke 3.6 so that 3.6.2 unfortunately does not compile on Android? |
My understanding is that, Android not being a supported platform, changes that are specific to Android are only made to the master branch. I may be wrong. |
My fault then. Thought 3.6 was targeting Android but that's not actually stated anywhere (There are some Android specific things in the 3.6 changelog though). |
IMHO this change is simple enough to justify a backport: I created the PR #3102. While 3.6 doesn't fully support Android, we are doing our best support Android and any kind of help is welcome! |
Encountered this issue while compiling PyQt5 for RaspberryPi/ARM with Python 3.6.2. Copying e.g.:
|
@thijstriemstra: Cool! Good to know. I hope that slowly, we will get a release with a correct Android support. Thanks @xdegaye for the long term effort on supporting Android! |
…s not off_t.