Christian Heimes added the comment:
Oh sorry, I missed the point that you are talking about an existing constant in
the socket module. At first I thought that you were referring to a constant
that you have added.
It sounds like a bug for constants >= 2**31.
--
nosy: +haypo
Christian Heimes added the comment:
The constant is an unsigned long but PyModule_AddIntConstant() takes a signed
long. You have to write your own function that uses PyLong_FromUnsignedLong()
and PyModule_AddObject().
Do you get a compiler warning because 0x8000U is larger than (1<<31)-1?
New submission from Kyle Altendorf:
I am cross compiling Python 3.5.2 for use on a 32-bit ARM processor with Linux.
I use socket.CAN_EFF_FLAG and noticed that it is negative on the target
despite being positive on my host (64-bit Intel Linux).
Host:
altendky@tp:~$ uname -a
Linux tp