diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2021-05-07 13:47:29 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2021-05-07 13:47:29 +0300 |
commit | 110e88df64d96ec8d0b9a1eeea0d1d18d1de289f (patch) | |
tree | e1ef41a35fa85a3047ecda8100061a7af735ba93 | |
parent | ea33d6487ac96e175507406ed994bb9546a7f3ca (diff) | |
parent | aa6a71c05ac79553f88583264179054998037f90 (diff) | |
download | egawk-110e88df64d96ec8d0b9a1eeea0d1d18d1de289f.tar.gz egawk-110e88df64d96ec8d0b9a1eeea0d1d18d1de289f.tar.bz2 egawk-110e88df64d96ec8d0b9a1eeea0d1d18d1de289f.zip |
Merge branch 'master' into feature/bool
-rw-r--r-- | build-aux/ChangeLog | 4 | ||||
-rwxr-xr-x | build-aux/config.guess | 8 | ||||
-rwxr-xr-x | build-aux/config.sub | 10 | ||||
-rw-r--r-- | helpers/ChangeLog | 4 | ||||
-rwxr-xr-x | helpers/update-support.sh | 8 | ||||
-rw-r--r-- | pc/config.h | 6 | ||||
-rw-r--r-- | support/ChangeLog | 5 | ||||
-rw-r--r-- | support/cdefs.h | 30 | ||||
-rw-r--r-- | support/libc-config.h | 18 | ||||
-rw-r--r-- | support/malloc/dynarray-skeleton.c | 33 | ||||
-rw-r--r-- | support/regex_internal.h | 4 |
11 files changed, 78 insertions, 52 deletions
diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog index 4765fa26..80bab63f 100644 --- a/build-aux/ChangeLog +++ b/build-aux/ChangeLog @@ -1,3 +1,7 @@ +2021-05-07 Arnold D. Robbins <arnold@skeeve.com> + + * config.guess, config.sub: Updated from GNULIB. + 2021-05-05 Arnold D. Robbins <arnold@skeeve.com> * texinfo.tex: New file. Automake wants it. diff --git a/build-aux/config.guess b/build-aux/config.guess index 1972fda8..cc7a8107 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2021-01-25' +timestamp='2021-04-21' # 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 @@ -261,6 +261,10 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//') + echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE" + exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" @@ -949,7 +953,7 @@ EOF if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; - arc:Linux:*:* | arceb:Linux:*:*) + arc:Linux:*:* | arceb:Linux:*:* | arc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) diff --git a/build-aux/config.sub b/build-aux/config.sub index 7f7d0b05..7384e919 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2021-03-10' +timestamp='2021-04-30' # 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 @@ -1165,7 +1165,7 @@ case $cpu-$vendor in | alphapca5[67] | alpha64pca5[67] \ | am33_2.0 \ | amdgcn \ - | arc | arceb \ + | arc | arceb | arc64 \ | arm | arm[lb]e | arme[lb] | armv* \ | avr | avr32 \ | asmjs \ @@ -1204,9 +1204,13 @@ case $cpu-$vendor in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ @@ -1707,7 +1711,7 @@ case $os in | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | mirbsd* | netbsd* | dicos* | openedition* | ose* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ diff --git a/helpers/ChangeLog b/helpers/ChangeLog index b91339b1..4f448b99 100644 --- a/helpers/ChangeLog +++ b/helpers/ChangeLog @@ -1,3 +1,7 @@ +2021-05-07 Arnold D. Robbins <arnold@skeeve.com> + + * update-support.sh: Change to work from top level directory. + 2021-04-23 Arnold D. Robbins <arnold@skeeve.com> * update-support.sh: Update list of files to copy over. diff --git a/helpers/update-support.sh b/helpers/update-support.sh index cc2d24aa..06ed1020 100755 --- a/helpers/update-support.sh +++ b/helpers/update-support.sh @@ -27,14 +27,16 @@ regex.h regex_internal.c regex_internal.h verify.h -malloc/dynarray.h malloc/dynarray-skeleton.c +malloc/dynarray.h +malloc/dynarray_emplace_enlarge.c +malloc/dynarray_finalize.c malloc/dynarray_resize.c" for i in $FILE_LIST do - if [ -f $GL/$i ] && [ -f $i ] + if [ -f $GL/$i ] && [ -f support/$i ] then - cp $GL/$i $i + cp $GL/$i support/$i fi done diff --git a/pc/config.h b/pc/config.h index 6b9abfee..a31f3b87 100644 --- a/pc/config.h +++ b/pc/config.h @@ -464,7 +464,7 @@ #define PACKAGE_NAME "GNU Awk" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU Awk 5.1.1a" +#define PACKAGE_STRING "GNU Awk 5.1.1b" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gawk" @@ -473,7 +473,7 @@ #define PACKAGE_URL "http://www.gnu.org/software/gawk/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.1a" +#define PACKAGE_VERSION "5.1.1b" /* Define to 1 if *printf supports %a format */ #define PRINTF_HAS_A_FORMAT 1 @@ -534,7 +534,7 @@ /* Version number of package */ -#define VERSION "5.1.1a" +#define VERSION "5.1.1b" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE diff --git a/support/ChangeLog b/support/ChangeLog index 16c1ff3c..94f51917 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,8 @@ +2021-05-07 Arnold D. Robbins <arnold@skeeve.com> + + * cdefs.h, libc-config.h, malloc/dynarray-skeleton.c, + regex_internal.h: Update from GNULIB. + 2021-05-05 Arnold D. Robbins <arnold@skeeve.com> * CMakeLists.txt: Removed. diff --git a/support/cdefs.h b/support/cdefs.h index 6f12c79d..b883b256 100644 --- a/support/cdefs.h +++ b/support/cdefs.h @@ -259,10 +259,12 @@ # define __attribute_const__ /* Ignore */ #endif -#if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__ -# define __attribute_maybe_unused__ [[__maybe_unused__]] -#elif __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) +#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) # define __attribute_maybe_unused__ __attribute__ ((__unused__)) +/* Once the next version of the C standard comes out, we can + do something like the following here: + #elif defined __STDC_VERSION__ && 202???L <= __STDC_VERSION__ + # define __attribute_maybe_unused__ [[__maybe_unused__]] */ #else # define __attribute_maybe_unused__ /* Ignore */ #endif @@ -320,16 +322,18 @@ #endif /* The nonnull function attribute marks pointer parameters that - must not be NULL. */ -#ifndef __nonnull + must not be NULL. This has the name __nonnull in glibc, + and __attribute_nonnull__ in files shared with Gnulib to avoid + collision with a different __nonnull in DragonFlyBSD 5.9. */ +#ifndef __attribute_nonnull__ # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) -# define __nonnull(params) __attribute__ ((__nonnull__ params)) +# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) # else -# define __nonnull(params) +# define __attribute_nonnull__(params) # endif -#elif !defined __GLIBC__ -# undef __nonnull -# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params) +#endif +#ifndef __nonnull +# define __nonnull(params) __attribute_nonnull__ (params) #endif /* If fortification mode, we warn about unused results of certain @@ -485,9 +489,9 @@ [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] #endif -/* The #ifndef lets Gnulib avoid including these on non-glibc - platforms, where the includes typically do not exist. */ -#ifndef __WORDSIZE +/* Gnulib avoids including these, as they don't work on non-glibc or + older glibc platforms. */ +#ifndef __GNULIB_CDEFS # include <bits/wordsize.h> # include <bits/long-double.h> #endif diff --git a/support/libc-config.h b/support/libc-config.h index fcdafcb9..fabca2fa 100644 --- a/support/libc-config.h +++ b/support/libc-config.h @@ -33,9 +33,9 @@ #include <config.h> /* On glibc this includes <features.h> and <sys/cdefs.h> and #defines - _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it - includes <sys/cdefs.h> which defines __nonnull. Elsewhere it - is harmless. */ + _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 and + DragonFlyBSD 5.9 it includes <sys/cdefs.h> which defines __nonnull. + Elsewhere it is harmless. */ #include <errno.h> /* From glibc <errno.h>. */ @@ -71,7 +71,7 @@ # endif #endif -#ifndef __attribute_maybe_unused__ +#ifndef __attribute_nonnull__ /* <sys/cdefs.h> either does not exist, or is too old for Gnulib. Prepare to include <cdefs.h>, which is Gnulib's version of a more-recent glibc <sys/cdefs.h>. */ @@ -80,13 +80,9 @@ # ifndef _FEATURES_H # define _FEATURES_H 1 # endif -/* Define __WORDSIZE so that <cdefs.h> does not attempt to include - nonexistent files. Make it a syntax error, since Gnulib does not - use __WORDSIZE now, and if Gnulib uses it later the syntax error - will let us know that __WORDSIZE needs configuring. */ -# ifndef __WORDSIZE -# define __WORDSIZE %%% -# endif +/* Define __GNULIB_CDEFS so that <cdefs.h> does not attempt to include + nonexistent files. */ +# define __GNULIB_CDEFS /* Undef the macros unconditionally defined by our copy of glibc <sys/cdefs.h>, so that they do not clash with any system-defined versions. */ diff --git a/support/malloc/dynarray-skeleton.c b/support/malloc/dynarray-skeleton.c index 5b9f37bd..48210e32 100644 --- a/support/malloc/dynarray-skeleton.c +++ b/support/malloc/dynarray-skeleton.c @@ -192,7 +192,7 @@ DYNARRAY_NAME (free__array__) (struct DYNARRAY_STRUCT *list) /* Initialize a dynamic array object. This must be called before any use of the object. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static void DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) { @@ -202,7 +202,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) } /* Deallocate the dynamic array and its elements. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) { @@ -213,7 +213,7 @@ DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) } /* Return true if the dynamic array is in an error state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline bool DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) { @@ -222,7 +222,7 @@ DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) /* Mark the dynamic array as failed. All elements are deallocated as a side effect. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static void DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) { @@ -236,7 +236,7 @@ DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) /* Return the number of elements which have been added to the dynamic array. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline size_t DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) { @@ -245,7 +245,7 @@ DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) /* Return a pointer to the array element at INDEX. Terminate the process if INDEX is out of bounds. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) { @@ -257,7 +257,7 @@ DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) /* Return a pointer to the first array element, if any. For a zero-length array, the pointer can be NULL even though the dynamic array has not entered the failure state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) { @@ -267,7 +267,7 @@ DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) /* Return a pointer one element past the last array element. For a zero-length array, the pointer can be NULL even though the dynamic array has not entered the failure state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) { @@ -294,7 +294,7 @@ DYNARRAY_NAME (add__) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) /* Add ITEM at the end of the array, enlarging it by one element. Mark *LIST as failed if the dynamic array allocation size cannot be increased. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline void DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) { @@ -348,7 +348,8 @@ DYNARRAY_NAME (emplace__) (struct DYNARRAY_STRUCT *list) /* Allocate a place for a new element in *LIST and return a pointer to it. The pointer can be NULL if the dynamic array cannot be enlarged due to a memory allocation failure. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1)) static /* Avoid inlining with the larger initialization code. */ #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)) @@ -372,7 +373,7 @@ DYNARRAY_NAME (emplace) (struct DYNARRAY_STRUCT *list) existing size, new elements are added (which can be initialized). Otherwise, the list is truncated, and elements are freed. Return false on memory allocation failure (and mark *LIST as failed). */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static bool DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) { @@ -417,7 +418,7 @@ DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) } /* Remove the last element of LIST if it is present. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) { @@ -434,7 +435,7 @@ DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) /* Remove all elements from the list. The elements are freed, but the list itself is not. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) { @@ -452,7 +453,8 @@ DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) stored in *RESULT if LIST refers to an empty list. On success, the pointer in *RESULT is heap-allocated and must be deallocated using free. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1, 2)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1, 2)) static bool DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, DYNARRAY_FINAL_TYPE *result) @@ -483,7 +485,8 @@ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, have a sentinel at the end). If LENGTHP is not NULL, the array length is written to *LENGTHP. *LIST is re-initialized and can be reused. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1)) static DYNARRAY_ELEMENT * DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp) { diff --git a/support/regex_internal.h b/support/regex_internal.h index 4b0a3efb..1245e782 100644 --- a/support/regex_internal.h +++ b/support/regex_internal.h @@ -53,14 +53,14 @@ # define lock_fini(lock) ((void) 0) # define lock_lock(lock) __libc_lock_lock (lock) # define lock_unlock(lock) __libc_lock_unlock (lock) -#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO +#elif defined GNULIB_LOCK && !defined GNULIB_REGEX_SINGLE_THREAD # include "glthread/lock.h" # define lock_define(name) gl_lock_define (, name) # define lock_init(lock) glthread_lock_init (&(lock)) # define lock_fini(lock) glthread_lock_destroy (&(lock)) # define lock_lock(lock) glthread_lock_lock (&(lock)) # define lock_unlock(lock) glthread_lock_unlock (&(lock)) -#elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO +#elif defined GNULIB_PTHREAD && !defined GNULIB_REGEX_SINGLE_THREAD # include <pthread.h> # define lock_define(name) pthread_mutex_t name; # define lock_init(lock) pthread_mutex_init (&(lock), 0) |