Skip Menu |

This queue is for tickets about the IO-Tty CPAN distribution.

Report information
The Basics
Id: 101094
Status: resolved
Priority: 0/
Queue: IO-Tty

People
Owner: Nobody in particular
Requestors: DCOLLINS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.12
Fixed in: (no value)

Attachments
unknown.IO-Tty-1.12.BePC-haiku.1.1419299715.31389.rpt



Subject: `make` error on haiku
Greetings, When attempting to `make` this module on Haiku, some errors in Tty.xs present themselves: 815: parse error before `struct` 817: `ws` undeclared I was able to fix this error and allow the module to pass all tests on this platform using the following patch: pack_winsize(row, col, xpixel = 0, ypixel = 0) - int row - int col - int xpixel - int ypixel INIT: + int row; + int col; + int xpixel; + int ypixel; struct winsize ws; CODE: Test report is attached.
Subject: unknown.IO-Tty-1.12.BePC-haiku.1.1419299715.31389.rpt

Message body not shown because it is not plain text.

Applying that patch on OSX for causes the output below. I suspect I'd see the same thing on linux. "/usr/bin/perl" "/Library/Perl/5.18/ExtUtils/xsubpp" -typemap "/System/Library/Perl/5.18/ExtUtils/typemap" Tty.xs > Tty.xsc && mv Tty.xsc Tty.c cc -c -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"1.13_01\" -DXS_VERSION=\"1.13_01\" "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_SIGACTION -DHAVE_STRLCPY -DHAVE_TERMIOS_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT -DHAVE_UTIL_H Tty.c Tty.xs:530:12: warning: implicit declaration of function 'openpty' is invalid in C99 [-Wimplicit-function-declaration] ret = openpty(ptyfd, ttyfd, NULL, NULL, NULL); ^ Tty.xs:844:9: error: expected ';' at end of declaration int row ^ ; Tty.xs:845:9: error: expected ';' at end of declaration int col ^ ; Tty.xs:846:12: error: expected ';' at end of declaration int xpixel ^ ; Tty.xs:847:12: error: expected ';' at end of declaration int ypixel ^ ; Tty.xs:866:3: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat] SvCUR(winsize), sizeof(ws)); ^~~~~~~~~~~~~~ /System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/sv.h:1222:23: note: expanded from macro 'SvCUR' # define SvCUR(sv) ((XPV*) SvANY(sv))->xpv_cur ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Tty.xs:866:19: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] SvCUR(winsize), sizeof(ws)); ^~~~~~~~~~ 3 warnings and 4 errors generated. make: *** [Tty.o] Error 1
Git's patch for reference: diff --git a/Tty.xs b/Tty.xs index 1e4ac79..bbcf585 100644 --- a/Tty.xs +++ b/Tty.xs @@ -840,11 +840,11 @@ InOutStream handle SV * pack_winsize(row, col, xpixel = 0, ypixel = 0) + INIT: int row int col int xpixel int ypixel - INIT: struct winsize ws; CODE: ws.ws_row = row;
Ticket migrated to github as https://github.com/toddr/IO-Tty/issues/19