diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rwxr-xr-x | config.guess | 28 | ||||
-rwxr-xr-x | config.sub | 26 | ||||
-rwxr-xr-x | configure | 50 | ||||
-rw-r--r-- | configure.ac | 41 | ||||
-rwxr-xr-x | depcomp | 35 | ||||
-rw-r--r-- | doc/ChangeLog | 9 | ||||
-rw-r--r-- | doc/gawk.info | 116 | ||||
-rw-r--r-- | doc/gawk.texi | 9 | ||||
-rw-r--r-- | doc/gawktexi.in | 9 | ||||
-rw-r--r-- | doc/texinfo.tex | 51 | ||||
-rw-r--r-- | extension/ChangeLog | 12 | ||||
-rw-r--r-- | extension/build-aux/ChangeLog | 5 | ||||
-rwxr-xr-x | extension/build-aux/config.guess | 28 | ||||
-rwxr-xr-x | extension/build-aux/config.sub | 26 | ||||
-rwxr-xr-x | extension/build-aux/depcomp | 35 | ||||
-rwxr-xr-x | extension/build-aux/install-sh | 20 | ||||
-rwxr-xr-x | extension/configure | 20 | ||||
-rw-r--r-- | extension/configure.ac | 18 | ||||
-rw-r--r-- | extension/ext_custom.h | 4 | ||||
-rwxr-xr-x | install-sh | 20 | ||||
-rw-r--r-- | support/ChangeLog | 21 | ||||
-rw-r--r-- | support/regcomp.c | 4 | ||||
-rw-r--r-- | support/regex.h | 62 | ||||
-rw-r--r-- | support/regex_internal.h | 3 | ||||
-rw-r--r-- | support/regexec.c | 4 |
26 files changed, 471 insertions, 203 deletions
@@ -1,3 +1,21 @@ +2017-12-22 Arnold D. Robbins <arnold@skeeve.com> + + * config.guess, config.sub, depcomp, install-sh: Updated + from GNULIB. + +2017-12-20 Arnold D. Robbins <arnold@skeeve.com> + + * configure.ac: Add --enable-versioned-dir option for a + directory with API version in it to hold extensions. + +2017-12-19 Arnold D. Robbins <arnold@skeeve.com> + + * configure.ac: Remove x's from `test "x$something" = "xyes" + kinds of things. With correct quoting, the x isn't needed. + (DYNAMIC): Remove use of -Wl,-export-dynamic on Linux + and FreeBSD. It was needed for old-style extensions, which are + no longer supported. + 2017-12-10 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y: For '!' optimization on a string constant, don't diff --git a/config.guess b/config.guess index ba1c1439..770cb5c7 100755 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-09-26' +timestamp='2017-12-17' # 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 @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -244,6 +244,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} exit ;; + *:MidnightBSD:*:*) + echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -262,6 +265,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:Redox:*:*) echo ${UNAME_MACHINE}-unknown-redox exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -479,13 +485,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); @@ -608,7 +614,7 @@ EOF *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and @@ -629,8 +635,8 @@ EOF 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` @@ -743,7 +749,7 @@ EOF { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -752,7 +758,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -1072,7 +1078,7 @@ EOF i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + i*86:*:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-09-26' +timestamp='2017-11-23' # 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 @@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -313,7 +313,6 @@ case $basic_machine in | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ - | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -640,7 +639,7 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; @@ -902,7 +901,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -1492,7 +1491,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1547,6 +1546,19 @@ case $os in -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; -ios) @@ -1694,7 +1706,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -660,7 +660,6 @@ MSGFMT GETTEXT_MACRO_VERSION USE_NLS SED -pkgextensiondir acl_shlibext RANLIB LN_S @@ -694,6 +693,7 @@ build_os build_vendor build_cpu build +pkgextensiondir AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V @@ -766,6 +766,7 @@ enable_silent_rules enable_lint enable_builtin_intdiv0 enable_mpfr +enable_versioned_extension_dir enable_dependency_tracking enable_largefile enable_nls @@ -1413,6 +1414,8 @@ Optional Features: --enable-builtin-intdiv0 enable built-in intdiv0 function --disable-mpfr do not check for MPFR + --enable-versioned-extension-dir + use a versioned directory for extensions --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking @@ -2589,7 +2592,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # With Autoconf 2.5x, this needs to come very early on, but *after* # the INIT macro. Sigh. -if test "x$INSTALL" = "x" +if test "$INSTALL" = "" then INSTALL="$srcdir/install-sh -c" export INSTALL @@ -3245,6 +3248,25 @@ if test "${enable_mpfr+set}" = set; then : fi +EXTENSIONDIR= +# Check whether --enable-versioned-extension-dir was given. +if test "${enable_versioned_extension_dir+set}" = set; then : + enableval=$enable_versioned_extension_dir; if test "$enableval" = yes + then + MAJOR=`awk '/define gawk_api_major_version/ { print $3 }' < $srcdir/gawkapi.h` + MINOR=`awk '/define gawk_api_minor_version/ { print $3 }' < $srcdir/gawkapi.h` + + # note leading slash on the value + export EXTENSIONDIR=/ext-$MAJOR.$MINOR + fi + +fi + + +# set default shared library location +pkgextensiondir='${pkglibdir}'${EXTENSIONDIR} + + # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 @@ -5406,9 +5428,6 @@ fi # shared library suffix for dynamic loading: -# default shared library location -pkgextensiondir='${pkglibdir}' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5 @@ -8326,7 +8345,7 @@ done fi - if test "x$build_alias" != "x$host_alias"; then + if test "$build_alias" != "$host_alias"; then TEST_CROSS_COMPILE_TRUE= TEST_CROSS_COMPILE_FALSE='#' else @@ -8840,7 +8859,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done - if test "x$rsync_cv_socklen_t_equiv" = x + if test "$rsync_cv_socklen_t_equiv" = "" then rsync_cv_socklen_t_equiv=int fi @@ -9974,7 +9993,7 @@ if test "${enable_extensions+set}" = set; then : enableval=$enable_extensions; fi -if test "x$enable_extensions" != "xno" +if test "$enable_extensions" != "no" then extensions_supported=no @@ -10054,15 +10073,6 @@ fi $as_echo "#define DYNAMIC 1" >>confdefs.h - # Add -export-dynamic for old extensions. Only works for GCC - if test "$GCC" = yes - then - case $host_os in - linux*|freebsd*) - LDFLAGS="$LDFLAGS -Wl,-export-dynamic" - ;; - esac - fi fi fi @@ -10071,13 +10081,13 @@ fi ;; esac - if test "x$enable_extensions$extensions_supported" = "xyesno" + if test "$enable_extensions$extensions_supported" = "yesno" then as_fn_error $? "extension support requested, but unavailable" "$LINENO" 5 fi enable_extensions=$extensions_supported fi - if test "x$enable_extensions" = "xyes"; then + if test "$enable_extensions" = "yes"; then ENABLE_EXTENSIONS_TRUE= ENABLE_EXTENSIONS_FALSE='#' else @@ -10988,7 +10998,7 @@ esac ac_config_files="$ac_config_files Makefile support/Makefile awklib/Makefile doc/Makefile extras/Makefile po/Makefile.in test/Makefile" -if test "x$enable_extensions" = "xyes" +if test "$enable_extensions" = "yes" then diff --git a/configure.ac b/configure.ac index 8503c421..3a7b90e7 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ AC_INIT([GNU Awk],[4.2.0],[bug-gawk@gnu.org],[gawk]) # With Autoconf 2.5x, this needs to come very early on, but *after* # the INIT macro. Sigh. -if test "x$INSTALL" = "x" +if test "$INSTALL" = "" then INSTALL="$srcdir/install-sh -c" export INSTALL @@ -72,6 +72,22 @@ AC_ARG_ENABLE([mpfr], fi ) +EXTENSIONDIR= +AC_ARG_ENABLE([versioned-extension-dir], + [AS_HELP_STRING([--enable-versioned-extension-dir], [use a versioned directory for extensions])], + if test "$enableval" = yes + then + MAJOR=`awk '/define gawk_api_major_version/ { print $3 }' < $srcdir/gawkapi.h` + MINOR=`awk '/define gawk_api_minor_version/ { print $3 }' < $srcdir/gawkapi.h` + + # note leading slash on the value + export EXTENSIONDIR=/ext-$MAJOR.$MINOR + fi +) + +# set default shared library location +AC_SUBST([pkgextensiondir], ['${pkglibdir}'${EXTENSIONDIR}]) + AC_CANONICAL_HOST AC_USE_SYSTEM_EXTENSIONS @@ -113,8 +129,6 @@ AC_SUBST(CFLAGS) # shared library suffix for dynamic loading: AC_SUBST(acl_shlibext) -# default shared library location -AC_SUBST([pkgextensiondir], ['${pkglibdir}']) dnl checks for systems AC_ZOS_USS @@ -159,7 +173,7 @@ else fi dnl Check cross compiling -AM_CONDITIONAL([TEST_CROSS_COMPILE], [test "x$build_alias" != "x$host_alias"]) +AM_CONDITIONAL([TEST_CROSS_COMPILE], [test "$build_alias" != "$host_alias"]) dnl checks for typedefs AC_TYPE_PID_T @@ -232,7 +246,7 @@ AC_DEFUN([TYPE_SOCKLEN_T], done done - if test "x$rsync_cv_socklen_t_equiv" = x + if test "$rsync_cv_socklen_t_equiv" = "" then dnl Some systems get this. Default to int. -- ADR dnl AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) @@ -291,7 +305,7 @@ dnl check for dynamic linking dnl This is known to be very primitive AC_ARG_ENABLE([extensions], [AS_HELP_STRING([--disable-extensions], [disable dynamic extensions (default is detect)])]) -if test "x$enable_extensions" != "xno" +if test "$enable_extensions" != "no" then extensions_supported=no @@ -312,27 +326,18 @@ then then extensions_supported=yes AC_DEFINE([DYNAMIC], 1, [dynamic loading is possible]) - # Add -export-dynamic for old extensions. Only works for GCC - if test "$GCC" = yes - then - case $host_os in - linux*|freebsd*) - LDFLAGS="$LDFLAGS -Wl,-export-dynamic" - ;; - esac - fi fi ]) ;; esac - if test "x$enable_extensions$extensions_supported" = "xyesno" + if test "$enable_extensions$extensions_supported" = "yesno" then AC_MSG_ERROR([extension support requested, but unavailable]) fi enable_extensions=$extensions_supported fi -AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "x$enable_extensions" = "xyes"]) +AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "$enable_extensions" = "yes"]) dnl check for how to use getpgrp dnl have to hardwire it for VMS POSIX. Sigh. @@ -431,7 +436,7 @@ AC_CONFIG_FILES(Makefile extras/Makefile po/Makefile.in test/Makefile) -if test "x$enable_extensions" = "xyes" +if test "$enable_extensions" = "yes" then AC_CONFIG_SUBDIRS(extension) fi @@ -251,6 +251,41 @@ hp) exit 1 ;; +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, diff --git a/doc/ChangeLog b/doc/ChangeLog index 02cc0dd4..868adf25 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +2017-12-22 Arnold D. Robbins <arnold@skeeve.com> + + * texinfo.tex: Updated. + +2017-12-20 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Additional Configuration Options): Add + description of the --enable-versioned-extension-dir option. + 2017-12-01 Sergey Tselikh <stselikh@gmail.com> * gawktexi.in: Several small changes to gawktexi.in, diff --git a/doc/gawk.info b/doc/gawk.info index a60904e7..66d2b9b3 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -28971,6 +28971,12 @@ command line when compiling 'gawk' from scratch, including: desirable, but it may bring you some slight performance improvement. +'--enable-versioned-extension-dir' + Use a versioned directory for extensions. The directory name will + include the major and minor API versions in it. This makes it + possible to keep extensions for different API versions on the same + system without their conflicting with one another. + Use the command './configure --help' to see the full list of options supplied by 'configure'. @@ -32874,6 +32880,8 @@ Index * --dump-variables option: Options. (line 94) * --dump-variables option, using for library functions: Library Names. (line 45) +* --enable-versioned-extension-dir configuration option: Additional Configuration Options. + (line 42) * --exec option: Options. (line 139) * --field-separator option: Options. (line 21) * --file option: Options. (line 25) @@ -33613,6 +33621,8 @@ Index (line 32) * configuration option, --disable-nls: Additional Configuration Options. (line 37) +* configuration option, --enable-versioned-extension-dir: Additional Configuration Options. + (line 42) * configuration options, gawk: Additional Configuration Options. (line 6) * constant regexps: Regexp Usage. (line 57) @@ -36451,58 +36461,58 @@ Node: Unix Installation1163323 Node: Quick Installation1164005 Node: Shell Startup Files1166419 Node: Additional Configuration Options1167508 -Node: Configuration Philosophy1169369 -Node: Non-Unix Installation1171738 -Node: PC Installation1172198 -Node: PC Binary Installation1173036 -Node: PC Compiling1173471 -Node: PC Using1174588 -Node: Cygwin1177633 -Node: MSYS1178403 -Node: VMS Installation1178904 -Node: VMS Compilation1179695 -Ref: VMS Compilation-Footnote-11180924 -Node: VMS Dynamic Extensions1180982 -Node: VMS Installation Details1182667 -Node: VMS Running1184920 -Node: VMS GNV1189199 -Node: VMS Old Gawk1189934 -Node: Bugs1190405 -Node: Bug address1191068 -Node: Usenet1193860 -Node: Maintainers1194637 -Node: Other Versions1195898 -Node: Installation summary1202660 -Node: Notes1203862 -Node: Compatibility Mode1204727 -Node: Additions1205509 -Node: Accessing The Source1206434 -Node: Adding Code1207871 -Node: New Ports1214090 -Node: Derived Files1218578 -Ref: Derived Files-Footnote-11224224 -Ref: Derived Files-Footnote-21224259 -Ref: Derived Files-Footnote-31224857 -Node: Future Extensions1224971 -Node: Implementation Limitations1225629 -Node: Extension Design1226812 -Node: Old Extension Problems1227966 -Ref: Old Extension Problems-Footnote-11229484 -Node: Extension New Mechanism Goals1229541 -Ref: Extension New Mechanism Goals-Footnote-11232905 -Node: Extension Other Design Decisions1233094 -Node: Extension Future Growth1235207 -Node: Old Extension Mechanism1236043 -Node: Notes summary1237806 -Node: Basic Concepts1238988 -Node: Basic High Level1239669 -Ref: figure-general-flow1239951 -Ref: figure-process-flow1240636 -Ref: Basic High Level-Footnote-11243937 -Node: Basic Data Typing1244122 -Node: Glossary1247450 -Node: Copying1279288 -Node: GNU Free Documentation License1316827 -Node: Index1341945 +Node: Configuration Philosophy1169673 +Node: Non-Unix Installation1172042 +Node: PC Installation1172502 +Node: PC Binary Installation1173340 +Node: PC Compiling1173775 +Node: PC Using1174892 +Node: Cygwin1177937 +Node: MSYS1178707 +Node: VMS Installation1179208 +Node: VMS Compilation1179999 +Ref: VMS Compilation-Footnote-11181228 +Node: VMS Dynamic Extensions1181286 +Node: VMS Installation Details1182971 +Node: VMS Running1185224 +Node: VMS GNV1189503 +Node: VMS Old Gawk1190238 +Node: Bugs1190709 +Node: Bug address1191372 +Node: Usenet1194164 +Node: Maintainers1194941 +Node: Other Versions1196202 +Node: Installation summary1202964 +Node: Notes1204166 +Node: Compatibility Mode1205031 +Node: Additions1205813 +Node: Accessing The Source1206738 +Node: Adding Code1208175 +Node: New Ports1214394 +Node: Derived Files1218882 +Ref: Derived Files-Footnote-11224528 +Ref: Derived Files-Footnote-21224563 +Ref: Derived Files-Footnote-31225161 +Node: Future Extensions1225275 +Node: Implementation Limitations1225933 +Node: Extension Design1227116 +Node: Old Extension Problems1228270 +Ref: Old Extension Problems-Footnote-11229788 +Node: Extension New Mechanism Goals1229845 +Ref: Extension New Mechanism Goals-Footnote-11233209 +Node: Extension Other Design Decisions1233398 +Node: Extension Future Growth1235511 +Node: Old Extension Mechanism1236347 +Node: Notes summary1238110 +Node: Basic Concepts1239292 +Node: Basic High Level1239973 +Ref: figure-general-flow1240255 +Ref: figure-process-flow1240940 +Ref: Basic High Level-Footnote-11244241 +Node: Basic Data Typing1244426 +Node: Glossary1247754 +Node: Copying1279592 +Node: GNU Free Documentation License1317131 +Node: Index1342249 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index dec51695..bca4eb39 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -39551,6 +39551,15 @@ MPFR support is not available. Disable all message-translation facilities. This is usually not desirable, but it may bring you some slight performance improvement. + +@cindex @option{--enable-versioned-extension-dir} configuration option +@cindex configuration option, @code{--enable-versioned-extension-dir} +@item --enable-versioned-extension-dir +Use a versioned directory for extensions. The directory name will +include the major and minor API versions in it. This makes it possible +to keep extensions for different API versions on the same system +without their conflicting with one another. + @end table Use the command @samp{./configure --help} to see the full list of diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 654fa3eb..8ec07642 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -38564,6 +38564,15 @@ MPFR support is not available. Disable all message-translation facilities. This is usually not desirable, but it may bring you some slight performance improvement. + +@cindex @option{--enable-versioned-extension-dir} configuration option +@cindex configuration option, @code{--enable-versioned-extension-dir} +@item --enable-versioned-extension-dir +Use a versioned directory for extensions. The directory name will +include the major and minor API versions in it. This makes it possible +to keep extensions for different API versions on the same system +without their conflicting with one another. + @end table Use the command @samp{./configure --help} to see the full list of diff --git a/doc/texinfo.tex b/doc/texinfo.tex index 9bd75b91..42bb9833 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-09-16.10} +\def\texinfoversion{2017-12-18.20} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -5969,24 +5969,30 @@ end % Split the last of the double-column material. \savemarks \balancecolumns - % + }% + \eject % call the \output just set + \ifdim\pagetotal=0pt % Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. \global\output = {\onepageout{\pagecontents\PAGE}}% - }% - \eject - \endgroup % started in \begindoublecolumns - \restoremarks - % Leave the double-column material on the current page, no automatic - % page break. - \box\balancedcolumns - % - % \pagegoal was set to the doubled \vsize above, since we restarted - % the current page. We're now back to normal single-column - % typesetting, so reset \pagegoal to the normal \vsize. - \global\vsize = \txipageheight % - \pagegoal = \txipageheight % + % + \endgroup % started in \begindoublecolumns + \restoremarks + % Leave the double-column material on the current page, no automatic + % page break. + \box\balancedcolumns + % + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize. + \global\vsize = \txipageheight % + \pagegoal = \txipageheight % + \else + % We had some left-over material. This might happen when \doublecolumnout + % is called in \balancecolumns. Try again. + \expandafter\enddoublecolumns + \fi } \newbox\balancedcolumns \setbox\balancedcolumns=\vbox{shouldnt see this}% @@ -6001,6 +6007,7 @@ end \ifdim\dimen@<5\baselineskip % Don't split a short final column in two. \setbox2=\vbox{}% + \global\setbox\balancedcolumns=\vbox{\pagesofar}% \else \divide\dimen@ by 2 % target to split to \dimen@ii = \dimen@ @@ -6016,15 +6023,15 @@ end \repeat }% % Now the left column is in box 1, and the right column in box 3. + % % Check whether the left column has come out higher than the page itself. % (Note that we have doubled \vsize for the double columns, so % the actual height of the page is 0.5\vsize). \ifdim2\ht1>\vsize - % Just split the last of the double column material roughly in half. - \setbox2=\box0 - \setbox0 = \vsplit2 to \dimen@ii - \setbox0=\vbox to \dimen@ii {\unvbox0\vfill}% - \setbox2=\vbox to \dimen@ii {\unvbox2\vfill}% + % It appears that we have been called upon to balance too much material. + % Output some of it with \doublecolumnout, leaving the rest on the page. + \setbox\PAGE=\box0 + \doublecolumnout \else % Compare the heights of the two columns. \ifdim4\ht1>5\ht3 @@ -6037,10 +6044,10 @@ end \setbox2=\vbox to\ht1{\unvbox3\unskip}% \setbox0=\vbox to\ht1{\unvbox1\unskip}% \fi + \global\setbox\balancedcolumns=\vbox{\pagesofar}% \fi \fi % - \global\setbox\balancedcolumns=\vbox{\pagesofar}% } \catcode`\@ = \other @@ -11425,9 +11432,11 @@ directory should work if nowhere else does.} % \dimen0 = #1\relax \advance\dimen0 by \voffset + \advance\dimen0 by 1in % reference point for DVI is 1 inch from top of page % \dimen2 = \hsize \advance\dimen2 by \normaloffset + \advance\dimen2 by 1in % reference point is 1 inch from left edge of page % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% diff --git a/extension/ChangeLog b/extension/ChangeLog index c04e9c26..f7884019 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,15 @@ +2017-12-20 Arnold D. Robbins <arnold@skeeve.com> + + * configure.ac: Add support for the --enable-versioned-dir option + in the main configure program. + +2017-12-19 Arnold D. Robbins <arnold@skeeve.com> + + * configure.ac: Add --disable-mpfr to be in sync with main + configure.ac and revise checking for MPFR appropriately. + * ext_custom.h: Use bug reporting address instead of my + personal address for reports of changes to this file. + 2017-10-28 Arnold D. Robbins <arnold@skeeve.com> * rwarray.c (do_writea): Fix description in comment. diff --git a/extension/build-aux/ChangeLog b/extension/build-aux/ChangeLog index 918674d7..eb954627 100644 --- a/extension/build-aux/ChangeLog +++ b/extension/build-aux/ChangeLog @@ -1,3 +1,8 @@ +2017-12-22 Arnold D. Robbins <arnold@skeeve.com> + + * config.guess, config.sub, depcomp, install-sh: Updated + from GNULIB. + 2017-10-19 Arnold D. Robbins <arnold@skeeve.com> * 4.2.0: Release tar ball made. diff --git a/extension/build-aux/config.guess b/extension/build-aux/config.guess index ba1c1439..770cb5c7 100755 --- a/extension/build-aux/config.guess +++ b/extension/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-09-26' +timestamp='2017-12-17' # 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 @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -244,6 +244,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} exit ;; + *:MidnightBSD:*:*) + echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -262,6 +265,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:Redox:*:*) echo ${UNAME_MACHINE}-unknown-redox exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -479,13 +485,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); @@ -608,7 +614,7 @@ EOF *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and @@ -629,8 +635,8 @@ EOF 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` @@ -743,7 +749,7 @@ EOF { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -752,7 +758,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -1072,7 +1078,7 @@ EOF i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + i*86:*:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} diff --git a/extension/build-aux/config.sub b/extension/build-aux/config.sub index c6950fd6..00f68b8e 100755 --- a/extension/build-aux/config.sub +++ b/extension/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-09-26' +timestamp='2017-11-23' # 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 @@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -313,7 +313,6 @@ case $basic_machine in | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ - | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -640,7 +639,7 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; @@ -902,7 +901,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -1492,7 +1491,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1547,6 +1546,19 @@ case $os in -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; -ios) @@ -1694,7 +1706,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) diff --git a/extension/build-aux/depcomp b/extension/build-aux/depcomp index 4527c641..5ff3c6fe 100755 --- a/extension/build-aux/depcomp +++ b/extension/build-aux/depcomp @@ -251,6 +251,41 @@ hp) exit 1 ;; +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, diff --git a/extension/build-aux/install-sh b/extension/build-aux/install-sh index 0360b79e..ac159ced 100755 --- a/extension/build-aux/install-sh +++ b/extension/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2016-01-11.22; # UTC +scriptversion=2017-09-23.17; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ do fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -427,8 +435,8 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 diff --git a/extension/configure b/extension/configure index 985e3079..3666df28 100755 --- a/extension/configure +++ b/extension/configure @@ -755,6 +755,7 @@ ac_user_opts=' enable_option_checking enable_dependency_tracking enable_silent_rules +enable_mpfr enable_largefile enable_static enable_shared @@ -1400,6 +1401,7 @@ Optional Features: speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") + --disable-mpfr do not check for MPFR --disable-largefile omit support for large files --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] @@ -4527,6 +4529,17 @@ END fi +SKIP_MPFR=no +# Check whether --enable-mpfr was given. +if test "${enable_mpfr+set}" = set; then : + enableval=$enable_mpfr; if test "$enableval" = no + then + SKIP_MPFR=yes + fi + +fi + + ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : @@ -12582,7 +12595,7 @@ CC=$lt_save_CC -pkgextensiondir='${libdir}/gawk' +pkgextensiondir='${pkglibdir}'${EXTENSIONDIR} if test "$GCC" = yes @@ -12866,7 +12879,8 @@ case `uname -m` in *'Power Macintosh'*) : ;; *) - + case $SKIP_MPFR in + no) # Check whether --with-mpfr was given. if test "${with_mpfr+set}" = set; then : @@ -12940,6 +12954,8 @@ $as_echo "#define HAVE_MPFR 1" >>confdefs.h unset _found_mpfr fi + ;; + esac ;; esac diff --git a/extension/configure.ac b/extension/configure.ac index bf43b689..e1438259 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -36,6 +36,15 @@ export INSTALL AM_INIT_AUTOMAKE([1.15 -Wall -Werror]) +SKIP_MPFR=no +AC_ARG_ENABLE([mpfr], + [AS_HELP_STRING([--disable-mpfr],[do not check for MPFR])], + if test "$enableval" = no + then + SKIP_MPFR=yes + fi +) + dnl checks for structure members AC_CHECK_MEMBERS([struct stat.st_blksize]) @@ -45,7 +54,9 @@ AC_DISABLE_STATIC LT_INIT dnl AC_PROG_INSTALL -AC_SUBST([pkgextensiondir], ['${libdir}/gawk']) +dnl use the same definition as the main configure script. +dnl EXTENSIONDIR is exported if it was set there. +AC_SUBST([pkgextensiondir], ['${pkglibdir}'${EXTENSIONDIR}]) if test "$GCC" = yes then @@ -74,7 +85,10 @@ case `uname -m` in *'Power Macintosh'*) : ;; *) - GNUPG_CHECK_MPFR + case $SKIP_MPFR in + no) GNUPG_CHECK_MPFR + ;; + esac ;; esac diff --git a/extension/ext_custom.h b/extension/ext_custom.h index 13702f24..b192f8f5 100644 --- a/extension/ext_custom.h +++ b/extension/ext_custom.h @@ -6,8 +6,8 @@ * in order to override definitions from Autoconf that are erroneous. See * the manual for more information. * - * If you make additions to this file for your system, please send me - * the information, to arnold@skeeve.com. + * If you make additions to this file for your system, please send + * the information to bug-gawk@gnu.org. */ /* @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2016-01-11.22; # UTC +scriptversion=2017-09-23.17; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ do fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -427,8 +435,8 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 diff --git a/support/ChangeLog b/support/ChangeLog index ac5468dc..848afde8 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,24 @@ +2017-12-20 Arnold D. Robbins <arnold@skeeve.com> + + * regex.h: Restore GLIBC's use of '__' in parameter names. They + have to be that way since public headers can't use identifiers that + users might define as macros. At least now I understand why + things are the way they are. + +2017-12-19 Paul Eggert <eggert@cs.ucla.edu> + + Small sync with gnulib based on mails in libc-alpha@sourceware.com. + + Use re_malloc etc. consistently. + + * regcomp.c (re_comp, analyze): Use re_malloc/re_free instead of + malloc/free. + * regexec.c (push_fail_stack): Use re_realloc instead of realloc. + + Other changes: + + * regex_internal.h: Synchronize on __libc_lock_define usage. + 2017-12-05 Arnold D. Robbins <arnold@skeeve.com> * regex.h: Yes define __USE_GNU. Needed for non-GLIBC systems. diff --git a/support/regcomp.c b/support/regcomp.c index 4fca1108..0d0cbf69 100644 --- a/support/regcomp.c +++ b/support/regcomp.c @@ -715,7 +715,7 @@ re_comp (const char *s) if (re_comp_buf.fastmap == NULL) { - re_comp_buf.fastmap = (char *) malloc (SBC_MAX); + re_comp_buf.fastmap = (char *) re_malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); @@ -1217,7 +1217,7 @@ analyze (regex_t *preg) break; if (i == preg->re_nsub) { - free (dfa->subexp_map); + re_free (dfa->subexp_map); dfa->subexp_map = NULL; } } diff --git a/support/regex.h b/support/regex.h index adddd9ee..a68bf6a6 100644 --- a/support/regex.h +++ b/support/regex.h @@ -470,7 +470,7 @@ typedef struct #ifdef __USE_GNU /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the `re_syntax_options' variable. */ -extern reg_syntax_t re_set_syntax (reg_syntax_t syntax); +extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global `re_syntax_options', into the buffer @@ -480,14 +480,14 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t syntax); Note that the translate table must either have been initialised by `regcomp', with a malloc'ed value, or set to NULL before calling `regfree'. */ -extern const char *re_compile_pattern (const char *pattern, size_t length, - struct re_pattern_buffer *buffer); +extern const char *re_compile_pattern (const char *__pattern, size_t __length, + struct re_pattern_buffer *__buffer); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ -extern int re_compile_fastmap (struct re_pattern_buffer *buffer); +extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); /* Search in the string STRING (with length LENGTH) for the pattern @@ -495,30 +495,30 @@ extern int re_compile_fastmap (struct re_pattern_buffer *buffer); characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ -extern int re_search (struct re_pattern_buffer *buffer, const char *c_string, - int length, int start, int range, - struct re_registers *regs); +extern int re_search (struct re_pattern_buffer *__buffer, const char *__string, + int __length, int __start, int __range, + struct re_registers *__regs); /* Like `re_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ -extern int re_search_2 (struct re_pattern_buffer *buffer, - const char *string1, int length1, - const char *string2, int length2, int start, - int range, struct re_registers *regs, int stop); +extern int re_search_2 (struct re_pattern_buffer *__buffer, + const char *__string1, int __length1, + const char *__string2, int __length2, int __start, + int __range, struct re_registers *__regs, int __stop); /* Like `re_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ -extern int re_match (struct re_pattern_buffer *buffer, const char *c_string, - int length, int start, struct re_registers *regs); +extern int re_match (struct re_pattern_buffer *__buffer, const char *__string, + int __length, int __start, struct re_registers *__regs); /* Relates to `re_match' as `re_search_2' relates to `re_search'. */ -extern int re_match_2 (struct re_pattern_buffer *buffer, - const char *string1, int length1, - const char *string2, int length2, int start, - struct re_registers *regs, int stop); +extern int re_match_2 (struct re_pattern_buffer *__buffer, + const char *__string1, int __length1, + const char *__string2, int __length2, int __start, + struct re_registers *__regs, int __stop); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and @@ -533,10 +533,10 @@ extern int re_match_2 (struct re_pattern_buffer *buffer, Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ -extern void re_set_registers (struct re_pattern_buffer *buffer, - struct re_registers *regs, - unsigned int num_regs, - regoff_t *starts, regoff_t *ends); +extern void re_set_registers (struct re_pattern_buffer *__buffer, + struct re_registers *__regs, + unsigned int __num_regs, + regoff_t *__starts, regoff_t *__ends); #endif /* Use GNU */ #if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC) @@ -569,19 +569,19 @@ extern int re_exec (const char *); #endif /* POSIX compatibility. */ -extern int regcomp (regex_t *__restrict preg, - const char *__restrict pattern, - int cflags); +extern int regcomp (regex_t *__restrict __preg, + const char *__restrict __pattern, + int __cflags); -extern int regexec (const regex_t *__restrict preg, - const char *__restrict c_string, size_t nmatch, - regmatch_t pmatch[__restrict_arr], - int eflags); +extern int regexec (const regex_t *__restrict __preg, + const char *__restrict __string, size_t __nmatch, + regmatch_t __pmatch[__restrict_arr], + int __eflags); -extern size_t regerror (int errcode, const regex_t *__restrict preg, - char *__restrict errbuf, size_t errbuf_size); +extern size_t regerror (int __errcode, const regex_t *__restrict __preg, + char *__restrict __errbuf, size_t __errbuf_size); -extern void regfree (regex_t *preg); +extern void regfree (regex_t *__preg); #ifdef __cplusplus diff --git a/support/regex_internal.h b/support/regex_internal.h index dbcf9a32..f97ecbe2 100644 --- a/support/regex_internal.h +++ b/support/regex_internal.h @@ -47,7 +47,6 @@ #if defined _LIBC # include <libc-lock.h> #else -# define __libc_lock_define(CLASS,NAME) # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) @@ -700,7 +699,7 @@ struct re_dfa_t #ifdef DEBUG char* re_str; #endif -#if defined _LIBC +#ifdef _LIBC __libc_lock_define (, lock) #endif }; diff --git a/support/regexec.c b/support/regexec.c index 05deab00..0587ad24 100644 --- a/support/regexec.c +++ b/support/regexec.c @@ -1327,8 +1327,8 @@ push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node, if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; - new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) - * fs->alloc * 2)); + new_array = re_realloc (fs->stack, struct re_fail_stack_ent_t, + fs->alloc * 2); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; |