]> granicus.if.org Git - python/commit
Prevent ioctl op codes from being sign extended from int to unsigned long
authorGregory P. Smith <greg@mad-scientist.com>
Wed, 19 Mar 2008 23:03:25 +0000 (23:03 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Wed, 19 Mar 2008 23:03:25 +0000 (23:03 +0000)
commita5cfcad0e35e394adb5d25a5f5fbc3065fea5b85
tree3f7fe7e5325a12965f5e450b8132abac7c873ef5
parent48581c5f08d368942840f99687fce7f10758fa7c
Prevent ioctl op codes from being sign extended from int to unsigned long
when used on platforms that actually define ioctl as taking an unsigned long.
(the BSDs and OS X / Darwin)

Adds a unittest for fcntl.ioctl that tests what happens with both positive and
negative numbers.

This was done because of issue1471 but I'm not able to reproduce -that- problem
in the first place on Linux 32bit or 64bit or OS X 10.4 & 10.5 32bit or 64 bit.
Doc/library/fcntl.rst
Lib/test/test_fcntl.py
Modules/fcntlmodule.c