Greetings,
There appears to be an incompatibily between the type of Seek as declared
on line 36 of perliol.h in the perl@186389 kit:
IV (*Seek) (pTHX_ PerlIO *f, Off_t offset, int whence);
and the return type of PerlIOVia_seek as declared at line 349 of ext/PerlIO/via/via.xs:
Off_t
PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
that is visible perhaps only to extraordinarily picky compilers
that draw a distinction between type int and type long (even if they are
the same size). For example using DEC C V6.0-001 on OpenVMS V7.3-1 I
have these types in my config.h:
$ search config.h Off_t
#define Off_t int /* <offset> type */
#define Off_t_size 4 /* <offset> size */
$ search config.h IVSIZE,IVTYPE
#define IVTYPE long /**/
#define IVSIZE 4 /**/
But the compiler complains with this message on an attempt to build
perl@186389 out of the box:
%COPY-S-COPIED, DKA300:[PERL.PERL.EXT.PERLIO.VIA]VIA.OPT;1 copied to
DKA300:[PERL.PERL.LIB.AUTO.PERLIO.VIA]VIA.OPT;1 (1 block)
MCR [---]miniperl.exe "-I[---.lib]" "-I[---.lib]" [---.lib.ExtUtils]xsubpp -typemap
[---.lib.ExtUtils]typemap VIA.xs >VIA.C
CC/DECC /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj
/float=ieee/ieee=denorm_results/Define=("VERSION=""0.01""","XS_VERSION
=""0.01""")/Include=([---])/NoList VIA.c
PerlIOVia_seek,
.^
%CC-W-PTRMISMATCH, In the initializer for PerlIO_object.Seek, the referenced type of
the pointer value "PerlIOVia_seek" is "function
(pointer to pointer to struct _PerlIO, int, int) returning int", which is not
compatible with "function (pointer to pointe
r to struct _PerlIO, int, int) returning long".
at line number 598 in file DKA300:[PERL.PERL.EXT.PERLIO.VIA]VIA.XS;1
A solution would be to change either perliol.h or ext/PerlIO/via/via.xs.
Here is a patch that takes the latter approach (I've not had time to
explore the potential patch to perliol.h) that I have had time to
test on only the one platform (DEC C 6 && VMS 7.3-1), despite the fact
that it affects all platforms that will attempt to compile PerlIO/Via:
--- ext/PerlIO/via/via.xs;1 Tue Feb 4 10:07:54 2003
+++ ext/PerlIO/via/via.xs Tue Feb 4 11:42:10 2003
@@ -346,7 +346,7 @@
return SvIV(result);
}
-Off_t
+IV
PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
END OF PATCH
I hope that helps someone. The patched perl fails 9 tests (one of
which is a local config issue that is definitely not perl's fault).
I'll try to address those later.
By the way, when is the release of 5.8.1 expected to occur?
Peter Prymmer