Steve Singer,,, ssinger at lists.slony.info
Thu May 27 13:38:34 PDT 2010
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv2814

Modified Files:
      Tag: REL_2_0_STABLE
	RELEASE configure configure.ac 
Log Message:
Remove direct uses of yyleng and instead use the function yyget_leng()
More recent versions of flex have changed yyleng from an int to a size_t.
By using the function we will let the compiler do the conversion if required
on the function result.
    
We also add an explicit object for scan.o instead of including it at the
bottom of parser.y because we need to generate and include a header for
the scanner (scan.h) so we have the explicit(and correct) definitions of
the yyyget_leng() function.

A autoconf check to ensure that a version of flex with yyget_leng() is 
available has also been added.


Index: RELEASE
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/RELEASE,v
retrieving revision 1.3.2.25
retrieving revision 1.3.2.26
diff -C 2 -d -r1.3.2.25 -r1.3.2.26
*** RELEASE	13 May 2010 19:34:31 -0000	1.3.2.25
--- RELEASE	27 May 2010 20:38:31 -0000	1.3.2.26
***************
*** 218,219 ****
--- 218,225 ----
  
  - cloneNodeFinish() references the proper column in sl_sequence Bug # 119
+ 
+ - Newer versions of flex have changed yyleng from an int to a size_t
+   instead of referencing the extern yyleng directly we use the function
+   yyget_leng() and have added a configure check to confirm that the version
+   of flex we use is not too old.
+ 

Index: configure.ac
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/configure.ac,v
retrieving revision 1.62.2.3
retrieving revision 1.62.2.4
diff -C 2 -d -r1.62.2.3 -r1.62.2.4
*** configure.ac	9 Apr 2010 20:29:09 -0000	1.62.2.3
--- configure.ac	27 May 2010 20:38:32 -0000	1.62.2.4
***************
*** 16,19 ****
--- 16,22 ----
      -e 's/\ //g' -e s/\:/`date +HEAD_%Y%m%d`/ | tr -d '\n']))
  
+ m4_pattern_allow([^SLON_AC_])
+ 
+ 
  AC_INIT(slony1,[SLONREL_VERSION])
  AC_CONFIG_HEADERS(config.h)
***************
*** 76,80 ****
  PGAC_PATH_PERL
  AC_PATH_PROG(TAR, tar)
! AC_CHECK_PROGS(LEX, ['flex' , 'lex'])
  AC_CHECK_PROGS(YACC, ['bison -y' , 'yacc'])
  AC_CHECK_PROGS(SED, ['sed'])
--- 79,153 ----
  PGAC_PATH_PERL
  AC_PATH_PROG(TAR, tar)
! 
! 
! # PGAC_PATH_FLEX
! # --------------
! # Look for Flex, set the output variable FLEX to its path if found.
! # Reject versions before 2.5.31, as we need a reasonably non-buggy reentrant
! # scanner.    We need at least 2.5.31 because we depend on
! # yyget_leng() to be defined since later some versions of flex switched
! # the definition of yyleng from an int to a size_t
! #  Also find Flex if its installed under `lex', but do not
! # accept other Lex programs.
! 
! AC_DEFUN([PGAC_PATH_FLEX],
! [AC_CACHE_CHECK([for flex], pgac_cv_path_flex,
! [# Let the user override the test
! if test -n "$FLEX"; then
!   pgac_cv_path_flex=$FLEX
! else
!   pgac_save_IFS=$IFS
!   IFS=$PATH_SEPARATOR
!   for pgac_dir in $PATH; do
!     IFS=$pgac_save_IFS
!     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
!       pgac_dir=`pwd`
!     fi
!     for pgac_prog in flex lex; do
!       pgac_candidate="$pgac_dir/$pgac_prog"
!       if test -f "$pgac_candidate" \
!         && $pgac_candidate --version </dev/null >/dev/null 2>&1
!       then
!         echo '%%'  > conftest.l
!         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
!           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
!           if echo "$pgac_flex_version" | sed ['s/[.a-z]/ /g'] | awk '{ if ([$]1 = 2 && [$]2 = 5 && [$]3 >= 31) exit 0; else exit 1;}'
!           then
!             pgac_cv_path_flex=$pgac_candidate
!             break 2
!           else
!             AC_MSG_WARN([
! *** The installed version of Flex, $pgac_candidate, is too old to use with Slony-I.
! *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version.])
!           fi
!         fi
!       fi
!     done
!   done
!   rm -f conftest.l lex.yy.c
!   : ${pgac_cv_path_flex=no}
! fi
! ])[]dnl AC_CACHE_CHECK
! 
! if test x"$pgac_cv_path_flex" = x"no"; then
!   AC_MSG_WARN([
! *** Without Flex you will not be able to build Slony-I from CVS nor
! *** change any of the scanner definition files.  You can obtain Flex from
! *** a GNU mirror site.  (If you are using the official distribution of
! *** Slony-I then you do not need to worry about this because the Flex
! *** output is pre-generated.)])
! 
!   LEX=
! else
!   LEX=$pgac_cv_path_flex
!   pgac_flex_version=`$FLEX --version 2>/dev/null`
!   AC_MSG_NOTICE([using $pgac_flex_version])
! fi
! 
! AC_SUBST(LEX)
! AC_SUBST(FLEXFLAGS)
! ])# PGAC_PATH_FLEX
! 
! 
  AC_CHECK_PROGS(YACC, ['bison -y' , 'yacc'])
  AC_CHECK_PROGS(SED, ['sed'])
***************
*** 120,126 ****
  AC_CHECK_TYPES([int32_t, uint32_t, u_int32_t])
  AC_CHECK_TYPES([int64_t, uint64_t, u_int64_t])
! AC_CHECK_TYPES([ssize_t])
  SLON_AC_FUNC_POSIX_SIGNALS()
  
  # ----
  # Locate PostgreSQL paths
--- 193,200 ----
  AC_CHECK_TYPES([int32_t, uint32_t, u_int32_t])
  AC_CHECK_TYPES([int64_t, uint64_t, u_int64_t])
! AC_CHECK_TYPES([size_t, ssize_t])
  SLON_AC_FUNC_POSIX_SIGNALS()
  
+ 
  # ----
  # Locate PostgreSQL paths
***************
*** 151,154 ****
--- 225,230 ----
  SLONYPATH=`pwd`
  
+ PGAC_PATH_FLEX()
+ 
  # ----
  # PostgreSQL checks

Index: configure
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/configure,v
retrieving revision 1.75.2.4
retrieving revision 1.75.2.5
diff -C 2 -d -r1.75.2.4 -r1.75.2.5
*** configure	3 May 2010 05:58:33 -0000	1.75.2.4
--- configure	27 May 2010 20:38:31 -0000	1.75.2.5
***************
*** 1,35 ****
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
! # Generated by GNU Autoconf 2.59 for slony1 2.0.STABLE.
  #
- # Copyright (C) 2003 Free Software Foundation, Inc.
  # This configure script is free software; the Free Software Foundation
  # gives unlimited permission to copy, distribute and modify it.
! ## --------------------- ##
! ## M4sh Initialization.  ##
! ## --------------------- ##
[...17061 lines suppressed...]
+ 
  
  # configure is writing to config.log, and then calls config.status.
***************
*** 11762,11766 ****
    # Use ||, not &&, to avoid exiting from the if with $? = 1, which
    # would make configure fail if this is the last instruction.
!   $ac_cs_success || { (exit 1); exit 1; }
  fi
  
--- 7905,7913 ----
    # Use ||, not &&, to avoid exiting from the if with $? = 1, which
    # would make configure fail if this is the last instruction.
!   $ac_cs_success || as_fn_exit $?
! fi
! if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
!   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
! $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  



More information about the Slony1-commit mailing list