aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib.in.h
diff options
context:
space:
mode:
authorPaul Eggert2025-05-07 23:57:18 -0700
committerPaul Eggert2025-05-08 00:16:46 -0700
commitc9c6abfa81c58b4a62f4fa5fcaad94b219f5d706 (patch)
treed018390e6532a07121cc64e4ce7c80c7618f9876 /lib/stdlib.in.h
parent322ed637b4c2fe826d41c5af3800b2f2e381bb0f (diff)
downloademacs-c9c6abfa81c58b4a62f4fa5fcaad94b219f5d706.tar.gz
emacs-c9c6abfa81c58b4a62f4fa5fcaad94b219f5d706.zip
Update from Gnulib by running admin/merge-gnulib
The following changes were made by hand, so that admin/merge-gnulib could succeed instead of failing because the diff didn’t match. * admin/gnulib-patches/lib/getloadavg.c.diff: Remove, as it is no longer needed now that recent Gnulib has been merged. * admin/merge-gnulib (GNULIB_TOOL_FLAGS): Remove the --local-dir="$src"admin/gnulib-patches option, as it is no longer needed either.
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r--lib/stdlib.in.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index dbe8ebc8502..1342db48772 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -168,6 +168,18 @@ _GL_INLINE_HEADER_BEGIN
168# endif 168# endif
169#endif 169#endif
170 170
171/* _GL_ATTRIBUTE_NONNULL_IF_NONZERO (NP, NI) declares that the argument NP
172 (a pointer) must not be NULL if the argument NI (an integer) is != 0. */
173/* Applies to: functions. */
174#ifndef _GL_ATTRIBUTE_NONNULL_IF_NONZERO
175# if __GNUC__ >= 15 && !defined __clang__
176# define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni) \
177 __attribute__ ((__nonnull_if_nonzero__ (np, ni)))
178# else
179# define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni)
180# endif
181#endif
182
171/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. 183/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
172 */ 184 */
173#ifndef _GL_ATTRIBUTE_NOTHROW 185#ifndef _GL_ATTRIBUTE_NOTHROW
@@ -223,6 +235,18 @@ _GL_INLINE_HEADER_BEGIN
223#endif 235#endif
224 236
225 237
238/* Declarations for ISO C N3322. */
239#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
240_GL_EXTERN_C void *bsearch (const void *__key,
241 const void *__base, size_t __nmemb, size_t __size,
242 int (*__compare) (const void *, const void *))
243 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
244_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
245 int (*__compare) (const void *, const void *))
246 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2) _GL_ARG_NONNULL ((4));
247#endif
248
249
226#if @GNULIB__EXIT@ 250#if @GNULIB__EXIT@
227/* Terminate the current process with the given return code, without running 251/* Terminate the current process with the given return code, without running
228 the 'atexit' handlers. */ 252 the 'atexit' handlers. */
@@ -1182,7 +1206,8 @@ typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *);
1182_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, 1206_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
1183 _gl_qsort_r_compar_fn compare, 1207 _gl_qsort_r_compar_fn compare,
1184 void *arg), 1208 void *arg),
1185 _GL_ARG_NONNULL ((1, 4))); 1209 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
1210 _GL_ARG_NONNULL ((4)));
1186_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, 1211_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
1187 _gl_qsort_r_compar_fn compare, 1212 _gl_qsort_r_compar_fn compare,
1188 void *arg)); 1213 void *arg));
@@ -1191,7 +1216,8 @@ _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
1191_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, 1216_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
1192 _gl_qsort_r_compar_fn compare, 1217 _gl_qsort_r_compar_fn compare,
1193 void *arg), 1218 void *arg),
1194 _GL_ARG_NONNULL ((1, 4))); 1219 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
1220 _GL_ARG_NONNULL ((4)));
1195# endif 1221# endif
1196_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, 1222_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
1197 _gl_qsort_r_compar_fn compare, 1223 _gl_qsort_r_compar_fn compare,