From c3f7aa7252ad9adb51cef1e35f566883ef953aad Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 27 Jul 2015 20:31:20 +0200 Subject: added full Haiku OS support (non x86_gcc2) * Haiku can be handled like UNIX in most respects since it is POSIX compliant, has a UNIX-like terminal emulator and uses ncurses. * still the Glib platform macro is G_OS_HAIKU instead of G_OS_UNIX, so the preprocessor conditionals had to be adapted. * the only functional difference between a Haiku and UNIX build is the default SCITECOCONFIG path. We use the config path returned by Glib instead of $HOME, so .teco_ini will be in ~/config/settings on Haiku. Other UNIX ports appear to use the same conventions. * Some Haiku-specific restrictions still apply: * Haiku's terminal is xterm-compatible, but only supports 8 colors. Therefore only the terminal.tes color scheme can be used and the terminal must be set up to "Use bright instead of bold text". * The terminal has artifacts. This appears to be a Haiku bug and affects other curses applications as well. * GTK is yet unsupported on Haiku, so there may never be a GUI port (unless someone writes a QT GUI for SciTECO). * SciTECO cannot be built with the legacy gcc2 used for BeOS compatibility on Haiku. This would require too many changes for an obsolete platform. BeOS and the x86_gcc2 platform of Haiku will therefore never be supported. The PPC and ARM platforms of Haiku should work but are untested. * a HaikuPorts recipe will be provided for the next regular SciTECO release. This should hopefully allow installation via HaikuDepot. --- src/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 951e5b3..1f89156 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -88,7 +88,7 @@ static gpointer g_realloc_exception(gpointer mem, gsize n_bytes); static void sigint_handler(int signal); } -#ifdef G_OS_UNIX +#if defined(G_OS_UNIX) || defined(G_OS_HAIKU) void interrupt(void) @@ -102,7 +102,7 @@ interrupt(void) sigint_occurred = TRUE; } -#else +#else /* !G_OS_UNIX && !G_OS_HAIKU */ void interrupt(void) @@ -143,6 +143,12 @@ get_default_config_path(const gchar *program) #elif defined(G_OS_UNIX) +/* + * NOTE: We explicitly do not handle + * Haiku like UNIX here, since it appears to + * be uncommon on Haiku to clutter the HOME directory + * with config files. + */ static inline gchar * get_default_config_path(const gchar *program) { -- cgit v1.2.3