Here is small fix for bcc2grx:
I moved explicit use of memcpy() from getfillpattern() to _gr_getfillpattern and called latest from getfillpattern(). Reason problems with gcc-3.0 dev. version. Although similar problems I met are already submitted in GCC bug database (libstdc++/2989), anyway I think we should clean up libbcc.h to avoid such problems.
Andris
--- grx241/include/libbcc.h~1 Thu Apr 19 01:20:52 2001 +++ grx241/include/libbcc.h Tue May 29 16:48:26 2001 @@ -30,9 +30,6 @@ 0x230 v2.3 offical release */ #define __BCC2GRX__ 0x22b
-#include <malloc.h> -#include <string.h> - #ifdef __cplusplus extern "C" { #endif @@ -661,7 +658,7 @@
/* ----------------------------------------------------------------- */ static _BGI_INLINE_ void getfillpattern(char *pattern) { - memcpy(pattern, &__gr_fpatterns[USER_FILL], 8); + __gr_getfillpattern(pattern); }
/* ----------------------------------------------------------------- */ --- grx241/src/bgi/getfillp.c~1 Fri Jan 12 15:32:02 2001 +++ grx241/src/bgi/getfillp.c Tue May 29 14:31:40 2001 @@ -26,5 +26,5 @@
/* ----------------------------------------------------------------- */ void __gr_getfillpattern(char *pattern) { - getfillpattern(pattern); + memcpy(pattern, &__gr_fpatterns[USER_FILL], 8); } --- grx241/test/bgi/bgilink.c~1 Sat Mar 10 18:01:08 2001 +++ grx241/test/bgi/bgilink.c Tue May 29 14:50:47 2001 @@ -1,7 +1,7 @@ /* * Copyright (C) 1993-97 by Hartmut Schirmer */ - +#include <string.h> #include "libbcc.h"
static void check_linked( void *ptr )