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