diff options
| author | Po Lu | 2025-02-10 12:04:27 +0800 |
|---|---|---|
| committer | Po Lu | 2025-02-10 12:04:27 +0800 |
| commit | 6e8bb757841d76e2df9757404dfafc5cb7777cb8 (patch) | |
| tree | fbd6442d28019b62de9e522b618ce5054266ff7e | |
| parent | ceef9025944fd3d51122f913ed9a74a259db55f7 (diff) | |
| download | emacs-6e8bb757841d76e2df9757404dfafc5cb7777cb8.tar.gz emacs-6e8bb757841d76e2df9757404dfafc5cb7777cb8.zip | |
Fix compilation on Haiku Nightly hrev58622
* configure.ac (BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER):
Define if BObjectList ownership over its contents is specified
as a template parameter.
* src/haiku_support.cc (class EmacsFontSelectionDialog)
[BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER]: Adjust
accordingly.
| -rw-r--r-- | configure.ac | 11 | ||||
| -rw-r--r-- | src/haiku_support.cc | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 33d04a5bdb9..089a18959e3 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -2953,6 +2953,17 @@ if test "${opsys}" = "haiku" && test "${with_be_app}" = "yes"; then | |||
| 2953 | [AC_MSG_ERROR([The Application Kit headers required for building | 2953 | [AC_MSG_ERROR([The Application Kit headers required for building |
| 2954 | with the Application Kit were not found or cannot be compiled. Either fix this, or | 2954 | with the Application Kit were not found or cannot be compiled. Either fix this, or |
| 2955 | re-configure with the option '--without-be-app'.])]) | 2955 | re-configure with the option '--without-be-app'.])]) |
| 2956 | AC_CACHE_CHECK([whether BObjectList accepts ownership as a template parameter], | ||
| 2957 | [emacs_cv_bobjectlist_ownership_is_template_parameter], | ||
| 2958 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
| 2959 | #include <support/ObjectList.h> | ||
| 2960 | #include <interface/StringItem.h> | ||
| 2961 | static BObjectList<BStringItem, true> test;]], [])], | ||
| 2962 | [emacs_cv_bobjectlist_ownership_is_template_parameter=yes], | ||
| 2963 | [emacs_cv_bobjectlist_ownership_is_template_parameter=no])]) | ||
| 2964 | AS_IF([test "x$emacs_cv_bobjectlist_ownership_is_template_parameter"], | ||
| 2965 | [AC_DEFINE([BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER], [1], | ||
| 2966 | [Define to 1 if BObjectList ownership is defined as a template parameter.])]) | ||
| 2956 | AC_LANG_POP([C++]) | 2967 | AC_LANG_POP([C++]) |
| 2957 | fi | 2968 | fi |
| 2958 | 2969 | ||
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index d83b5c145d6..bfa2cb51456 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc | |||
| @@ -2862,8 +2862,13 @@ class EmacsFontSelectionDialog : public BWindow | |||
| 2862 | BScrollView font_family_scroller; | 2862 | BScrollView font_family_scroller; |
| 2863 | BScrollView font_style_scroller; | 2863 | BScrollView font_style_scroller; |
| 2864 | TripleLayoutView style_view; | 2864 | TripleLayoutView style_view; |
| 2865 | #ifdef BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER | ||
| 2866 | BObjectList<BStringItem, true> all_families; | ||
| 2867 | BObjectList<BStringItem, true> all_styles; | ||
| 2868 | #else /* !BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER */ | ||
| 2865 | BObjectList<BStringItem> all_families; | 2869 | BObjectList<BStringItem> all_families; |
| 2866 | BObjectList<BStringItem> all_styles; | 2870 | BObjectList<BStringItem> all_styles; |
| 2871 | #endif /* !BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER */ | ||
| 2867 | BButton cancel_button, ok_button; | 2872 | BButton cancel_button, ok_button; |
| 2868 | BTextControl size_entry; | 2873 | BTextControl size_entry; |
| 2869 | port_id comm_port; | 2874 | port_id comm_port; |
| @@ -3126,8 +3131,13 @@ public: | |||
| 3126 | B_SUPPORTS_LAYOUT, false, true), | 3131 | B_SUPPORTS_LAYOUT, false, true), |
| 3127 | style_view (&font_style_scroller, &antialias_checkbox, | 3132 | style_view (&font_style_scroller, &antialias_checkbox, |
| 3128 | &preview_checkbox), | 3133 | &preview_checkbox), |
| 3134 | #ifdef BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER | ||
| 3135 | all_families (20), | ||
| 3136 | all_styles (20), | ||
| 3137 | #else /* !BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER */ | ||
| 3129 | all_families (20, true), | 3138 | all_families (20, true), |
| 3130 | all_styles (20, true), | 3139 | all_styles (20, true), |
| 3140 | #endif /* !BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER */ | ||
| 3131 | cancel_button ("Cancel", "Cancel", | 3141 | cancel_button ("Cancel", "Cancel", |
| 3132 | new BMessage (B_CANCEL)), | 3142 | new BMessage (B_CANCEL)), |
| 3133 | ok_button ("OK", "OK", new BMessage (B_OK)), | 3143 | ok_button ("OK", "OK", new BMessage (B_OK)), |