Branch: Tag:

2001-01-20

2001-01-20 01:15:44 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Support for bison 1.25 and earlier.

Rev: src/acconfig.h:1.72
Rev: src/configure.in:1.457
Rev: src/language.yacc:1.223

1: - AC_REVISION("$Id: configure.in,v 1.456 2001/01/19 19:45:00 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.457 2001/01/20 01:15:43 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
1460:    AC_MSG_RESULT($YACC)   fi    + AC_MSG_CHECKING(for the type of the last argument to __yy_memcpy) + AC_CACHE_VAL(pike_cv___yy_memcpy_count_type, [ +  pike_cv___yy_memcpy_count_type=unknown +  for count_type in "unsigned int" "size_t" "int"; do +  cat >conftest.y<<\EOF + %pure_parser + %{ + #include <stdio.h> +  + #ifndef __GNUC__ + #ifndef __cplusplus + static void __yy_memcpy(char *to, char *from, $count_type count); + #endif /* !__cplusplus */ + #endif /* !__GNUC__ */ + %} + %% + all: foo bar + foo: 'f' 'o' 'o' { fprintf(stderr, "foo\n"); } ; + bar: 'b' 'a' 'r' ; + %% + int yylex(YYSTYPE *yylval) { return 'f'; } + void yyerror(char *err) { fprintf(stderr, "ERR: %s\n", err); } + EOF +  if $YACC -d conftest.y 1>&5 2>&5; then +  AC_TRY_LINK([ + #include "y.tab.c" +  ], [ +  yyparse(); +  exit(0); +  ], [ +  pike_cv___yy_memcpy_count_type=$count_type +  break +  ]) +  fi +  done + ]) + AC_MSG_RESULT($pike_cv___yy_memcpy_count_type) + if test "x$pike_cv___yy_memcpy_count_type" = "xunknown"; then +  AC_MSG_WARN([Defaulting to unsigned int.]) +  AC_DEFINE(YY_COUNT_TYPE, [unsigned int]) + else +  AC_DEFINE_UNQUOTED(YY_COUNT_TYPE, $pike_cv___yy_memcpy_count_type) + fi +    #############################################################################      ## At this point we have found all binaries we are going to use.