/* 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.
*
*/
-#if !defined(PERL_IMPLICIT_SYS)
#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)
#define PERL_IN_PERLIO_C
#include "perl.h"
+#if !defined(PERL_IMPLICIT_SYS)
+
#ifdef PERLIO_IS_STDIO
void
#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
}
{
if (strlen(s) >= (STRLEN)n)
{
- PerlIO_puts(PerlIO_stderr(),"panic: sprintf overflow - memory corrupted!\n");
- {
- dTHX;
- my_exit(1);
- }
+ dTHX;
+ PerlIO_puts(Perl_error_log,"panic: sprintf overflow - memory corrupted!\n");
+ my_exit(1);
}
}
return val;