Re: [hackers] [libgrapheme][PATCH] Add reallocarray implementation

From: Laslo Hunhold <dev_AT_frign.de>
Date: Sun, 31 Jul 2022 11:50:09 +0200

On Sat, 30 Jul 2022 14:29:05 -0700
robert <robertrussell.72001_AT_gmail.com> wrote:

Dear Robert,

> reallocarray is nonstandard and glibc declares it only when
> _GNU_SOURCE is defined. Without this patch or _GNU_SOURCE defined, I
> get a seg fault from reallocarray being implicitly declared with the
> wrong signature.

thanks for your patch! I applied it with a few modifications. As a
matter of fact, glibc exports reallocarray() with _DEFAULT_SOURCE since
version 2.29 (from January 2019), however, you are still totally
correct that using this function reduces portability.

With best regards

Laslo
Received on Sun Jul 31 2022 - 11:50:09 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 31 2022 - 12:00:38 CEST