# PGAC_PATH_BISON
# ---------------
# Look for Bison, set the output variable BISON to its path if found.
-# Reject versions before 1.875 (they have bugs or capacity limits).
-# Note we do not accept other implementations of yacc.
+# Reject versions before 2.3 (the earliest version in the buildfarm
+# as of 2022). Note we do not accept other implementations of yacc.
AC_DEFUN([PGAC_PATH_BISON],
[PGAC_PATH_PROGS(BISON, bison)
if test "$BISON"; then
pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
AC_MSG_NOTICE([using $pgac_bison_version])
- if echo "$pgac_bison_version" | $AWK '{ if ([$]4 < 1.875) exit 0; else exit 1;}'
+ if echo "$pgac_bison_version" | $AWK '{ if ([$]4 < 2.3) exit 0; else exit 1;}'
then
AC_MSG_WARN([
*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
-*** Bison version 1.875 or later is required, but this is $pgac_bison_version.])
+*** Bison version 2.3 or later is required, but this is $pgac_bison_version.])
BISON=""
fi
# Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
{ $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
$as_echo "$as_me: using $pgac_bison_version" >&6;}
- if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
+ if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
-*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
+*** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
$as_echo "$as_me: WARNING:
*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
-*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
+*** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
BISON=""
fi
# Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
<para>
<productname>Bison</productname> and <productname>Flex</productname> are
required to build from Git, but not required when building from a release
- file. Only <productname>Bison</productname> 1.875 or versions 2.2 and later
+ file. Only <productname>Bison</productname> versions 2.3 and later
will work. <productname>Flex</productname> must be version 2.5.31 or later.
</para>
are needed to build from a Git checkout, or if you changed the actual
scanner and parser definition files. If you need them, be sure
to get <application>Flex</application> 2.5.31 or later and
- <application>Bison</application> 1.875 or later. Other <application>lex</application>
+ <application>Bison</application> 2.3 or later. Other <application>lex</application>
and <application>yacc</application> programs cannot be used.
</para>
</listitem>
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
/*
* Bison doesn't allocate anything that needs to live across parser calls,
* so we can easily have it use palloc instead of malloc. This prevents
- * memory s if we error out during parsing. Note this only works with
- * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
- * if possible, so there's not really much problem anyhow, at least if
- * you're building with gcc.
+ * memory s if we error out during parsing.
*/
#define YYMALLOC palloc
#define YYFREE pfree
my ($bisonver) = `bison -V`; # grab first line
$bisonver = (split(/\s+/, $bisonver))[3]; # grab version number
-unless ($bisonver eq '1.875' || $bisonver ge '2.2')
+unless ($bisonver ge '2.3')
{
print "WARNING! Bison install not found, or unsupported Bison version.\n";
print "echo Attempting to build without.\n";