pkgsrc/lang/bwbasic/patches/patch-ab
joerg 6e244a7db6 Move init of errfdevice to bwb_init, it should be the first
function which is ran and stderr can't be used as lvalue in
file scope.
2005-12-30 23:29:36 +00:00

22 lines
703 B
Text

$NetBSD: patch-ab,v 1.1 2005/12/30 23:29:36 joerg Exp $
--- bwbasic-2.20/bwbasic.c.orig 2005-12-30 23:25:02.000000000 +0000
+++ bwbasic-2.20/bwbasic.c
@@ -51,7 +51,7 @@
char *bwb_ebuf; /* error buffer */
static char *read_line;
int bwb_trace = FALSE;
-FILE *errfdevice = stderr; /* output device for error messages */
+FILE *errfdevice; /* output device for error messages */
#if HAVE_LONGJUMP
jmp_buf mark;
@@ -133,6 +133,8 @@ bwb_init( argc, argv )
static char end_buf[] = "\0";
#endif
+ errfdevice = stderr;
+
#if INTENSIVE_DEBUG
prn_xprintf( stderr, "Memory Allocation Statistics:\n" );
prn_xprintf( stderr, "----------------------------\n" );