Landing: d9e3a6cfe702

Project / Subsystem

gcc / libgm2

Date

2026-09-10

Author

Iain Sandoe

Commit

d9e3a6cfe7026975ce3689a982ccb0eb0b30aaff

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libgm2
patch_id
—
commit_hash
d9e3a6cfe7026975ce3689a982ccb0eb0b30aaff
source_type
github
headline
libgm2: Use stdlib.h for malloc/free declarations for portability.
tldr
libgm2 now includes malloc and free declarations from stdlib.h instead of malloc.h.
author
Iain Sandoe
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • libgm2
  • • portability
  • • stdlib
discussion_id_link
—
bugzilla_pr
—
date
2026-09-10T00:00:00.000Z

This commit updates libgm2’s source files to include declarations for malloc and free from the standard C library header stdlib.h (or cstdlib in C++). Previously, these functions were declared using malloc.h, which is not part of the C standard and can lead to portability issues.

By using stdlib.h, the code becomes more compliant with C standards and more likely to compile correctly across different platforms and C library implementations.