1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-25 16:13:17 +00:00

Import byacc 20150711.

This commit is contained in:
Jung-uk Kim 2016-02-29 19:40:54 +00:00
parent 2d99735ad9
commit 0ae8181641
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/byacc/dist/; revision=296224
svn path=/vendor/byacc/20150711/; revision=296225; tag=vendor/byacc/20150711
17 changed files with 1354 additions and 761 deletions

35
CHANGES
View File

@ -1,3 +1,38 @@
2015-07-10 Thomas E. Dickey <tom@invisible-island.net>
* lr0.c: fix a duplicate-free in the leak-checking
* VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile:
bump
* reader.c:
make cache-size clearer (prompted by discussion with Pedro Giffuni,
Oliver Pinter)
* main.c:
make relationship with format/size clearer (prompted by discussion
with Pedro Giffuni, Oliver Pinter)
2015-07-05 Thomas E. Dickey <tom@invisible-island.net>
* configure: regen
* package/pkgsrc/Makefile, package/mingw-byacc.spec, package/debian/copyright, package/debian/changelog, package/byacc.spec, VERSION:
bump
* aclocal.m4: resync with my-autoconf
add configure option --with-man2html
* makefile.in: add configure options --with-man2html
* configure.in: add configure option --with-man2html
2015-05-02 Thomas E. Dickey <tom@invisible-island.net>
* config.guess: 2015-03-04
* config.sub: 2015-03-08
2014-11-28 Thomas E. Dickey <tom@invisible-island.net> 2014-11-28 Thomas E. Dickey <tom@invisible-island.net>
* lr0.c: coverity #39181: memory leak * lr0.c: coverity #39181: memory leak

View File

@ -1,4 +1,4 @@
MANIFEST for byacc-20141128, version t20141128 MANIFEST for byacc-20150711, version t20150711
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
MANIFEST this file MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993 ACKNOWLEDGEMENTS original version of byacc - 1993

View File

@ -1 +1 @@
20141128 20150711

426
aclocal.m4 vendored
View File

