1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-25 14:01:33 -08:00

Fix the Haiku port

* src/haiku_support.h [__cplusplus]: Define `specpdl_ref' type
on C++ since that code cannot include lisp.h.
This commit is contained in:
Po Lu 2022-02-13 00:48:55 +00:00
parent ad2d50d762
commit d72e7c4fd4

View file

@ -348,6 +348,24 @@ struct haiku_menu_bar_state_event
#define BE_RECT_WIDTH(rect) (ceil (((rect).right - (rect).left) + 1))
#endif /* __cplusplus */
/* C++ code cannot include lisp.h, but file dialogs need to be able
to bind to the specpdl and handle quitting correctly. */
#ifdef __cplusplus
#if SIZE_MAX > 0xffffffff
#define WRAP_SPECPDL_REF 1
#endif
#ifdef WRAP_SPECPDL_REF
typedef struct { ptrdiff_t bytes; } specpdl_ref;
#else
typedef ptrdiff_t specpdl_ref;
#endif
#else
#include "lisp.h"
#endif
#ifdef __cplusplus
extern "C"
{