diff options
| author | Po Lu | 2022-02-13 00:48:55 +0000 |
|---|---|---|
| committer | Po Lu | 2022-02-13 00:50:50 +0000 |
| commit | d72e7c4fd41c0ab400d9eb748e3b4f8d545ea948 (patch) | |
| tree | 343270dfc0cda5712585890c469fefa9ab175638 | |
| parent | ad2d50d762b4399b5b6284b0903b5d92fb3fe64f (diff) | |
| download | emacs-d72e7c4fd41c0ab400d9eb748e3b4f8d545ea948.tar.gz emacs-d72e7c4fd41c0ab400d9eb748e3b4f8d545ea948.zip | |
Fix the Haiku port
* src/haiku_support.h [__cplusplus]: Define `specpdl_ref' type
on C++ since that code cannot include lisp.h.
| -rw-r--r-- | src/haiku_support.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/haiku_support.h b/src/haiku_support.h index f20b2e766c8..e6560f401ac 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h | |||
| @@ -348,6 +348,24 @@ struct haiku_menu_bar_state_event | |||
| 348 | #define BE_RECT_WIDTH(rect) (ceil (((rect).right - (rect).left) + 1)) | 348 | #define BE_RECT_WIDTH(rect) (ceil (((rect).right - (rect).left) + 1)) |
| 349 | #endif /* __cplusplus */ | 349 | #endif /* __cplusplus */ |
| 350 | 350 | ||
| 351 | /* C++ code cannot include lisp.h, but file dialogs need to be able | ||
| 352 | to bind to the specpdl and handle quitting correctly. */ | ||
| 353 | |||
| 354 | #ifdef __cplusplus | ||
| 355 | |||
| 356 | #if SIZE_MAX > 0xffffffff | ||
| 357 | #define WRAP_SPECPDL_REF 1 | ||
| 358 | #endif | ||
| 359 | #ifdef WRAP_SPECPDL_REF | ||
| 360 | typedef struct { ptrdiff_t bytes; } specpdl_ref; | ||
| 361 | #else | ||
| 362 | typedef ptrdiff_t specpdl_ref; | ||
| 363 | #endif | ||
| 364 | |||
| 365 | #else | ||
| 366 | #include "lisp.h" | ||
| 367 | #endif | ||
| 368 | |||
| 351 | #ifdef __cplusplus | 369 | #ifdef __cplusplus |
| 352 | extern "C" | 370 | extern "C" |
| 353 | { | 371 | { |