[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2008-03-17 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: i'd say the patch is fine. on linux ioctl takes an int. on openbsd it takes an unsigned long. on something else it might even take its own type like an ioctl_t. regardless, treating the parameter as either a long or unsigned long will work

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2008-03-17 Thread Nicholas Marriott
Nicholas Marriott <[EMAIL PROTECTED]> added the comment: It's not the return value, it's the request argument (second argument). I thought SUSv3 had it as an int, but looking again its ioctl seems to be a) optional and b) all about STREAMS, so I don't think it applies: http://www.opengroup.org/o

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2008-03-17 Thread Sean Reifschneider
Sean Reifschneider <[EMAIL PROTECTED]> added the comment: I think this proposed change needs some research into what the standards say about ioctl's return code, and if the change to a long return code is done then test it on Linux to see if it breaks things or if it works. Thoughts? --

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-12-05 Thread Mike Savory
Mike Savory added the comment: Similar issue seen in 64 bit OSX 10.5 File "./ajaxterm.py", line 418, in create fcntl.ioctl(fd, struct.unpack('i',struct.pack('I',termios.TIOCSWINSZ))[0], struct.pack("",h,w,0,0)) IOError: [Errno 25] Inappropriate ioctl for device $ python Python 2.5.1

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-12-05 Thread Mike Savory
Changes by Mike Savory: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-20 Thread Nicholas Marriott
Nicholas Marriott added the comment: Okay, looks like my guess was correct. The diff at the end of this mail makes it work on OpenBSD/amd64 and it continues to work on i386, but it will probably break Linux (due to the problem it was working around mentioned in the comment at the beginning). I

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-20 Thread Nicholas Marriott
Nicholas Marriott added the comment: I can also reproduce this on OpenBSD/amd64 and was one of the people who discussed it with the submitter before he created this report. > So what's the definition of struct winsize on these systems? The definition of struct winsize on both 32-bit and 64-bit

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-19 Thread Martin v. Löwis
Martin v. Löwis added the comment: So what's the definition of struct winsize on these systems? Also, why do you think this is a bug in Python? AFAICT, the specific ioctl call does not occur in Python, but in your own code. -- nosy: +loewis resolution: -> invalid status: open -> pendin

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-19 Thread fbvortex
fbvortex added the comment: The following C code, when compiled with -lutil runs without reporting any errors on both the sparc64 and i386 platforms on OpenBSD: #include #include #include #include #include int main(void) { int fd; struct winsize w; w.ws_row = 25;

[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-19 Thread fbvortex
New submission from fbvortex: The following lines of code work on Linux platforms (amd64), and 32-bit OpenBSD (i386), but not on 64-bit OpenBSD platforms (at least not on amd64 or sparc64): import fcntl,os,pty,termios,select,sys,struct,pwd,signal,os pid,fd=pty.fork() fcntl.ioctl(fd, termios.TIOC