Subject: | Curses won't build multithreaded (here's a patch) |
Module version: Curses-1.06
Perl version: This is perl, v5.8.0 built for i586-linux-thread-multi
OS and hardware: Linux xena 2.4.20-rc2 #7 Wed Nov 20... i686 unknown
Distro: SuSE 8.1 (which now standardly gives you multithread perl)
gcc version: 3.2
Build options: perl Makefile.PL PANELS MENUS (not FORMS)
Error message: Curses.c:275: too few arguments to function `Perl_sv_isa'
In the attached patch for Curses.c I changed Perl_sv_isa to just sv_isa, allowing the macro to provide aTHX_ as suggested in "perldoc -t perlguts" (about 79% through). This allows Curses to compile and run all the demos.
FORMS could not be turned on because:
Curses.c:148: `FIELD' undeclared (first use in this function)
Even though it's a typedef in /usr/include/forms.h and was not blocked out by conditionalization as far as I could see. I didn't research this further since my current project doesn't actually need forms.
I got these warning messages (from gcc 3.2) which I did not try to track down:
cc -c -I/usr/include/ncurses -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 --pipe -DVERSION=\"1.06\" -DXS_VERSION=\"1.06\" -fPIC "-I/usr/lib/perl5/5.8.0/i586-linux-thread-multi/CORE" Curses.c
In file included from /usr/lib/perl5/5.8.0/i586-linux-thread-multi/CORE/perl.h:1713,
from Curses.c:14:
/usr/lib/perl5/5.8.0/i586-linux-thread-multi/CORE/handy.h:83:1: warning: "bool" redefined
In file included from c-config.h:9,
from Curses.c:11:
/usr/include/curses.h:120:1: warning: this is the location of the previous definition
In file included from Curses.c:344:
CursesFun.c: In function `XS_Curses_newterm':
CursesFun.c:1279: warning: initialization from incompatible pointer type
CursesFun.c:1280: warning: initialization from incompatible pointer type
CursesFun.c: In function `XS_Curses_unctrl':
CursesFun.c:3362: warning: initialization discards qualifiers from pointer target type
CursesFun.c: In function `XS_Curses_putwin':
CursesFun.c:3453: warning: initialization from incompatible pointer type
CursesFun.c: In function `XS_Curses_getwin':
CursesFun.c:3472: warning: initialization from incompatible pointer type
-- Jim Carter <jimc@math.ucla.edu>
--- Curses-1.06.orig/Curses.c 2001-07-25 10:10:38.000000000 -0700
+++ Curses-1.06/Curses.c 2002-11-24 20:13:31.000000000 -0800
@@ -272,7 +272,7 @@
SV *sv;
int argnum;
{
- if (Perl_sv_isa(sv, "Curses::Window")) {
+ if (sv_isa(sv, "Curses::Window")) {
WINDOW *ret = (WINDOW *)SvIV((SV*)SvRV(sv));
return ret;
}