From: Jarkko Hietaniemi Date: Wed, 5 Jul 2000 00:25:21 +0000 (+0000) Subject: Integrate with Sarathy, preliminary fix for unicos X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69b7060a1d32648ced806eebdc6a9761907b70c9;p=p5sagit%2Fp5-mst-13.2.git Integrate with Sarathy, preliminary fix for unicos alignment problems in [ID 20000612.002] Perl problem on Cray system. p4raw-id: //depot/cfgperl@6315 --- 69b7060a1d32648ced806eebdc6a9761907b70c9 diff --cc sv.h index 0e12554,c0ce967..23cf29e --- a/sv.h +++ b/sv.h @@@ -363,7 -353,7 +363,17 @@@ struct xpvio PerlIO * xio_ifp; /* ifp and ofp are normally the same */ PerlIO * xio_ofp; /* but sockets need separate streams */ -- DIR * xio_dirp; /* for opendir, readdir, etc */ ++ /* Cray addresses everything by word boundaries (64 bits) and ++ * code and data pointers cannot be mixed (which is exactly what ++ * Perl_filter_add() tries to do), hence the following ++ * union trick (as suggested by Gurusamy Sarathy). ++ * For further information see Geir Johansen's problem report titled ++ [ID 20000612.002] Perl problem on Cray system ++ */ ++ union { ++ DIR * xiou_dirp; /* for opendir, readdir, etc */ ++ void * xiou_dummy; /* for alignment */ ++ } xio_dirpu; long xio_lines; /* $. */ long xio_page; /* $% */ long xio_page_len; /* $= */ @@@ -378,6 -368,6 +388,7 @@@ char xio_type; char xio_flags; }; ++#define xio_dirp xio_dirpu.xiou_dirp #define IOf_ARGV 1 /* this fp iterates over ARGV */ #define IOf_START 2 /* check for null ARGV and substitute '-' */