wok-current annotate texinfo/stuff/texinfo_glibc2.34.patch @ rev 25788

Mass update to fix build with gcc10 and up others packages
author Stanislas Leduc <shann@slitaz.org>
date Tue Sep 30 07:43:04 2025 +0000 (3 weeks ago)
parents
children
rev   line source
shann@25788 1
shann@25788 2 Patch by Vitezslav Crhonek <vcrhonek@redhat.com>
shann@25788 3 Source: https://src.fedoraproject.org/rpms/texinfo/c/9b2cca4817fa4bd8d520fed05e9560fc7183dcdf?branch=rawhide
shann@25788 4
shann@25788 5 diff -up texinfo-6.8/gnulib/lib/cdefs.h.orig texinfo-6.8/gnulib/lib/cdefs.h
shann@25788 6 --- texinfo-6.8/gnulib/lib/cdefs.h.orig 2021-03-11 19:57:53.000000000 +0100
shann@25788 7 +++ texinfo-6.8/gnulib/lib/cdefs.h 2021-07-19 12:26:46.985176475 +0200
shann@25788 8 @@ -321,15 +321,15 @@
shann@25788 9
shann@25788 10 /* The nonnull function attribute marks pointer parameters that
shann@25788 11 must not be NULL. */
shann@25788 12 -#ifndef __attribute_nonnull__
shann@25788 13 +#ifndef __nonnull
shann@25788 14 # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
shann@25788 15 -# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
shann@25788 16 +# define __nonnull(params) __attribute__ ((__nonnull__ params))
shann@25788 17 # else
shann@25788 18 -# define __attribute_nonnull__(params)
shann@25788 19 +# define __nonnull(params)
shann@25788 20 # endif
shann@25788 21 -#endif
shann@25788 22 -#ifndef __nonnull
shann@25788 23 -# define __nonnull(params) __attribute_nonnull__ (params)
shann@25788 24 +#elif !defined __GLIBC__
shann@25788 25 +# undef __nonnull
shann@25788 26 +# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params)
shann@25788 27 #endif
shann@25788 28
shann@25788 29 /* If fortification mode, we warn about unused results of certain
shann@25788 30 diff -up texinfo-6.8/gnulib/lib/libc-config.h.orig texinfo-6.8/gnulib/lib/libc-config.h
shann@25788 31 --- texinfo-6.8/gnulib/lib/libc-config.h.orig 2021-03-11 19:57:54.000000000 +0100
shann@25788 32 +++ texinfo-6.8/gnulib/lib/libc-config.h 2021-07-19 12:27:58.810590975 +0200
shann@25788 33 @@ -33,9 +33,9 @@
shann@25788 34 #include <config.h>
shann@25788 35
shann@25788 36 /* On glibc this includes <features.h> and <sys/cdefs.h> and #defines
shann@25788 37 - _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 and
shann@25788 38 - DragonFlyBSD 5.9 it includes <sys/cdefs.h> which defines __nonnull.
shann@25788 39 - Elsewhere it is harmless. */
shann@25788 40 + _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it
shann@25788 41 + includes <sys/cdefs.h> which defines __nonnull. Elsewhere it
shann@25788 42 + is harmless. */
shann@25788 43 #include <errno.h>
shann@25788 44
shann@25788 45 /* From glibc <errno.h>. */
shann@25788 46 diff -up texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c.orig texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c
shann@25788 47 --- texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c.orig 2021-03-11 19:57:54.000000000 +0100
shann@25788 48 +++ texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c 2021-07-19 12:24:46.878419397 +0200
shann@25788 49 @@ -192,7 +192,7 @@ DYNARRAY_NAME (free__array__) (struct DY
shann@25788 50
shann@25788 51 /* Initialize a dynamic array object. This must be called before any
shann@25788 52 use of the object. */
shann@25788 53 -__attribute_nonnull__ ((1))
shann@25788 54 +__nonnull ((1))
shann@25788 55 static void
shann@25788 56 DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list)
shann@25788 57 {
shann@25788 58 @@ -202,7 +202,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_ST
shann@25788 59 }
shann@25788 60
shann@25788 61 /* Deallocate the dynamic array and its elements. */
shann@25788 62 -__attribute_maybe_unused__ __attribute_nonnull__ ((1))
shann@25788 63 +__attribute_maybe_unused__ __nonnull ((1))
shann@25788 64 static void
shann@25788 65 DYNARRAY_FREE (struct DYNARRAY_STRUCT *list)
shann@25788 66 {
shann@25788 67 @@ -213,7 +213,7 @@ DYNARRAY_FREE (struct DYNARRAY_STRUCT *l
shann@25788 68 }
shann@25788 69
shann@25788 70 /* Return true if the dynamic array is in an error state. */
shann@25788 71 -__attribute_nonnull__ ((1))
shann@25788 72 +__nonnull ((1))
shann@25788 73 static inline bool
shann@25788 74 DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list)
shann@25788 75 {
shann@25788 76 @@ -222,7 +222,7 @@ DYNARRAY_NAME (has_failed) (const struct
shann@25788 77
shann@25788 78 /* Mark the dynamic array as failed. All elements are deallocated as
shann@25788 79 a side effect. */
shann@25788 80 -__attribute_nonnull__ ((1))
shann@25788 81 +__nonnull ((1))
shann@25788 82 static void
shann@25788 83 DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list)
shann@25788 84 {
shann@25788 85 @@ -236,7 +236,7 @@ DYNARRAY_NAME (mark_failed) (struct DYNA
shann@25788 86
shann@25788 87 /* Return the number of elements which have been added to the dynamic
shann@25788 88 array. */
shann@25788 89 -__attribute_nonnull__ ((1))
shann@25788 90 +__nonnull ((1))
shann@25788 91 static inline size_t
shann@25788 92 DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list)
shann@25788 93 {
shann@25788 94 @@ -245,7 +245,7 @@ DYNARRAY_NAME (size) (const struct DYNAR
shann@25788 95
shann@25788 96 /* Return a pointer to the array element at INDEX. Terminate the
shann@25788 97 process if INDEX is out of bounds. */
shann@25788 98 -__attribute_nonnull__ ((1))
shann@25788 99 +__nonnull ((1))
shann@25788 100 static inline DYNARRAY_ELEMENT *
shann@25788 101 DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index)
shann@25788 102 {
shann@25788 103 @@ -257,7 +257,7 @@ DYNARRAY_NAME (at) (struct DYNARRAY_STRU
shann@25788 104 /* Return a pointer to the first array element, if any. For a
shann@25788 105 zero-length array, the pointer can be NULL even though the dynamic
shann@25788 106 array has not entered the failure state. */
shann@25788 107 -__attribute_nonnull__ ((1))
shann@25788 108 +__nonnull ((1))
shann@25788 109 static inline DYNARRAY_ELEMENT *
shann@25788 110 DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list)
shann@25788 111 {
shann@25788 112 @@ -267,7 +267,7 @@ DYNARRAY_NAME (begin) (struct DYNARRAY_S
shann@25788 113 /* Return a pointer one element past the last array element. For a
shann@25788 114 zero-length array, the pointer can be NULL even though the dynamic
shann@25788 115 array has not entered the failure state. */
shann@25788 116 -__attribute_nonnull__ ((1))
shann@25788 117 +__nonnull ((1))
shann@25788 118 static inline DYNARRAY_ELEMENT *
shann@25788 119 DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list)
shann@25788 120 {
shann@25788 121 @@ -294,7 +294,7 @@ DYNARRAY_NAME (add__) (struct DYNARRAY_S
shann@25788 122 /* Add ITEM at the end of the array, enlarging it by one element.
shann@25788 123 Mark *LIST as failed if the dynamic array allocation size cannot be
shann@25788 124 increased. */
shann@25788 125 -__attribute_nonnull__ ((1))
shann@25788 126 +__nonnull ((1))
shann@25788 127 static inline void
shann@25788 128 DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item)
shann@25788 129 {
shann@25788 130 @@ -348,8 +348,7 @@ DYNARRAY_NAME (emplace__) (struct DYNARR
shann@25788 131 /* Allocate a place for a new element in *LIST and return a pointer to
shann@25788 132 it. The pointer can be NULL if the dynamic array cannot be
shann@25788 133 enlarged due to a memory allocation failure. */
shann@25788 134 -__attribute_maybe_unused__ __attribute_warn_unused_result__
shann@25788 135 -__attribute_nonnull__ ((1))
shann@25788 136 +__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1))
shann@25788 137 static
shann@25788 138 /* Avoid inlining with the larger initialization code. */
shann@25788 139 #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE))
shann@25788 140 @@ -373,7 +372,7 @@ DYNARRAY_NAME (emplace) (struct DYNARRAY
shann@25788 141 existing size, new elements are added (which can be initialized).
shann@25788 142 Otherwise, the list is truncated, and elements are freed. Return
shann@25788 143 false on memory allocation failure (and mark *LIST as failed). */
shann@25788 144 -__attribute_maybe_unused__ __attribute_nonnull__ ((1))
shann@25788 145 +__attribute_maybe_unused__ __nonnull ((1))
shann@25788 146 static bool
shann@25788 147 DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size)
shann@25788 148 {
shann@25788 149 @@ -418,7 +417,7 @@ DYNARRAY_NAME (resize) (struct DYNARRAY_
shann@25788 150 }
shann@25788 151
shann@25788 152 /* Remove the last element of LIST if it is present. */
shann@25788 153 -__attribute_maybe_unused__ __attribute_nonnull__ ((1))
shann@25788 154 +__attribute_maybe_unused__ __nonnull ((1))
shann@25788 155 static void
shann@25788 156 DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list)
shann@25788 157 {
shann@25788 158 @@ -435,7 +434,7 @@ DYNARRAY_NAME (remove_last) (struct DYNA
shann@25788 159
shann@25788 160 /* Remove all elements from the list. The elements are freed, but the
shann@25788 161 list itself is not. */
shann@25788 162 -__attribute_maybe_unused__ __attribute_nonnull__ ((1))
shann@25788 163 +__attribute_maybe_unused__ __nonnull ((1))
shann@25788 164 static void
shann@25788 165 DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list)
shann@25788 166 {
shann@25788 167 @@ -453,8 +452,7 @@ DYNARRAY_NAME (clear) (struct DYNARRAY_S
shann@25788 168 stored in *RESULT if LIST refers to an empty list. On success, the
shann@25788 169 pointer in *RESULT is heap-allocated and must be deallocated using
shann@25788 170 free. */
shann@25788 171 -__attribute_maybe_unused__ __attribute_warn_unused_result__
shann@25788 172 -__attribute_nonnull__ ((1, 2))
shann@25788 173 +__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1, 2))
shann@25788 174 static bool
shann@25788 175 DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list,
shann@25788 176 DYNARRAY_FINAL_TYPE *result)
shann@25788 177 @@ -485,8 +483,7 @@ DYNARRAY_NAME (finalize) (struct DYNARRA
shann@25788 178 have a sentinel at the end). If LENGTHP is not NULL, the array
shann@25788 179 length is written to *LENGTHP. *LIST is re-initialized and can be
shann@25788 180 reused. */
shann@25788 181 -__attribute_maybe_unused__ __attribute_warn_unused_result__
shann@25788 182 -__attribute_nonnull__ ((1))
shann@25788 183 +__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1))
shann@25788 184 static DYNARRAY_ELEMENT *
shann@25788 185 DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp)
shann@25788 186 {
shann@25788 187