@ -1,7 +1,7 @@
dnl $Id: aclocal.m4,v 1.37 2014/10/04 16:40:06 tom Exp $ dnl $Id: aclocal.m4,v 1.38 2015/07/05 22:16:23 tom Exp $
dnl Macros for byacc configure script (Thomas E. Dickey) dnl Macros for byacc configure script (Thomas E. Dickey)
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl Copyright 2004-2013,2014 Thomas E. Dickey dnl Copyright 2004-2014,2015 Thomas E. Dickey
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the dnl copy of this software and associated documentation files (the
@ -54,7 +54,7 @@ define([CF_ACVERSION_COMPARE],
[ifelse([$8], , ,[$8])], [ifelse([$8], , ,[$8])],
[ifelse([$9], , ,[$9])])])dnl [ifelse([$9], , ,[$9])])])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_ADD_CFLAGS version: 11 updated: 2014/07/22 05:32:57 dnl CF_ADD_CFLAGS version: 12 updated: 2015/04/12 15:39:00
dnl ------------- dnl -------------
dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
dnl The second parameter if given makes this macro verbose. dnl The second parameter if given makes this macro verbose.
@ -72,11 +72,11 @@ cf_new_extra_cppflags=
for cf_add_cflags in $1 for cf_add_cflags in $1
do do
case $cf_fix_cppflags in case $cf_fix_cppflags in
no) (no)
case $cf_add_cflags in #(vi case $cf_add_cflags in
-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in case $cf_add_cflags in
-D*) (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'` cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
@ -93,11 +93,11 @@ no)
;; ;;
esac esac
case "$CPPFLAGS" in case "$CPPFLAGS" in
*$cf_add_cflags) #(vi (*$cf_add_cflags)
;; ;;
*) #(vi (*)
case $cf_add_cflags in #(vi case $cf_add_cflags in
-D*) (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags) CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
;; ;;
@ -106,12 +106,12 @@ no)
;; ;;
esac esac
;; ;;
*) (*)
cf_new_cflags="$cf_new_cflags $cf_add_cflags" cf_new_cflags="$cf_new_cflags $cf_add_cflags"
;; ;;
esac esac
;; ;;
yes) (yes)
cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'` cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
@ -148,7 +148,7 @@ dnl Allow user to disable a normally-on option.
AC_DEFUN([CF_ARG_DISABLE], AC_DEFUN([CF_ARG_DISABLE],
[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl [CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42 dnl CF_ARG_OPTION version: 5 updated: 2015/05/10 19:52:14
dnl ------------- dnl -------------
dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
dnl values. dnl values.
@ -161,17 +161,17 @@ dnl $4 = action if perform if option is default
dnl $5 = default option value (either 'yes' or 'no') dnl $5 = default option value (either 'yes' or 'no')
AC_DEFUN([CF_ARG_OPTION], AC_DEFUN([CF_ARG_OPTION],
[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes) [AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
if test "$enableval" != "$5" ; then if test "$enableval" != "$5" ; then
ifelse([$3],,[ :]dnl ifelse([$3],,[ :]dnl
,[ $3]) ifelse([$4],,,[ ,[ $3]) ifelse([$4],,,[
else else
$4]) $4])
fi],[enableval=$5 ifelse([$4],,,[ fi],[enableval=$5 ifelse([$4],,,[
$4 $4
])dnl ])dnl
])])dnl ])])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49 dnl CF_CC_ENV_FLAGS version: 2 updated: 2015/04/12 15:39:00
dnl --------------- dnl ---------------
dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
dnl into CC. This will not help with broken scripts that wrap the compiler with dnl into CC. This will not help with broken scripts that wrap the compiler with
@ -182,8 +182,8 @@ AC_DEFUN([CF_CC_ENV_FLAGS],
: ${CC:=cc} : ${CC:=cc}
AC_MSG_CHECKING(\$CC variable) AC_MSG_CHECKING(\$CC variable)
case "$CC" in #(vi case "$CC" in
*[[\ \ ]]-[[IUD]]*) (*[[\ \ ]]-[[IUD]]*)
AC_MSG_RESULT(broken) AC_MSG_RESULT(broken)
AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
# humor him... # humor him...
@ -191,7 +191,7 @@ case "$CC" in #(vi
CC=`echo "$CC" | sed -e 's/[[ ]].*//'` CC=`echo "$CC" | sed -e 's/[[ ]].*//'`
CF_ADD_CFLAGS($cf_flags) CF_ADD_CFLAGS($cf_flags)
;; ;;
*) (*)
AC_MSG_RESULT(ok) AC_MSG_RESULT(ok)
;; ;;
esac esac
@ -265,7 +265,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
fi fi
]) ])
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_DISABLE_ECHO version: 12 updated: 2012/10/06 16:30:28 dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57
dnl --------------- dnl ---------------
dnl You can always use "make -n" to see the actual options, but it's hard to dnl You can always use "make -n" to see the actual options, but it's hard to
dnl pick out/analyze warning messages when the compile-line is long. dnl pick out/analyze warning messages when the compile-line is long.
@ -282,17 +282,17 @@ AC_MSG_CHECKING(if you want to see long compiling messages)
CF_ARG_DISABLE(echo, CF_ARG_DISABLE(echo,
[ --disable-echo do not display "compiling" commands], [ --disable-echo do not display "compiling" commands],
[ [
ECHO_LT='--silent' ECHO_LT='--silent'
ECHO_LD='@echo linking [$]@;' ECHO_LD='@echo linking [$]@;'
RULE_CC='@echo compiling [$]<' RULE_CC='@echo compiling [$]<'
SHOW_CC='@echo compiling [$]@' SHOW_CC='@echo compiling [$]@'
ECHO_CC='@' ECHO_CC='@'
],[ ],[
ECHO_LT='' ECHO_LT=''
ECHO_LD='' ECHO_LD=''
RULE_CC='' RULE_CC=''
SHOW_CC='' SHOW_CC=''
ECHO_CC='' ECHO_CC=''
]) ])
AC_MSG_RESULT($enableval) AC_MSG_RESULT($enableval)
AC_SUBST(ECHO_LT) AC_SUBST(ECHO_LT)
@ -325,7 +325,7 @@ if test "$with_no_leaks" = yes ; then
fi fi
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03 dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00
dnl ----------------- dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary dnl compiler warnings. Though useful, not all are supported -- and contrary
@ -379,20 +379,20 @@ EOF
cf_directive="__attribute__(($cf_attribute))" cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&AC_FD_CC echo "checking for $CC $cf_directive" 1>&AC_FD_CC
case $cf_attribute in #(vi case $cf_attribute in
printf) #(vi (printf)
cf_printf_attribute=yes cf_printf_attribute=yes
cat >conftest.h <<EOF cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1 #define GCC_$cf_ATTRIBUTE 1
EOF EOF
;; ;;
scanf) #(vi (scanf)
cf_scanf_attribute=yes cf_scanf_attribute=yes
cat >conftest.h <<EOF cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1 #define GCC_$cf_ATTRIBUTE 1
EOF EOF
;; ;;
*) #(vi (*)
cat >conftest.h <<EOF cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE $cf_directive #define GCC_$cf_ATTRIBUTE $cf_directive
EOF EOF
@ -402,11 +402,11 @@ EOF
if AC_TRY_EVAL(ac_compile); then if AC_TRY_EVAL(ac_compile); then
test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute) test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
cat conftest.h >>confdefs.h cat conftest.h >>confdefs.h
case $cf_attribute in #(vi case $cf_attribute in
noreturn) #(vi (noreturn)
AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc]) AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
;; ;;
printf) #(vi (printf)
cf_value='/* nothing */' cf_value='/* nothing */'
if test "$cf_printf_attribute" != no ; then if test "$cf_printf_attribute" != no ; then
cf_value='__attribute__((format(printf,fmt,var)))' cf_value='__attribute__((format(printf,fmt,var)))'
@ -414,7 +414,7 @@ EOF
fi fi
AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc]) AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
;; ;;
scanf) #(vi (scanf)
cf_value='/* nothing */' cf_value='/* nothing */'
if test "$cf_scanf_attribute" != no ; then if test "$cf_scanf_attribute" != no ; then
cf_value='__attribute__((format(scanf,fmt,var)))' cf_value='__attribute__((format(scanf,fmt,var)))'
@ -422,7 +422,7 @@ EOF
fi fi
AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc]) AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
;; ;;
unused) #(vi (unused)
AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc]) AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
;; ;;
esac esac
@ -449,7 +449,7 @@ if test "$GCC" = yes ; then
fi fi
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_GCC_WARNINGS version: 31 updated: 2013/11/19 19:23:35 dnl CF_GCC_WARNINGS version: 32 updated: 2015/04/12 15:39:00
dnl --------------- dnl ---------------
dnl Check if the compiler supports useful warning options. There's a few that dnl Check if the compiler supports useful warning options. There's a few that
dnl we don't use, simply because they're too noisy: dnl we don't use, simply because they're too noisy:
@ -541,20 +541,20 @@ then
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
if AC_TRY_EVAL(ac_compile); then if AC_TRY_EVAL(ac_compile); then
test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt) test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
case $cf_opt in #(vi case $cf_opt in
Wcast-qual) #(vi (Wcast-qual)
CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES" CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
;; ;;
Winline) #(vi (Winline)
case $GCC_VERSION in case $GCC_VERSION in
[[34]].*) ([[34]].*)
CF_VERBOSE(feature is broken in gcc $GCC_VERSION) CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
continue;; continue;;
esac esac
;; ;;
Wpointer-arith) #(vi (Wpointer-arith)
case $GCC_VERSION in case $GCC_VERSION in
[[12]].*) ([[12]].*)
CF_VERBOSE(feature is broken in gcc $GCC_VERSION) CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
continue;; continue;;
esac esac
@ -600,7 +600,7 @@ make an error
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_INTEL_COMPILER version: 6 updated: 2014/03/17 13:13:07 dnl CF_INTEL_COMPILER version: 7 updated: 2015/04/12 15:39:00
dnl ----------------- dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It dnl Check if the given compiler is really the Intel compiler for Linux. It
dnl tries to imitate gcc, but does not return an error when it finds a mismatch dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@ -619,7 +619,7 @@ ifelse([$2],,INTEL_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then if test "$ifelse([$1],,[$1],GCC)" = yes ; then
case $host_os in case $host_os in
linux*|gnu*) (linux*|gnu*)
AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler) AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc" ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
@ -638,10 +638,12 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147"
fi fi
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_MAKE_DOCS version: 3 updated: 2014/01/05 13:21:25 dnl CF_MAKE_DOCS version: 4 updated: 2015/07/04 21:43:03
dnl ------------ dnl ------------
dnl $1 = name(s) to generate rules for dnl $1 = name(s) to generate rules for
dnl $2 = suffix of corresponding manpages used as input. dnl $2 = suffix of corresponding manpages used as input.
dnl
dnl This works best if called at the end of configure.in, following CF_WITH_MAN2HTML
define([CF_MAKE_DOCS],[ define([CF_MAKE_DOCS],[
test -z "$cf_make_docs" && cf_make_docs=0 test -z "$cf_make_docs" && cf_make_docs=0
@ -650,21 +652,25 @@ test -f "$cf_output" || cf_output=Makefile
if test "$cf_make_docs" = 0 if test "$cf_make_docs" = 0
then then
cat >>$cf_output <<"CF_EOF" cat >>$cf_output <<CF_EOF
################################################################################ ################################################################################
## generated by $0
.SUFFIXES : .html .$2 .man .ps .pdf .txt .SUFFIXES : .html .$2 .man .ps .pdf .txt
.$2.html : ${NROFF_NOTE}.$2.txt :
GROFF_NO_SGR=stupid [$](SHELL) -c "tbl [$]*.$2 | groff -P -o0 -I$*_ -Thtml -man" >[$]@ ${NROFF_NOTE} [\$](SHELL) -c "tbl [\$]*.$2 | nroff -man | col -bx" >[\$]@
.$2.ps : ${GROFF_NOTE}.ps.pdf :
[$](SHELL) -c "tbl [$]*.$2 | groff -man" >[$]@ ${GROFF_NOTE} ps2pdf [\$]*.ps
${GROFF_NOTE}
${GROFF_NOTE}.$2.ps :
${GROFF_NOTE} [\$](SHELL) -c "tbl [\$]*.$2 | groff -man" >[\$]@
${GROFF_NOTE}
${GROFF_NOTE}.$2.txt :
${GROFF_NOTE} GROFF_NO_SGR=stupid [\$](SHELL) -c "tbl [\$]*.$2 | nroff -Tascii -man | col -bx" >[\$]@
.$2.txt : ${MAN2HTML_NOTE}.$2.html :
GROFF_NO_SGR=stupid [$](SHELL) -c "tbl [$]*.$2 | nroff -Tascii -man | col -bx" >[$]@ ${MAN2HTML_NOTE} ./${MAN2HTML_TEMP} [\$]* $2 man >[\$]@
.ps.pdf :
ps2pdf [$]*.ps
CF_EOF CF_EOF
cf_make_docs=1 cf_make_docs=1
@ -674,20 +680,25 @@ for cf_name in $1
do do
cat >>$cf_output <<CF_EOF cat >>$cf_output <<CF_EOF
################################################################################ ################################################################################
docs-$cf_name \\ ${NROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
docs :: $cf_name.html \\ ${MAN2HTML_NOTE}docs docs-$cf_name :: $cf_name.html
$cf_name.pdf \\ ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.pdf
$cf_name.ps \\ ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.ps
$cf_name.txt ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
clean \\ clean \\
docs-clean :: docs-clean ::
rm -f $cf_name.html $cf_name.pdf $cf_name.ps $cf_name.txt ${NROFF_NOTE} rm -f $cf_name.txt
${MAN2HTML_NOTE} rm -f $cf_name.html
${GROFF_NOTE} rm -f $cf_name.pdf
${GROFF_NOTE} rm -f $cf_name.ps
${GROFF_NOTE} rm -f $cf_name.txt
$cf_name.html : $cf_name.\$2 ${NROFF_NOTE}$cf_name.txt : $cf_name.$2
$cf_name.pdf : $cf_name.ps ${MAN2HTML_NOTE}$cf_name.html : $cf_name.$2
$cf_name.ps : $cf_name.\$2 ${GROFF_NOTE}$cf_name.pdf : $cf_name.ps
$cf_name.txt : $cf_name.\$2 ${GROFF_NOTE}$cf_name.ps : $cf_name.$2
${GROFF_NOTE}$cf_name.txt : $cf_name.$2
CF_EOF CF_EOF
done done
])dnl ])dnl
@ -729,7 +740,7 @@ AC_SUBST(MAKE_UPPER_TAGS)
AC_SUBST(MAKE_LOWER_TAGS) AC_SUBST(MAKE_LOWER_TAGS)
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_MIXEDCASE_FILENAMES version: 6 updated: 2013/10/08 17:47:05 dnl CF_MIXEDCASE_FILENAMES version: 7 updated: 2015/04/12 15:39:00
dnl ---------------------- dnl ----------------------
dnl Check if the file-system supports mixed-case filenames. If we're able to dnl Check if the file-system supports mixed-case filenames. If we're able to
dnl create a lowercase name and see it as uppercase, it doesn't support that. dnl create a lowercase name and see it as uppercase, it doesn't support that.
@ -737,11 +748,11 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES],
[ [
AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
if test "$cross_compiling" = yes ; then if test "$cross_compiling" = yes ; then
case $target_alias in #(vi case $target_alias in
*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
cf_cv_mixedcase=no cf_cv_mixedcase=no
;; ;;
*) (*)
cf_cv_mixedcase=yes cf_cv_mixedcase=yes
;; ;;
esac esac
@ -819,7 +830,7 @@ AC_DEFUN([CF_MSG_LOG],[
echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_NO_LEAKS_OPTION version: 5 updated: 2012/10/02 20:55:03 dnl CF_NO_LEAKS_OPTION version: 6 updated: 2015/04/12 15:39:00
dnl ------------------ dnl ------------------
dnl see CF_WITH_NO_LEAKS dnl see CF_WITH_NO_LEAKS
AC_DEFUN([CF_NO_LEAKS_OPTION],[ AC_DEFUN([CF_NO_LEAKS_OPTION],[
@ -835,12 +846,12 @@ AC_ARG_WITH($1,
[with_$1=]) [with_$1=])
AC_MSG_RESULT(${with_$1:-no}) AC_MSG_RESULT(${with_$1:-no})
case .$with_cflags in #(vi case .$with_cflags in
.*-g*) (.*-g*)
case .$CFLAGS in #(vi case .$CFLAGS in
.*-g*) #(vi (.*-g*)
;; ;;
*) (*)
CF_ADD_CFLAGS([-g]) CF_ADD_CFLAGS([-g])
;; ;;
esac esac
@ -848,7 +859,44 @@ case .$with_cflags in #(vi
esac esac
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42 dnl CF_PATH_SYNTAX version: 16 updated: 2015/04/18 08:56:57
dnl --------------
dnl Check the argument to see that it looks like a pathname. Rewrite it if it
dnl begins with one of the prefix/exec_prefix variables, and then again if the
dnl result begins with 'NONE'. This is necessary to work around autoconf's
dnl delayed evaluation of those symbols.
AC_DEFUN([CF_PATH_SYNTAX],[
if test "x$prefix" != xNONE; then
cf_path_syntax="$prefix"
else
cf_path_syntax="$ac_default_prefix"
fi
case ".[$]$1" in
(.\[$]\(*\)*|.\'*\'*)
;;
(..|./*|.\\*)
;;
(.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX
;;
(.\[$]{*prefix}*|.\[$]{*dir}*)
eval $1="[$]$1"
case ".[$]$1" in
(.NONE/*)
$1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
;;
esac
;;
(.no|.NONE/*)
$1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
;;
(*)
ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_POSIX_C_SOURCE version: 9 updated: 2015/04/12 15:39:00
dnl ----------------- dnl -----------------
dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
dnl dnl
@ -880,15 +928,15 @@ make an error
#endif], #endif],
[cf_cv_posix_c_source=no], [cf_cv_posix_c_source=no],
[cf_want_posix_source=no [cf_want_posix_source=no
case .$cf_POSIX_C_SOURCE in #(vi case .$cf_POSIX_C_SOURCE in
.[[12]]??*) #(vi (.[[12]]??*)
cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
;; ;;
.2) #(vi (.2)
cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
cf_want_posix_source=yes cf_want_posix_source=yes
;; ;;
.*) (.*)
cf_want_posix_source=yes cf_want_posix_source=yes
;; ;;
esac esac
@ -943,6 +991,25 @@ CF_ACVERSION_CHECK(2.52,
CF_CC_ENV_FLAGS CF_CC_ENV_FLAGS
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_PROG_GROFF version: 2 updated: 2015/07/04 11:16:27
dnl -------------
dnl Check if groff is available, for cases (such as html output) where nroff
dnl is not enough.
AC_DEFUN([CF_PROG_GROFF],[
AC_PATH_PROG(GROFF_PATH,groff,no)
AC_PATH_PROG(NROFF_PATH,nroff,no)
if test "x$GROFF_PATH" = xno
then
NROFF_NOTE=
GROFF_NOTE="#"
else
NROFF_NOTE="#"
GROFF_NOTE=
fi
AC_SUBST(GROFF_NOTE)
AC_SUBST(NROFF_NOTE)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
dnl ------------ dnl ------------
AC_DEFUN([CF_PROG_LINT], AC_DEFUN([CF_PROG_LINT],
@ -1054,6 +1121,141 @@ if test "$with_dmalloc" = yes ; then
fi fi
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_WITH_MAN2HTML version: 4 updated: 2015/05/03 19:10:48
dnl ----------------
dnl Check for man2html and groff. Optionally prefer man2html over groff.
dnl Generate a shell script which hides the differences between the two.
dnl
dnl We name that "man2html.tmp".
dnl
dnl The shell script can be removed later, e.g., using "make distclean".
AC_DEFUN([CF_WITH_MAN2HTML],[
AC_REQUIRE([CF_PROG_GROFF])
AC_MSG_CHECKING(for program to convert manpage to html)
AC_ARG_WITH(man2html,
[ --with-man2html=XXX use XXX rather than groff],
[cf_man2html=$withval],
[cf_man2html=$GROFF_PATH])
cf_with_groff=no
case $cf_man2html in
(yes)
AC_MSG_RESULT(man2html)
AC_PATH_PROG(cf_man2html,man2html,no)
;;
(no|groff|*/groff*)
cf_with_groff=yes
cf_man2html=$GROFF_PATH
AC_MSG_RESULT($cf_man2html)
;;
(*)
AC_MSG_RESULT($cf_man2html)
;;
esac
MAN2HTML_TEMP="man2html.tmp"
cat >$MAN2HTML_TEMP <<CF_EOF
#!/bin/sh
# Temporary script generated by CF_WITH_MAN2HTML
# Convert inputs to html, sending result to standard output.
#
# Parameters:
# \${1} = rootname of file to convert
# \${2} = suffix of file to convert, e.g., "1"
# \${3} = macros to use, e.g., "man"
#
ROOT=\[$]1
TYPE=\[$]2
MACS=\[$]3
unset LANG
unset LC_ALL
unset LC_CTYPE
unset LANGUAGE
GROFF_NO_SGR=stupid
export GROFF_NO_SGR
CF_EOF
if test "x$cf_with_groff" = xyes
then
MAN2HTML_NOTE="$GROFF_NOTE"
MAN2HTML_PATH="$GROFF_PATH"
cat >>$MAN2HTML_TEMP <<CF_EOF
/bin/sh -c "tbl \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
CF_EOF
else
MAN2HTML_NOTE=""
CF_PATH_SYNTAX(cf_man2html)
MAN2HTML_PATH="$cf_man2html"
AC_MSG_CHECKING(for $cf_man2html top/bottom margins)
# for this example, expect 3 lines of content, the remainder is head/foot
cat >conftest.in <<CF_EOF
.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
.SH SECTION
MARKER
CF_EOF
LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C nroff -man conftest.in >conftest.out
cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`
cf_man2html_top=`expr $cf_man2html_1st - 2`
cf_man2html_bot=`wc -l conftest.out |sed -e 's/[[^0-9]]//g'`
cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
AC_MSG_RESULT($cf_man2html_top_bot)
AC_MSG_CHECKING(for pagesize to use)
for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
cat >>conftest.in <<CF_EOF
.nf
0
1
2
3
4
5
6
7
8
9
CF_EOF
done
LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C nroff -man conftest.in >conftest.out
cf_man2html_page=`fgrep -n HEAD1 conftest.out |tail -n 1 |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`
test -z "$cf_man2html_page" && cf_man2html_page=99999
test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
rm -rf conftest*
AC_MSG_RESULT($cf_man2html_page)
cat >>$MAN2HTML_TEMP <<CF_EOF
: \${MAN2HTML_PATH=$MAN2HTML_PATH}
MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
case \${TYPE} in
(ms)
tbl \${ROOT}.\${TYPE} | nroff -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
;;
(*)
tbl \${ROOT}.\${TYPE} | nroff -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
;;
esac
CF_EOF
fi
chmod 700 $MAN2HTML_TEMP
AC_SUBST(MAN2HTML_NOTE)
AC_SUBST(MAN2HTML_PATH)
AC_SUBST(MAN2HTML_TEMP)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
dnl ---------------- dnl ----------------
AC_DEFUN([CF_WITH_VALGRIND],[ AC_DEFUN([CF_WITH_VALGRIND],[
@ -1085,7 +1287,7 @@ fi
fi fi
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 48 updated: 2014/09/01 12:29:14 dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00
dnl --------------- dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality, dnl or adapt to the vendor's definitions to get equivalent functionality,
@ -1101,21 +1303,21 @@ cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
cf_xopen_source= cf_xopen_source=
case $host_os in #(vi case $host_os in
aix[[4-7]]*) #(vi (aix[[4-7]]*)
cf_xopen_source="-D_ALL_SOURCE" cf_xopen_source="-D_ALL_SOURCE"
;; ;;
cygwin|msys) #(vi (cygwin|msys)
cf_XOPEN_SOURCE=600 cf_XOPEN_SOURCE=600
;; ;;
darwin[[0-8]].*) #(vi (darwin[[0-8]].*)
cf_xopen_source="-D_APPLE_C_SOURCE" cf_xopen_source="-D_APPLE_C_SOURCE"
;; ;;
darwin*) #(vi (darwin*)
cf_xopen_source="-D_DARWIN_C_SOURCE" cf_xopen_source="-D_DARWIN_C_SOURCE"
cf_XOPEN_SOURCE= cf_XOPEN_SOURCE=
;; ;;
freebsd*|dragonfly*) #(vi (freebsd*|dragonfly*)
# 5.x headers associate # 5.x headers associate
# _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
# _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
@ -1123,56 +1325,56 @@ freebsd*|dragonfly*) #(vi
cf_XOPEN_SOURCE=600 cf_XOPEN_SOURCE=600
cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
;; ;;
hpux11*) #(vi (hpux11*)
cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500" cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
;; ;;
hpux*) #(vi (hpux*)
cf_xopen_source="-D_HPUX_SOURCE" cf_xopen_source="-D_HPUX_SOURCE"
;; ;;
irix[[56]].*) #(vi (irix[[56]].*)
cf_xopen_source="-D_SGI_SOURCE" cf_xopen_source="-D_SGI_SOURCE"
cf_XOPEN_SOURCE= cf_XOPEN_SOURCE=
;; ;;
linux*|gnu*|mint*|k*bsd*-gnu) #(vi (linux*|gnu*|mint*|k*bsd*-gnu)
CF_GNU_SOURCE CF_GNU_SOURCE
;; ;;
minix*) #(vi (minix*)
cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
;; ;;
mirbsd*) #(vi (mirbsd*)
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
cf_XOPEN_SOURCE= cf_XOPEN_SOURCE=
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
;; ;;
netbsd*) #(vi (netbsd*)
cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;; ;;
openbsd[[4-9]]*) #(vi (openbsd[[4-9]]*)
# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
cf_xopen_source="-D_BSD_SOURCE" cf_xopen_source="-D_BSD_SOURCE"
cf_XOPEN_SOURCE=600 cf_XOPEN_SOURCE=600
;; ;;
openbsd*) #(vi (openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;; ;;
osf[[45]]*) #(vi (osf[[45]]*)
cf_xopen_source="-D_OSF_SOURCE" cf_xopen_source="-D_OSF_SOURCE"
;; ;;
nto-qnx*) #(vi (nto-qnx*)
cf_xopen_source="-D_QNX_SOURCE" cf_xopen_source="-D_QNX_SOURCE"
;; ;;
sco*) #(vi (sco*)
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;; ;;
solaris2.*) #(vi (solaris2.*)
cf_xopen_source="-D__EXTENSIONS__" cf_xopen_source="-D__EXTENSIONS__"
cf_cv_xopen_source=broken cf_cv_xopen_source=broken
;; ;;
sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2) (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
cf_XOPEN_SOURCE= cf_XOPEN_SOURCE=
cf_POSIX_C_SOURCE= cf_POSIX_C_SOURCE=
;; ;;
*) (*)
CF_TRY_XOPEN_SOURCE CF_TRY_XOPEN_SOURCE
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
;; ;;

40
config.guess vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright 1992-2014 Free Software Foundation, Inc. # Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2014-03-23' timestamp='2015-03-04'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -24,12 +24,12 @@ timestamp='2014-03-23'
# program. This Exception is an additional permission under section 7 # program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3"). # of the GNU General Public License, version 3 ("GPLv3").
# #
# Originally written by Per Bothner. # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
# #
# You can get the latest version of this script from: # You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# #
# Please send patches with a ChangeLog entry to config-patches@gnu.org. # Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'` me=`echo "$0" | sed -e 's,.*/,,'`
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright 1992-2014 Free Software Foundation, Inc. Copyright 1992-2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor # Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown". # portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch" sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)` /sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || \
echo unknown)`
case "${UNAME_MACHINE_ARCH}" in case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;; armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;; arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;; sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;; sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;; sh5el) machine=sh5le-unknown ;;
earmv*)
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
machine=${arch}${endian}-unknown
;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac esac
# The Operating System including object format, if it has switched # The Operating System including object format, if it has switched
# to ELF recently, or will in the future. # to ELF recently, or will in the future.
case "${UNAME_MACHINE_ARCH}" in case "${UNAME_MACHINE_ARCH}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax) arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__ | grep -q __ELF__
@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd os=netbsd
;; ;;
esac esac
# Determine ABI tags.
case "${UNAME_MACHINE_ARCH}" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
;;
esac
# The OS release # The OS release
# Debian GNU/NetBSD machines have a different userland, and # Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need # thus, need a distinct triplet. However, they do not need
@ -213,7 +227,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form: # contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}" echo "${machine}-${os}${release}${abi}"
exit ;; exit ;;
*:Bitrig:*:*) *:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@ -579,8 +593,9 @@ EOF
else else
IBM_ARCH=powerpc IBM_ARCH=powerpc
fi fi
if [ -x /usr/bin/oslevel ] ; then if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/oslevel` IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi fi
@ -932,6 +947,9 @@ EOF
crisv32:Linux:*:*) crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC} echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;; exit ;;
e2k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*) frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;; exit ;;

30
config.sub vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright 1992-2014 Free Software Foundation, Inc. # Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2014-07-28' timestamp='2015-03-08'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -25,7 +25,7 @@ timestamp='2014-07-28'
# of the GNU General Public License, version 3 ("GPLv3"). # of the GNU General Public License, version 3 ("GPLv3").
# Please send patches with a ChangeLog entry to config-patches@gnu.org. # Please send patches to <config-patches@gnu.org>.
# #
# Configuration subroutine to validate and canonicalize a configuration type. # Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument. # Supply the specified configuration type as an argument.
@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright 1992-2014 Free Software Foundation, Inc. Copyright 1992-2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -117,7 +117,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
@ -259,8 +259,8 @@ case $basic_machine in
| bfin \ | bfin \
| c4x | c8051 | clipper \ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| epiphany \ | e2k | epiphany \
| fido | fr30 | frv \ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \ | hexagon \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
@ -302,6 +302,7 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \ | pyramid \
| riscv32 | riscv64 \
| rl78 | rx \ | rl78 | rx \
| score \ | score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@ -312,6 +313,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \ | ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| we32k \ | we32k \
| x86 | xc16x | xstormy16 | xtensa \ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80) | z8k | z80)
@ -326,6 +328,9 @@ case $basic_machine in
c6x) c6x)
basic_machine=tic6x-unknown basic_machine=tic6x-unknown
;; ;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
@ -376,7 +381,7 @@ case $basic_machine in
| c[123]* | c30-* | [cjt]90-* | c4x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@ -436,6 +441,7 @@ case $basic_machine in
| ubicom32-* \ | ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \ | vax-* \
| visium-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \ | xstormy16-* | xtensa*-* \
@ -512,6 +518,9 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-aros os=-aros
;; ;;
asmjs)
basic_machine=asmjs-unknown
;;
aux) aux)
basic_machine=m68k-apple basic_machine=m68k-apple
os=-aux os=-aux
@ -773,6 +782,9 @@ case $basic_machine in
basic_machine=m68k-isi basic_machine=m68k-isi
os=-sysv os=-sysv
;; ;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
;;
m68knommu) m68knommu)
basic_machine=m68k-unknown basic_machine=m68k-unknown
os=-linux os=-linux
@ -1364,7 +1376,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \ | -aos* | -aros* | -cloudabi* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \

