]> git.eshelyaron.com Git - emacs.git/commit
Don’t include stdlib.h from conf_post.h
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 26 Dec 2024 23:44:34 +0000 (15:44 -0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 27 Dec 2024 15:45:19 +0000 (16:45 +0100)
commite8007f8bcec29bbac7b7fd3d848fa5aca3d40b36
tree218e1d9675919c92dcb1a2c50b99363535b00c95
parent31a8a2f132f1e3b24a0c50d9451c74fd10b2b5ee
Don’t include stdlib.h from conf_post.h

This is brittle, as evinced by the recent problem with lib/stdlib.c.
* src/conf_post.h: Move potential inclusion of stdlib.h and
redefinitions of malloc, free, realloc, aligned_alloc, and calloc
from here ...
* src/lisp.h: ... to here.  Do not redefine the symbols
if UNEXMACOS_C is defined.
* src/unexmacosx.c: Do not undef malloc, realloc, free.
(UNEXMACOS_C): New symbol, to prevent lisp.h from defining them.

(cherry picked from commit 577714e3fe722625236ce060f53b5d76f7933454)
src/conf_post.h
src/gmalloc.c
src/lisp.h
src/unexmacosx.c