logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/

reallocarray.h (456B)


  1. // utils-std: Collection of commonly available Unix tools
  2. // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. // SPDX-License-Identifier: 0BSD
  4. #ifndef _BSD_SOURCE
  5. # if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 202405L
  6. # error reallocarray needs: define _POSIX_C_SOURCE 202405L or define _BSD_SOURCE
  7. # endif
  8. #endif
  9. #include <stdlib.h> // reallocarray
  10. void *utils_reallocarray(void *ptr, size_t m, size_t n);