1520
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
dnl Process this file with 'autoconf' to produce a 'configure' script dnl Process this file with 'autoconf' to produce a 'configure' script
dnl $Id: configure.in,v 1.20 2014/10/06 22:39:39 tom Exp $ dnl $Id: configure.in,v 1.21 2015/07/05 22:07:36 tom Exp $
AC_PREREQ(2.52.20011201) AC_PREREQ(2.52.20011201)
AC_REVISION($Revision: 1.20 $) AC_REVISION($Revision: 1.21 $)
AC_INIT(main.c) AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config_h.in) AC_CONFIG_HEADER(config.h:config_h.in)
@ -53,6 +53,7 @@ AC_SUBST(SKELETON)
CF_WITH_WARNINGS(Wwrite-strings) CF_WITH_WARNINGS(Wwrite-strings)
CF_DISABLE_ECHO CF_DISABLE_ECHO
CF_DISABLE_LEAKS CF_DISABLE_LEAKS
CF_WITH_MAN2HTML
AC_TYPE_MODE_T AC_TYPE_MODE_T

7
lr0.c
View File

@ -1,4 +1,4 @@
/* $Id: lr0.c,v 1.17 2014/11/28 15:46:42 tom Exp $ */ /* $Id: lr0.c,v 1.18 2015/07/11 00:53:38 tom Exp $ */
#include "defs.h" #include "defs.h"
@ -596,7 +596,10 @@ lr0_leaks(void)
{ {
if (derives) if (derives)
{ {
DO_FREE(derives[start_symbol]); if (derives[start_symbol] != rules)
{
DO_FREE(derives[start_symbol]);
}
DO_FREE(derives); DO_FREE(derives);
DO_FREE(rules); DO_FREE(rules);
} }

12
main.c
View File

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.54 2014/10/06 22:40:07 tom Exp $ */ /* $Id: main.c,v 1.55 2015/07/11 00:34:19 tom Exp $ */
#include <signal.h> #include <signal.h>
#ifndef _WIN32 #ifndef _WIN32
@ -551,6 +551,7 @@ my_mkstemp(char *temp)
static FILE * static FILE *
open_tmpfile(const char *label) open_tmpfile(const char *label)
{ {
#define MY_FMT "%s/%.*sXXXXXX"
FILE *result; FILE *result;
#if USE_MKSTEMP #if USE_MKSTEMP
int fd; int fd;
@ -569,7 +570,11 @@ open_tmpfile(const char *label)
tmpdir = "."; tmpdir = ".";
} }
name = malloc(strlen(tmpdir) + 10 + strlen(label)); /* The size of the format is guaranteed to be longer than the result from
* printing empty strings with it; this calculation accounts for the
* string-lengths as well.
*/
name = malloc(strlen(tmpdir) + sizeof(MY_FMT) + strlen(label));
result = 0; result = 0;
if (name != 0) if (name != 0)
@ -579,7 +584,7 @@ open_tmpfile(const char *label)
if ((mark = strrchr(label, '_')) == 0) if ((mark = strrchr(label, '_')) == 0)
mark = label + strlen(label); mark = label + strlen(label);
sprintf(name, "%s/%.*sXXXXXX", tmpdir, (int)(mark - label), label); sprintf(name, MY_FMT, tmpdir, (int)(mark - label), label);
fd = mkstemp(name); fd = mkstemp(name);
if (fd >= 0) if (fd >= 0)
{ {
@ -612,6 +617,7 @@ open_tmpfile(const char *label)
if (result == 0) if (result == 0)
open_error(label); open_error(label);
return result; return result;
#undef MY_FMT
} }
static void static void

View File

@ -1,4 +1,4 @@
# $Id: makefile.in,v 1.23 2014/04/09 12:15:52 tom Exp $ # $Id: makefile.in,v 1.24 2015/07/05 22:12:29 tom Exp $
# #
# UNIX template-makefile for Berkeley Yacc # UNIX template-makefile for Berkeley Yacc
@ -134,7 +134,7 @@ clean :: mostlyclean
- rm -f $(THIS)$x - rm -f $(THIS)$x
distclean :: clean distclean :: clean
- rm -f config.log config.cache config.status config.h makefile - rm -f config.log config.cache config.status config.h makefile man2html.tmp
- rm -f $(testdir)/yacc/test-* $(testdir)/btyacc/test-* - rm -f $(testdir)/yacc/test-* $(testdir)/btyacc/test-*
realclean :: distclean realclean :: distclean

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc %define AppProgram byacc
%define AppVersion 20141128 %define AppVersion 20150711
%define UseProgram yacc %define UseProgram yacc
# $XTermId: byacc.spec,v 1.26 2014/11/28 15:42:17 tom Exp $ # $XTermId: byacc.spec,v 1.28 2015/07/11 00:53:15 tom Exp $
Name: %{AppProgram} Name: %{AppProgram}
Version: %{AppVersion} Version: %{AppVersion}
Release: 1 Release: 1

View File

@ -1,3 +1,15 @@
byacc (20150711) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 Jul 2015 20:53:15 -0400
byacc (20150705) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 05 Jul 2015 18:24:51 -0400
byacc (20141128) unstable; urgency=low byacc (20141128) unstable; urgency=low
* maintenance updates * maintenance updates

View File

@ -36,7 +36,7 @@ skeleton.c with the bug report. Do not expect rapid responses.
Files: aclocal.m4 Files: aclocal.m4
Licence: other-BSD Licence: other-BSD
Copyright: 2004-2011,2012 by Thomas E. Dickey Copyright: 2004-2014,2015 by Thomas E. Dickey
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc %define AppProgram byacc
%define AppVersion 20141128 %define AppVersion 20150711
%define UseProgram yacc %define UseProgram yacc
# $XTermId: mingw-byacc.spec,v 1.8 2014/11/28 15:42:17 tom Exp $ # $XTermId: mingw-byacc.spec,v 1.10 2015/07/11 00:53:15 tom Exp $
Name: %{AppProgram} Name: %{AppProgram}
Version: %{AppVersion} Version: %{AppVersion}
Release: 1 Release: 1

View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $ # $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $
# #
DISTNAME= byacc-20141128 DISTNAME= byacc-20150711
PKGREVISION= 1 PKGREVISION= 1
CATEGORIES= devel CATEGORIES= devel
MASTER_SITES= ftp://invisible-island.net/byacc/ MASTER_SITES= ftp://invisible-island.net/byacc/

View File

@ -1,4 +1,4 @@
/* $Id: reader.c,v 1.58 2014/10/06 22:15:08 tom Exp $ */ /* $Id: reader.c,v 1.59 2015/07/11 00:39:03 tom Exp $ */
#include "defs.h" #include "defs.h"
@ -26,6 +26,7 @@ static void copy_destructor(void);
static char *process_destructor_XX(char *code, char *tag); static char *process_destructor_XX(char *code, char *tag);
#endif #endif
#define CACHE_SIZE 256
static char *cache; static char *cache;
static int cinc, cache_size; static int cinc, cache_size;
@ -95,7 +96,7 @@ cachec(int c)
assert(cinc >= 0); assert(cinc >= 0);
if (cinc >= cache_size) if (cinc >= cache_size)
{ {
cache_size += 256; cache_size += CACHE_SIZE;
cache = TREALLOC(char, cache, cache_size); cache = TREALLOC(char, cache, cache_size);
NO_SPACE(cache); NO_SPACE(cache);
} }
@ -1495,7 +1496,7 @@ read_declarations(void)
{ {
int c, k; int c, k;
cache_size = 256; cache_size = CACHE_SIZE;
cache = TMALLOC(char, cache_size); cache = TMALLOC(char, cache_size);
NO_SPACE(cache); NO_SPACE(cache);
@ -2081,6 +2082,7 @@ insert_empty_rule(void)
bucket *bp, **bpp; bucket *bp, **bpp;
assert(cache); assert(cache);
assert(cache_size >= CACHE_SIZE);
sprintf(cache, "$$%d", ++gensym); sprintf(cache, "$$%d", ++gensym);
bp = make_bucket(cache); bp = make_bucket(cache);
last_symbol->next = bp; last_symbol->next = bp;