Index: ChangeLog =================================================================== RCS file: /cvsroot/bison/bison/ChangeLog,v retrieving revision 1.163 diff -u -r1.163 ChangeLog --- ChangeLog 2001/08/13 19:30:26 1.163 +++ ChangeLog 2001/08/13 20:16:35 @@ -1,3 +1,8 @@ +2001-08-13 Marc Autret + + * src/bison.simple (_yy_memcpy): CPP reformat. + (YYSTACK_USE_ALLOCA): Changed to allow users defining it. + 2001-08-13 Pascal Bart * tests/atconfig.in (CPPFLAGS): Fix. Index: src/bison.simple =================================================================== RCS file: /cvsroot/bison/bison/src/bison.simple,v retrieving revision 1.51 diff -u -r1.51 bison.simple --- src/bison.simple 2001/08/13 14:51:15 1.51 +++ src/bison.simple 2001/08/13 20:16:37 @@ -30,14 +30,14 @@ #ifndef YYSTACK_USE_ALLOCA # ifdef alloca -# define YYSTACK_USE_ALLOCA +# define YYSTACK_USE_ALLOCA 1 # else /* alloca not defined */ # ifdef __GNUC__ -# define YYSTACK_USE_ALLOCA +# define YYSTACK_USE_ALLOCA 1 # define alloca __builtin_alloca # else /* not GNU C. */ # if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) -# define YYSTACK_USE_ALLOCA +# define YYSTACK_USE_ALLOCA 1 # include # else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ @@ -55,13 +55,13 @@ namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca -# define YYSTACK_USE_ALLOCA +# define YYSTACK_USE_ALLOCA 1 # else /* not MSDOS, or __TURBOC__, or _AIX */ # if 0 /* address@hidden says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ # ifdef __hpux -# define YYSTACK_USE_ALLOCA +# define YYSTACK_USE_ALLOCA 1 # define alloca __builtin_alloca # endif /* __hpux */ # endif @@ -72,7 +72,7 @@ # endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ -#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca #else # define YYSTACK_ALLOC malloc @@ -185,40 +185,27 @@ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ # define __yy_memcpy(To, From, Count) __builtin_memcpy (To, From, Count) #else /* not GNU C or C++ */ -# ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void +# ifndef __cplusplus __yy_memcpy (to, from, count) char *to; - char *from; + const char *from; unsigned int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - # else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) +__yy_memcpy (char *to, const char *from, unsigned int count) +# endif { + register const char *f = from; register char *t = to; - register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } -# endif #endif #line