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
struct.pack() on 64bit architectures #40101
Comments
I'm running python on OpenBSD/sparc64 (SUN Ultra 10). On this machine struct.pack() gives me: >>> struct.pack('l', 1)
'\x00\x00\x00\x00\x00\x00\x00\x01'
>>> struct.pack('i', 1)
'\x00\x00\x00\x01' On i386 box I have: >>> struct.pack('l', 1)
'\x01\x00\x00\x00'
>>> struct.pack('i', 1)
'\x01\x00\x00\x00' Because of this, OpenBSD port uses attached patch. I Am I right? |
Logged In: YES For a Unix-head reviewer: the patch is to test_fcntl.py, I wonder whether we couldn't instead use "i" codes on all BSD- |
Logged In: YES I don't quite understand the current code: struct flock is struct flock {
off_t l_start; /* starting offset */
off_t l_len; /* len = 0 means until end
of file */
pid_t l_pid; /* lock owner */
short l_type; /* lock type: read/write,
etc. */
short l_whence; /* type of l_start */
}; and off_t is typedef int64_t quad_t; so it appears there is no padding at all. In any case, |
test_fcntl was fixed in r38766 and r38767 to support http://svn.python.org/view?rev=38766&view=rev That fix is included in Python 2.4.2 and above. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: