fixes bug 20000508.004
[p5sagit/p5-mst-13.2.git] / perlio.c
index 4c22d3b..a88daa5 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -1,16 +1,19 @@
 /*    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)
@@ -26,6 +29,8 @@
 #define PERL_IN_PERLIO_C
 #include "perl.h"
 
+#if !defined(PERL_IMPLICIT_SYS)
+
 #ifdef PERLIO_IS_STDIO 
 
 void
@@ -553,11 +558,9 @@ PerlIO_vsprintf(char *s, int n, const char *fmt, va_list ap)
   {
    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;