X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perlio.c;h=969b8d1c6d24062beaf2c00e72cab59972d9c283;hb=a6c71b5b9462db13c7bb2cd263cee5995315784c;hp=2ad8b4e77a74886aabdff3bef2b7264085159032;hpb=146174a91a192983720a158796dc066226ad0e55;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perlio.c b/perlio.c index 2ad8b4e..969b8d1 100644 --- a/perlio.c +++ b/perlio.c @@ -1,6 +1,6 @@ /* perlio.c * - * Copyright (c) 1996-1999, Nick Ing-Simmons + * Copyright (c) 1996-2000, Nick Ing-Simmons * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -9,7 +9,11 @@ #define VOIDUSED 1 -#include "config.h" +#ifdef PERL_MICRO +# include "uconfig.h" +#else +# include "config.h" +#endif #define PERLIO_NOT_STDIO 0 #if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO) @@ -172,10 +176,14 @@ PerlIO_set_ptrcnt(PerlIO *f, STDCHAR *ptr, int cnt) #else Perl_croak(aTHX_ "Cannot set 'ptr' of FILE * on this system"); #endif -#if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE) +#if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE) && defined (STDIO_PTR_LVAL_NOCHANGE_CNT) FILE_cnt(f) = cnt; #else - Perl_croak(aTHX_ "Cannot set 'cnt' of FILE * on this system"); +#if defined(STDIO_PTR_LVAL_SETS_CNT) + assert (FILE_cnt(f) == cnt); +#else + Perl_croak(aTHX_ "Cannot set 'cnt' of FILE * on this system when setting 'ptr'"); +#endif #endif }