Skip to content

sqlite_rtree_bulk_load.c: include <stdlib.h>#12665

Merged
rouault merged 1 commit intoOSGeo:masterfrom
schwehr:stdlib-not-in-math-h
Jun 27, 2025
Merged

sqlite_rtree_bulk_load.c: include <stdlib.h>#12665
rouault merged 1 commit intoOSGeo:masterfrom
schwehr:stdlib-not-in-math-h

Conversation

@schwehr
Copy link
Member

@schwehr schwehr commented Jun 27, 2025

<math.h> doesn't transitively include <stdlib.h> anymore in llvm near upstream head.

Caused by this commit:

llvm/llvm-project@584cc37

[libc++] Move std::abs into __math/abs.h (llvm/llvm-project#139586)

template <class = int> is also added to our implementations to avoid an ambiguity between the libc's version and our version when both are visible.

This avoids including <stdlib.h> in <math.h>.

`<math.h>` doesn't transitively include `<stdlib.h>` anymore in llvm
near upstream head.
@schwehr schwehr requested a review from rouault June 27, 2025 16:58
@rouault rouault merged commit 50bb079 into OSGeo:master Jun 27, 2025
32 of 36 checks passed
@schwehr schwehr deleted the stdlib-not-in-math-h branch June 27, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants