From owner-freebsd-python@FreeBSD.ORG Thu Jun 24 18:39:20 2010 Return-Path: Delivered-To: python@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id C847F1065674; Thu, 24 Jun 2010 18:39:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: python@FreeBSD.org Date: Thu, 24 Jun 2010 14:38:55 -0400 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201006241438.57414.jkim@FreeBSD.org> Cc: perky@FreeBSD.org Subject: [PATCH] ioctl(2) fixes for 64-bit platforms X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jun 2010 18:39:20 -0000 Python handles ioctl(2) strangely and causes warnings on 64-bit platforms. The analysis was originally posted here: http://docs.freebsd.org/cgi/mid.cgi?201006231708.40032.jkim Now I made more complete patch for all Python ports and it is available from here: http://people.freebsd.org/~jkim/python-fcntlmodule.diff Note I also fixed a Linuxism of fcntl(2) for python31. They use 'long' for the optional third argument of fcntl() unlike POSIX and *BSD. It's okay for little-endian or 32-bit platforms but I guess it is bad for big-endian LP64 machines. While I was here, I updated test cases of ioctl() for all Python ports. I also added FreeBSD -CURRENT for python31 but I didn't bother test cases of older releases. :-) Please review the patch. Thanks, Jung-uk Kim