Hi! recently I setup a box with OpenSolaris to experiment with some of the new upcoming stuff in Solaris and I am currently building openpkg on this box. Something in the stdio handling has changed on OpenSolaris and I had to patch the miniperl build of the openpkg package and the perl package to get these packages to build. The patch looks too intrusive to me to commit it to the cvs and therefore I like to ask for a review and a suggestion how to handle this.
cheerio Steve [1] http://public.activestate.com/cgi-bin/perlbrowse/27722
Index: perlio.c --- perlio.c.orig Fri Jan 6 23:42:20 2006 +++ perlio.c Sun Feb 11 16:36:43 2007 @@ -448,8 +448,15 @@ #include <unistd.h> #endif #ifdef HAS_MMAP +#ifdef PERL_DARWIN +#define environ_safe environ +#undef environ #include <sys/mman.h> +#define environ environ_safe +#else +#include <sys/mman.h> #endif +#endif void PerlIO_debug(const char *fmt, ...) @@ -2874,31 +2881,7 @@ f->_fileno = -1; return 1; # elif defined(__sun__) -# if defined(_LP64) - /* On solaris, if _LP64 is defined, the FILE structure is this: - * - * struct FILE { - * long __pad[16]; - * }; - * - * It turns out that the fd is stored in the top 32 bits of - * file->__pad[4]. The lower 32 bits contain flags. file->pad[5] appears - * to contain a pointer or offset into another structure. All the - * remaining fields are zero. - * - * We set the top bits to -1 (0xFFFFFFFF). - */ - f->__pad[4] |= 0xffffffff00000000L; - assert(fileno(f) == 0xffffffff); -# else /* !defined(_LP64) */ - /* _file is just a unsigned char :-( - Not clear why we dup() rather than using -1 - even if that would be treated as 0xFF - so will - a dup fail ... - */ - f->_file = PerlLIO_dup(fileno(f)); -# endif /* defined(_LP64) */ - return 1; + return 0; # elif defined(__hpux) f->__fileH = 0xff; f->__fileL = 0xff;
signature.asc
Description: OpenPGP digital signature