Subject: | Won't compile with Multipliticy and without iThreads |
When usemultiplicity is set but useithreads is not, such as with
ActiveState 5.6.1, Storable will not compile.
cc -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.15\" -DXS_VERSION=\"2.15\"
-fpic
-I/usr/local/stow/perl-5.6.1-a633/lib/perl5/5.6.1/i686-linux-multi/CORE
Storable.c
Storable.xs: In function `sortcmp':
Storable.xs:2221: `my_perl' undeclared (first use in this function)
Storable.xs:2221: (Each undeclared identifier is reported only once
Storable.xs:2221: for each function it appears in.)
make: *** [Storable.o] Error 1
See the explaination in the thread below.
http://www.gossamer-threads.com/lists/perl/porters/185252?do=post_view_threaded#185252
The fix for 5.6.1 is to simply remove the guard around dTHX. It will
compile out. I don't know what will happen on earlier versions of Perl,
you may need to put in a new guard based on Perl version.
--- Storable.xs 2006/02/02 19:26:04 1.1
+++ Storable.xs 2006/02/02 19:27:20
@@ -2215,9 +2215,7 @@
static int
sortcmp(const void *a, const void *b)
{
-#if defined(USE_ITHREADS)
dTHX;
-#endif /* USE_ITHREADS */
return sv_cmp(*(SV * const *) a, *(SV * const *) b);
}