diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-12-28 20:51:34 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-12-28 20:51:34 +0200 |
commit | 18906a48d06521c9bbd77ffe6c3dbf9498ca5b20 (patch) | |
tree | affbe2c45bc4d3f88d53fa14f7f5fde02f3ad463 | |
parent | 348c16bbdf8c1599188d7f60e9e9ff58fa9e7484 (diff) | |
parent | 57801f2be5b7548e2dba148a54c0b0542a4240c7 (diff) | |
download | egawk-18906a48d06521c9bbd77ffe6c3dbf9498ca5b20.tar.gz egawk-18906a48d06521c9bbd77ffe6c3dbf9498ca5b20.tar.bz2 egawk-18906a48d06521c9bbd77ffe6c3dbf9498ca5b20.zip |
Merge branch 'master' into feature/fix-comments
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/texinfo.tex | 47 | ||||
-rw-r--r-- | extension/ChangeLog | 19 | ||||
-rw-r--r-- | extension/configh.in | 17 | ||||
-rwxr-xr-x | extension/configure | 115 | ||||
-rw-r--r-- | extension/configure.ac | 14 | ||||
-rw-r--r-- | extension/filefuncs.c | 12 | ||||
-rw-r--r-- | extension/fnmatch.c | 11 | ||||
-rw-r--r-- | extension/gawkfts.c | 2 | ||||
-rw-r--r-- | helpers/ChangeLog | 4 | ||||
-rwxr-xr-x | helpers/update-aux.sh | 22 | ||||
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 9 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/numstr1.awk | 7 | ||||
-rw-r--r-- | test/numstr1.ok | 2 |
17 files changed, 190 insertions, 109 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 868adf25..3bd0dd5c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2017-12-28 Arnold D. Robbins <arnold@skeeve.com> + + * texinfo.tex: Updated. + 2017-12-22 Arnold D. Robbins <arnold@skeeve.com> * texinfo.tex: Updated. diff --git a/doc/texinfo.tex b/doc/texinfo.tex index 42bb9833..1987c50b 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2017-12-18.20} +\def\texinfoversion{2017-12-26.21} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -2619,26 +2619,11 @@ end % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost -% style and the set of \ifmarkupSTYLE switches for all styles -% currently in effect. -\newif\ifmarkupvar -\newif\ifmarkupsamp -\newif\ifmarkupkey -%\newif\ifmarkupfile % @file == @samp. -%\newif\ifmarkupoption % @option == @samp. -\newif\ifmarkupcode -\newif\ifmarkupkbd -%\newif\ifmarkupenv % @env == @code. -%\newif\ifmarkupcommand % @command == @code. -\newif\ifmarkuptex % @tex (and part of @math, for now). -\newif\ifmarkupexample -\newif\ifmarkupverb -\newif\ifmarkupverbatim +% style. \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% - \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } @@ -2700,11 +2685,15 @@ end % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% - \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax - \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax - '% + \ifmonospace + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi \else \char'15 \fi - \else \char'15 \fi + \else + '% + \fi } % % and a similar option for the left quote char vs. a grave accent. @@ -2712,13 +2701,17 @@ end % the code environments to do likewise. % \def\codequoteleft{% - \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax - \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax - % [Knuth] pp. 380,381,391 - % \relax disables Spanish ligatures ?` and !` of \tt font. - \relax`% + \ifmonospace + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi \else \char'22 \fi - \else \char'22 \fi + \else + \relax`% + \fi } % Commands to set the quote options. diff --git a/extension/ChangeLog b/extension/ChangeLog index b6e943cd..5fd1757e 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,22 @@ +2017-12-28 Arnold D. Robbins <arnold@skeeve.com> + + More configuration fixes, mainly for Fedora. Thanks to + Michal Jaegermann <michal.jnn@gmail.com> for the reports + and for validating. + + * configure.ac (AC_HEADER_MAJOR): Comment out, no longer works. + (sys/sysmacros.h, sys/mkdev.h): Check for header existence. + (fmod): Check with AC_SEARCH_LIB instead of AC_CHECK_FUNCS. + * filefuncs.c: Rework header inclusion checks and order so + that we get the `major' macro without warnings on Fedora. + * fnmatch.c: Ditto. + +2017-12-26 Arnold D. Robbins <arnold@skeeve.com> + + * gawkfts.c (fts_safe_changedir): Add check for path not null + before trying to open it. Thanks to Michal Jaegermann + <michal.jnn@gmail.com> for the report. + 2017-12-24 Michal Jaegermann <michal.jnn@gmail.com> * intdiv.c: Fix compilation for MPFR 2.4.1. diff --git a/extension/configh.in b/extension/configh.in index 9d3d9919..c2b16d7b 100644 --- a/extension/configh.in +++ b/extension/configh.in @@ -27,9 +27,6 @@ /* Define to 1 if you have the `fdopendir' function. */ #undef HAVE_FDOPENDIR -/* Define to 1 if you have the `fmod' function. */ -#undef HAVE_FMOD - /* Define to 1 if you have the `fnmatch' function. */ #undef HAVE_FNMATCH @@ -88,6 +85,9 @@ */ #undef HAVE_SYS_DIR_H +/* Define to 1 if you have the <sys/mkdev.h> header file. */ +#undef HAVE_SYS_MKDEV_H + /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H @@ -104,6 +104,9 @@ /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the <sys/sysmacros.h> header file. */ +#undef HAVE_SYS_SYSMACROS_H + /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H @@ -116,14 +119,6 @@ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR -/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>. - */ -#undef MAJOR_IN_MKDEV - -/* Define to 1 if `major', `minor', and `makedev' are declared in - <sysmacros.h>. */ -#undef MAJOR_IN_SYSMACROS - /* Name of package */ #undef PACKAGE diff --git a/extension/configure b/extension/configure index 3666df28..854e296f 100755 --- a/extension/configure +++ b/extension/configure @@ -12618,7 +12618,8 @@ else $as_echo "no" >&6; } fi -for ac_header in fnmatch.h limits.h sys/time.h sys/select.h sys/param.h sys/statvfs.h +for ac_header in fnmatch.h limits.h sys/mkdev.h sys/param.h sys/select.h \ + sys/statvfs.h sys/sysmacros.h sys/time.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12631,6 +12632,7 @@ fi done + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` @@ -12789,56 +12791,6 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 -$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if ${ac_cv_header_sys_types_h_makedev+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -int -main () -{ -return makedev(0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_header_sys_types_h_makedev=yes -else - ac_cv_header_sys_types_h_makedev=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 -$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } - -if test $ac_cv_header_sys_types_h_makedev = no; then -ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : - -$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h - -fi - - - - if test $ac_cv_header_sys_mkdev_h = no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : - -$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h - -fi - - - fi -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : @@ -12959,8 +12911,9 @@ $as_echo "#define HAVE_MPFR 1" >>confdefs.h ;; esac -for ac_func in fdopendir fmod fnmatch getdtablesize \ - gettimeofday nanosleep select statvfs GetSystemTimeAsFileTime +for ac_func in fdopendir fnmatch getdtablesize \ + gettimeofday nanosleep select statvfs \ + GetSystemTimeAsFileTime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -12972,6 +12925,62 @@ _ACEOF fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmod" >&5 +$as_echo_n "checking for library containing fmod... " >&6; } +if ${ac_cv_search_fmod+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fmod (); +int +main () +{ +return fmod (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_fmod=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_fmod+:} false; then : + break +fi +done +if ${ac_cv_search_fmod+:} false; then : + +else + ac_cv_search_fmod=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmod" >&5 +$as_echo "$ac_cv_search_fmod" >&6; } +ac_res=$ac_cv_search_fmod +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + diff --git a/extension/configure.ac b/extension/configure.ac index e1438259..14259333 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -75,9 +75,13 @@ else AC_MSG_RESULT([no]) fi -AC_CHECK_HEADERS(fnmatch.h limits.h sys/time.h sys/select.h sys/param.h sys/statvfs.h) +AC_CHECK_HEADERS(fnmatch.h limits.h sys/mkdev.h sys/param.h sys/select.h \ + sys/statvfs.h sys/sysmacros.h sys/time.h) + AC_HEADER_DIRENT -AC_HEADER_MAJOR +dnl 12/2017: AC_HEADER_MAJOR no longer works on recent Fedora / GLIBC. +dnl Instead we just check for the headers in the call above. +dnl AC_HEADER_MAJOR AC_HEADER_TIME dnl check for mpfr support @@ -92,8 +96,10 @@ case `uname -m` in ;; esac -AC_CHECK_FUNCS(fdopendir fmod fnmatch getdtablesize \ - gettimeofday nanosleep select statvfs GetSystemTimeAsFileTime) +AC_CHECK_FUNCS(fdopendir fnmatch getdtablesize \ + gettimeofday nanosleep select statvfs \ + GetSystemTimeAsFileTime) +AC_SEARCH_LIBS(fmod, m) GAWK_FUNC_DIRFD GAWK_PREREQ_DIRFD diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 38542115..64016402 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -72,17 +72,17 @@ #include <string.h> #include <unistd.h> -#include <sys/types.h> - #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif /* HAVE_SYS_PARAM_H */ -#ifdef MAJOR_IN_MKDEV -#include <sys/mkdev.h> -#elif defined(MAJOR_IN_SYSMACROS) +#if HAVE_SYS_SYSMACROS_H #include <sys/sysmacros.h> -#endif +#elif HAVE_SYS_MKDEV_H +#include <sys/mkdev.h> +#endif /* HAVE_SYS_MKDEV_H */ + +#include <sys/types.h> #include <sys/stat.h> diff --git a/extension/fnmatch.c b/extension/fnmatch.c index 9b7640de..5119bfda 100644 --- a/extension/fnmatch.c +++ b/extension/fnmatch.c @@ -36,14 +36,15 @@ #include <string.h> #include <unistd.h> -#include <sys/types.h> #include <sys/stat.h> -#ifdef MAJOR_IN_MKDEV -#include <sys/mkdev.h> -#elif defined(MAJOR_IN_SYSMACROS) +#if HAVE_SYS_SYSMACROS_H #include <sys/sysmacros.h> -#endif +#elif HAVE_SYS_MKDEV_H +#include <sys/mkdev.h> +#endif /* HAVE_SYS_MKDEV_H */ + +#include <sys/types.h> #include "gawkapi.h" diff --git a/extension/gawkfts.c b/extension/gawkfts.c index d9edd87f..c7fbc17d 100644 --- a/extension/gawkfts.c +++ b/extension/gawkfts.c @@ -1239,7 +1239,7 @@ fts_safe_changedir(const FTS *sp, const FTSENT *p, int fd, const char *path) if (ISSET(FTS_NOCHDIR)) return 0; - if (oldfd < 0 && (fd = open(path, O_RDONLY)) == -1) + if (oldfd < 0 && (path == NULL || (fd = open(path, O_RDONLY)) == -1)) return -1; if (fstat(fd, &sb) == -1) diff --git a/helpers/ChangeLog b/helpers/ChangeLog index 0833f7ed..d4312faa 100644 --- a/helpers/ChangeLog +++ b/helpers/ChangeLog @@ -1,3 +1,7 @@ +2017-12-28 Arnold D. Robbins <arnold@skeeve.com> + + * update-aux.sh: New script. + 2017-10-19 Arnold D. Robbins <arnold@skeeve.com> * 4.2.0: Release tar ball made. diff --git a/helpers/update-aux.sh b/helpers/update-aux.sh new file mode 100755 index 00000000..0d758486 --- /dev/null +++ b/helpers/update-aux.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +# This script is only useful for the maintainer ... +# +# It updates all the build-aux files from current GNULIB. +# We don't bother to print any messages about what we copied, +# as Git will tell us what, if anything, changed. + +(cd /usr/local/src/Gnu/gnulib && git pull) + +GL=/usr/local/src/Gnu/gnulib/build-aux + +for i in $(cd $GL ; echo *) +do + for dir in . extension/build-aux doc + do + if [ -f $GL/$i ] && [ -f $dir/$i ] + then + cp $GL/$i $dir/$i + fi + done +done diff --git a/test/ChangeLog b/test/ChangeLog index 1e1cf7ea..26fd2d48 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2017-12-28 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): Add numstr1 files. + * numstr1.awk, numstr1.ok: New files. + 2017-11-14 Andrew J. Schorr <aschorr@telemetry-investments.com> * Makefile.am (EXTRA_DIST): Add new tests setrec0 and setrec1. diff --git a/test/Makefile.am b/test/Makefile.am index 1438e083..0fa74b2c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -747,6 +747,8 @@ EXTRA_DIST = \ numindex.awk \ numindex.in \ numindex.ok \ + numstr1.awk \ + numstr1.ok \ numsubstr.awk \ numsubstr.in \ numsubstr.ok \ @@ -1224,7 +1226,7 @@ BASIC_TESTS = \ manglprm math membug1 memleak messages minusstr mmap8k mtchi18n \ nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \ nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \ - nors nulinsrc nulrsend numindex numsubstr \ + nors nulinsrc nulrsend numindex numstr1 numsubstr \ octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofmtstrnum ofs1 onlynl \ opasnidx opasnslf \ paramasfunc1 paramasfunc2 paramdup paramres paramtyp paramuninitglobal \ diff --git a/test/Makefile.in b/test/Makefile.in index 5a190d7a..493bf9fa 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1005,6 +1005,8 @@ EXTRA_DIST = \ numindex.awk \ numindex.in \ numindex.ok \ + numstr1.awk \ + numstr1.ok \ numsubstr.awk \ numsubstr.in \ numsubstr.ok \ @@ -1481,7 +1483,7 @@ BASIC_TESTS = \ manglprm math membug1 memleak messages minusstr mmap8k mtchi18n \ nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \ nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \ - nors nulinsrc nulrsend numindex numsubstr \ + nors nulinsrc nulrsend numindex numstr1 numsubstr \ octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofmtstrnum ofs1 onlynl \ opasnidx opasnslf \ paramasfunc1 paramasfunc2 paramdup paramres paramtyp paramuninitglobal \ @@ -3494,6 +3496,11 @@ numindex: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +numstr1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + numsubstr: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index f64b8640..6a685101 100644 --- a/test/Maketests +++ b/test/Maketests @@ -620,6 +620,11 @@ numindex: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +numstr1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + numsubstr: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/numstr1.awk b/test/numstr1.awk new file mode 100644 index 00000000..e58404fc --- /dev/null +++ b/test/numstr1.awk @@ -0,0 +1,7 @@ +BEGIN { + split("1.234", f) + OFMT = "%.1f" + print f[1] + x = f[1]+0 + print f[1] +} diff --git a/test/numstr1.ok b/test/numstr1.ok new file mode 100644 index 00000000..434a231c --- /dev/null +++ b/test/numstr1.ok @@ -0,0 +1,2 @@ +1.234 +1.234 |