]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
reallocarray: Declare under _DEFAULT_SOURCE
authorFlorian Weimer <fweimer@redhat.com>
Thu, 30 Aug 2018 12:14:53 +0000 (14:14 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 30 Aug 2018 12:14:53 +0000 (14:14 +0200)
Initially, this function was restricted to _GNU_SOURCE, but experience
shows that compatibility with existing build systems is improved if we
declare it under _DEFAULT_SOURCE as well.

ChangeLog
NEWS
stdlib/stdlib.h

index 1719c9d556d85ff062f5aa256c7fd37b9552b691..b3689a68c910676e689330e273ac3018b17cf1a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-08-30  Florian Weimer  <fweimer@redhat.com>
+
+       * stdlib/stdlib.h (reallocarray): Make available under __USE_MISC.
+
 2018-08-30  Stefan Liebler  <stli@linux.ibm.com>
 
        * stdlib/test-bz22786.c (do_test): Return EXIT_UNSUPPORTED
diff --git a/NEWS b/NEWS
index 639fb56c9f080cda5f185310fc083367e678fdb4..325157c0da2a07b4eee7d3fcdee59058f19a7746 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Major new features:
 
 * Optimized generic sinf, cosf, sincosf and tanf.
 
+* The reallocarray function is now declared under _DEFAULT_SOURCE, not just
+  for _GNU_SOURCE, to match BSD environments.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The glibc.tune tunable namespace has been renamed to glibc.cpu and the
index 8e23e935576cb3b84530badd6bb068d599656b62..870e02d904dcdf47deb5e8ed44ca46261f5a0a41 100644 (file)
@@ -549,7 +549,7 @@ extern void *calloc (size_t __nmemb, size_t __size)
 extern void *realloc (void *__ptr, size_t __size)
      __THROW __attribute_warn_unused_result__;
 
-#ifdef __USE_GNU
+#ifdef __USE_MISC
 /* Re-allocate the previously allocated block in PTR, making the new
    block large enough for NMEMB elements of SIZE bytes each.  */
 /* __attribute_malloc__ is not used, because if reallocarray returns