mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 09:40:05 +02:00
495 lines
18 KiB
Diff
495 lines
18 KiB
Diff
diff -urN glib-2.19.2/configure.in glib-2.19.2-haiku/configure.in
|
|
--- glib-2.19.2/configure.in 2008-12-18 07:13:29.000000000 -0800
|
|
+++ glib-2.19.2-haiku/configure.in 2008-12-18 07:36:31.000000000 -0800
|
|
@@ -112,6 +112,17 @@
|
|
esac
|
|
AC_MSG_RESULT([$glib_native_beos])
|
|
|
|
+AC_MSG_CHECKING([for Haiku])
|
|
+case $host in
|
|
+ *-*-haiku*)
|
|
+ glib_native_haiku="yes"
|
|
+ ;;
|
|
+ *)
|
|
+ glib_native_haiku="no"
|
|
+ ;;
|
|
+esac
|
|
+AC_MSG_RESULT([$glib_native_haiku])
|
|
+
|
|
dnl
|
|
|
|
AC_MSG_CHECKING([for Win32])
|
|
@@ -358,7 +369,7 @@
|
|
AC_PATH_PROG(PERL_PATH, [$PERL])
|
|
fi
|
|
if test "x$PERL_PATH" = x ; then
|
|
- PERL_PATH="/usr/bin/env perl"
|
|
+ PERL_PATH="/bin/env perl"
|
|
fi
|
|
AC_SUBST(PERL_PATH)
|
|
|
|
@@ -3277,11 +3288,18 @@
|
|
*-*-beos*)
|
|
glib_os="#define G_OS_BEOS"
|
|
;;
|
|
+ *-*-haiku*)
|
|
+ glib_os="#define G_OS_HAIKU
|
|
+#define G_OS_UNIX"
|
|
+ ;;
|
|
*-*-cygwin*)
|
|
glib_os="#define G_OS_UNIX
|
|
#define G_PLATFORM_WIN32
|
|
#define G_WITH_CYGWIN"
|
|
;;
|
|
+ *-*-haiku*)
|
|
+ glib_os="#define G_OS_HAIKU"
|
|
+ ;;
|
|
*-*-mingw*)
|
|
glib_os="#define G_OS_WIN32
|
|
#define G_PLATFORM_WIN32"
|
|
diff -urN glib-2.19.2/docs/reference/glib/glib-overrides.txt glib-2.19.2-haiku/docs/reference/glib/glib-overrides.txt
|
|
--- glib-2.19.2/docs/reference/glib/glib-overrides.txt 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/glib-overrides.txt 2008-12-18 07:35:30.000000000 -0800
|
|
@@ -215,6 +215,11 @@
|
|
#define G_OS_BEOS
|
|
</MACRO>
|
|
|
|
+<MACRO>
|
|
+<NAME>G_OS_HAIKU</NAME>
|
|
+#define G_OS_HAIKU
|
|
+</MACRO>
|
|
+
|
|
# g_ascii_isxxx
|
|
|
|
<FUNCTION>
|
|
diff -urN glib-2.19.2/docs/reference/glib/glib-sections.txt glib-2.19.2-haiku/docs/reference/glib/glib-sections.txt
|
|
--- glib-2.19.2/docs/reference/glib/glib-sections.txt 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/glib-sections.txt 2008-12-18 07:36:44.000000000 -0800
|
|
@@ -125,7 +125,9 @@
|
|
<SUBSECTION>
|
|
G_OS_WIN32
|
|
G_OS_BEOS
|
|
+G_OS_HAIKU
|
|
G_OS_UNIX
|
|
+G_OS_HAIKU
|
|
|
|
<SUBSECTION>
|
|
G_DIR_SEPARATOR
|
|
diff -urN glib-2.19.2/docs/reference/glib/html/glib-Standard-Macros.html glib-2.19.2-haiku/docs/reference/glib/html/glib-Standard-Macros.html
|
|
--- glib-2.19.2/docs/reference/glib/html/glib-Standard-Macros.html 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/html/glib-Standard-Macros.html 2008-12-18 07:35:30.000000000 -0800
|
|
@@ -61,6 +61,7 @@
|
|
|
|
#define <a class="link" href="glib-Standard-Macros.html#G-OS-WIN32--CAPS" title="G_OS_WIN32">G_OS_WIN32</a>
|
|
#define <a class="link" href="glib-Standard-Macros.html#G-OS-BEOS--CAPS" title="G_OS_BEOS">G_OS_BEOS</a>
|
|
+#define <a class="link" href="glib-Standard-Macros.html#G-OS-HAIKU--CAPS" title="G_OS_HAIKU">G_OS_HAIKU</a>
|
|
#define <a class="link" href="glib-Standard-Macros.html#G-OS-UNIX--CAPS" title="G_OS_UNIX">G_OS_UNIX</a>
|
|
|
|
#define <a class="link" href="glib-Standard-Macros.html#G-DIR-SEPARATOR--CAPS" title="G_DIR_SEPARATOR">G_DIR_SEPARATOR</a>
|
|
@@ -116,6 +117,15 @@
|
|
BeOS-specific code in "#ifdef G_OS_BEOS".
|
|
</p>
|
|
</div>
|
|
+<div class="refsect2" lang="en">
|
|
+<a name="G-OS-HAIKU--CAPS"></a><h3>G_OS_HAIKU</h3>
|
|
+<pre class="programlisting">#define G_OS_HAIKU
|
|
+</pre>
|
|
+<p>
|
|
+This macro is defined only on Haiku. So you can bracket
|
|
+Haiku-specific code in "#ifdef G_OS_HAIKU".
|
|
+</p>
|
|
+</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="G-OS-UNIX--CAPS"></a><h3>G_OS_UNIX</h3>
|
|
diff -urN glib-2.19.2/docs/reference/glib/html/glib.devhelp glib-2.19.2-haiku/docs/reference/glib/html/glib.devhelp
|
|
--- glib-2.19.2/docs/reference/glib/html/glib.devhelp 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/html/glib.devhelp 2008-12-18 07:35:30.000000000 -0800
|
|
@@ -190,6 +190,7 @@
|
|
<function name="G_MAXDOUBLE" link="glib-Limits-of-Basic-Types.html#G-MAXDOUBLE--CAPS"/>
|
|
<function name="G_OS_WIN32" link="glib-Standard-Macros.html#G-OS-WIN32--CAPS"/>
|
|
<function name="G_OS_BEOS" link="glib-Standard-Macros.html#G-OS-BEOS--CAPS"/>
|
|
+ <function name="G_OS_HAIKU" link="glib-Standard-Macros.html#G-OS-HAIKU--CAPS"/>
|
|
<function name="G_OS_UNIX" link="glib-Standard-Macros.html#G-OS-UNIX--CAPS"/>
|
|
<function name="G_DIR_SEPARATOR" link="glib-Standard-Macros.html#G-DIR-SEPARATOR--CAPS"/>
|
|
<function name="G_DIR_SEPARATOR_S" link="glib-Standard-Macros.html#G-DIR-SEPARATOR-S--CAPS"/>
|
|
diff -urN glib-2.19.2/docs/reference/glib/html/glib.devhelp2 glib-2.19.2-haiku/docs/reference/glib/html/glib.devhelp2
|
|
--- glib-2.19.2/docs/reference/glib/html/glib.devhelp2 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/html/glib.devhelp2 2008-12-18 07:35:30.000000000 -0800
|
|
@@ -190,6 +190,7 @@
|
|
<keyword type="macro" name="G_MAXDOUBLE" link="glib-Limits-of-Basic-Types.html#G-MAXDOUBLE--CAPS"/>
|
|
<keyword type="macro" name="G_OS_WIN32" link="glib-Standard-Macros.html#G-OS-WIN32--CAPS"/>
|
|
<keyword type="macro" name="G_OS_BEOS" link="glib-Standard-Macros.html#G-OS-BEOS--CAPS"/>
|
|
+ <keyword type="macro" name="G_OS_HAIKU" link="glib-Standard-Macros.html#G-OS-HAIKU--CAPS"/>
|
|
<keyword type="macro" name="G_OS_UNIX" link="glib-Standard-Macros.html#G-OS-UNIX--CAPS"/>
|
|
<keyword type="macro" name="G_DIR_SEPARATOR" link="glib-Standard-Macros.html#G-DIR-SEPARATOR--CAPS"/>
|
|
<keyword type="macro" name="G_DIR_SEPARATOR_S" link="glib-Standard-Macros.html#G-DIR-SEPARATOR-S--CAPS"/>
|
|
diff -urN glib-2.19.2/docs/reference/glib/html/ix01.html glib-2.19.2-haiku/docs/reference/glib/html/ix01.html
|
|
--- glib-2.19.2/docs/reference/glib/html/ix01.html 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/html/ix01.html 2008-12-18 07:35:30.000000000 -0800
|
|
@@ -2115,6 +2115,8 @@
|
|
</dt>
|
|
<dt>G_OS_BEOS, <a class="indexterm" href="glib-Standard-Macros.html#G-OS-BEOS--CAPS">G_OS_BEOS</a>
|
|
</dt>
|
|
+<dt>G_OS_HAIKU, <a class="indexterm" href="glib-Standard-Macros.html#G-OS-HAIKU--CAPS">G_OS_HAIKU</a>
|
|
+</dt>
|
|
<dt>G_OS_UNIX, <a class="indexterm" href="glib-Standard-Macros.html#G-OS-UNIX--CAPS">G_OS_UNIX</a>
|
|
</dt>
|
|
<dt>G_OS_WIN32, <a class="indexterm" href="glib-Standard-Macros.html#G-OS-WIN32--CAPS">G_OS_WIN32</a>
|
|
diff -urN glib-2.19.2/docs/reference/glib/tmpl/macros.sgml glib-2.19.2-haiku/docs/reference/glib/tmpl/macros.sgml
|
|
--- glib-2.19.2/docs/reference/glib/tmpl/macros.sgml 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/tmpl/macros.sgml 2008-12-18 07:36:44.000000000 -0800
|
|
@@ -31,6 +31,19 @@
|
|
BeOS-specific code in "#ifdef G_OS_BEOS".
|
|
</para>
|
|
|
|
+<!-- ##### MACRO G_OS_HAIKU ##### -->
|
|
+<para>
|
|
+This macro is defined only on Haiku. So you can bracket
|
|
+Haiku-specific code in "#ifdef G_OS_HAIKU".
|
|
+</para>
|
|
+
|
|
+
|
|
+<!-- ##### MACRO G_OS_HAIKU ##### -->
|
|
+<para>
|
|
+This macro is defined only on Haiku. So you can bracket
|
|
+Haiku-specific code in "#ifdef G_OS_HAIKU".
|
|
+</para>
|
|
+
|
|
|
|
|
|
<!-- ##### MACRO G_OS_UNIX ##### -->
|
|
diff -urN glib-2.19.2/docs/reference/glib/xml/api-index-full.xml glib-2.19.2-haiku/docs/reference/glib/xml/api-index-full.xml
|
|
--- glib-2.19.2/docs/reference/glib/xml/api-index-full.xml 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/xml/api-index-full.xml 2008-12-18 07:35:30.000000000 -0800
|
|
@@ -1024,6 +1024,7 @@
|
|
<indexentry><primaryie linkends="g-option-group-set-translation-domain"><link linkend="g-option-group-set-translation-domain">g_option_group_set_translation_domain</link></primaryie></indexentry>
|
|
<indexentry><primaryie linkends="G-OPTION-REMAINING--CAPS"><link linkend="G-OPTION-REMAINING--CAPS">G_OPTION_REMAINING</link></primaryie></indexentry>
|
|
<indexentry><primaryie linkends="G-OS-BEOS--CAPS"><link linkend="G-OS-BEOS--CAPS">G_OS_BEOS</link></primaryie></indexentry>
|
|
+<indexentry><primaryie linkends="G-OS-HAIKU--CAPS"><link linkend="G-OS-HAIKU--CAPS">G_OS_HAIKU</link></primaryie></indexentry>
|
|
<indexentry><primaryie linkends="G-OS-UNIX--CAPS"><link linkend="G-OS-UNIX--CAPS">G_OS_UNIX</link></primaryie></indexentry>
|
|
<indexentry><primaryie linkends="G-OS-WIN32--CAPS"><link linkend="G-OS-WIN32--CAPS">G_OS_WIN32</link></primaryie></indexentry>
|
|
</indexdiv>
|
|
diff -urN glib-2.19.2/docs/reference/glib/xml/macros.xml glib-2.19.2-haiku/docs/reference/glib/xml/macros.xml
|
|
--- glib-2.19.2/docs/reference/glib/xml/macros.xml 2008-12-18 07:13:28.000000000 -0800
|
|
+++ glib-2.19.2-haiku/docs/reference/glib/xml/macros.xml 2008-12-18 07:36:44.000000000 -0800
|
|
@@ -19,6 +19,7 @@
|
|
|
|
#define <link linkend="G-OS-WIN32--CAPS">G_OS_WIN32</link>
|
|
#define <link linkend="G-OS-BEOS--CAPS">G_OS_BEOS</link>
|
|
+#define <link linkend="G-OS-HAIKU--CAPS">G_OS_HAIKU</link>
|
|
#define <link linkend="G-OS-UNIX--CAPS">G_OS_UNIX</link>
|
|
|
|
#define <link linkend="G-DIR-SEPARATOR--CAPS">G_DIR_SEPARATOR</link>
|
|
@@ -81,6 +82,14 @@
|
|
This macro is defined only on BeOS. So you can bracket
|
|
BeOS-specific code in "#ifdef G_OS_BEOS".
|
|
</para></refsect2>
|
|
+<refsect2 id="G-OS-HAIKU--CAPS" role="macro">
|
|
+<title>G_OS_HAIKU</title>
|
|
+<indexterm zone="G-OS-HAIKU--CAPS"><primary sortas="G_OS_HAIKU">G_OS_HAIKU</primary></indexterm><programlisting>#define G_OS_HAIKU
|
|
+</programlisting>
|
|
+<para>
|
|
+This macro is defined only on Haiku. So you can bracket
|
|
+Haiku-specific code in "#ifdef G_OS_HAIKU".
|
|
+</para></refsect2>
|
|
<refsect2 id="G-OS-UNIX--CAPS" role="macro">
|
|
<title>G_OS_UNIX</title>
|
|
<indexterm zone="G-OS-UNIX--CAPS"><primary sortas="OS_UNIX">G_OS_UNIX</primary></indexterm><programlisting>#define G_OS_UNIX
|
|
diff -urN glib-2.19.2/gio/gunixinputstream.c glib-2.19.2-haiku/gio/gunixinputstream.c
|
|
--- glib-2.19.2/gio/gunixinputstream.c 2008-12-18 07:13:27.000000000 -0800
|
|
+++ glib-2.19.2-haiku/gio/gunixinputstream.c 2008-12-18 07:35:30.000000000 -0800
|
|
@@ -170,6 +170,9 @@
|
|
GCancellable *cancellable,
|
|
GError **error)
|
|
{
|
|
+#if defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
+ return -1;
|
|
+#else
|
|
GUnixInputStream *unix_stream;
|
|
gssize res;
|
|
GPollFD poll_fds[2];
|
|
@@ -220,6 +223,7 @@
|
|
}
|
|
|
|
return res;
|
|
+#endif
|
|
}
|
|
|
|
static gboolean
|
|
@@ -325,6 +329,7 @@
|
|
GAsyncReadyCallback callback,
|
|
gpointer user_data)
|
|
{
|
|
+#if !defined(G_OS_BEOS) &&!defined(G_OS_HAIKU)
|
|
GSource *source;
|
|
GUnixInputStream *unix_stream;
|
|
ReadAsyncData *data;
|
|
@@ -347,6 +352,7 @@
|
|
g_source_attach (source, NULL);
|
|
|
|
g_source_unref (source);
|
|
+#endif
|
|
}
|
|
|
|
static gssize
|
|
diff -urN glib-2.19.2/gio/gunixmounts.c glib-2.19.2-haiku/gio/gunixmounts.c
|
|
--- glib-2.19.2/gio/gunixmounts.c 2008-12-18 07:13:26.000000000 -0800
|
|
+++ glib-2.19.2-haiku/gio/gunixmounts.c 2008-12-18 07:36:44.000000000 -0800
|
|
@@ -594,6 +594,16 @@
|
|
|
|
return g_list_reverse (return_list);
|
|
}
|
|
+
|
|
+#elif defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
+
|
|
+static GList *
|
|
+_g_get_unix_mounts (void)
|
|
+{
|
|
+ GList *return_list = NULL;
|
|
+ return return_list;
|
|
+}
|
|
+
|
|
#else
|
|
#error No _g_get_unix_mounts() implementation for system
|
|
#endif
|
|
@@ -974,6 +984,16 @@
|
|
|
|
return g_list_reverse (return_list);
|
|
}
|
|
+
|
|
+#elif defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
+
|
|
+static GList *
|
|
+_g_get_unix_mount_points (void)
|
|
+{
|
|
+ GList *return_list = NULL;
|
|
+ return return_list;
|
|
+}
|
|
+
|
|
#else
|
|
#error No g_get_mount_table() implementation for system
|
|
#endif
|
|
diff -urN glib-2.19.2/gio/gunixoutputstream.c glib-2.19.2-haiku/gio/gunixoutputstream.c
|
|
--- glib-2.19.2/gio/gunixoutputstream.c 2008-12-18 07:13:26.000000000 -0800
|
|
+++ glib-2.19.2-haiku/gio/gunixoutputstream.c 2008-12-18 07:35:31.000000000 -0800
|
|
@@ -158,6 +158,9 @@
|
|
GCancellable *cancellable,
|
|
GError **error)
|
|
{
|
|
+#if defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
+ return -1;
|
|
+#else
|
|
GUnixOutputStream *unix_stream;
|
|
gssize res;
|
|
GPollFD poll_fds[2];
|
|
@@ -209,6 +212,7 @@
|
|
}
|
|
|
|
return res;
|
|
+#endif
|
|
}
|
|
|
|
static gboolean
|
|
@@ -314,6 +318,7 @@
|
|
GAsyncReadyCallback callback,
|
|
gpointer user_data)
|
|
{
|
|
+#if !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
|
GSource *source;
|
|
GUnixOutputStream *unix_stream;
|
|
WriteAsyncData *data;
|
|
@@ -336,6 +341,7 @@
|
|
g_source_attach (source, NULL);
|
|
|
|
g_source_unref (source);
|
|
+#endif
|
|
}
|
|
|
|
static gssize
|
|
diff -urN glib-2.19.2/glib/gbacktrace.c glib-2.19.2-haiku/glib/gbacktrace.c
|
|
--- glib-2.19.2/glib/gbacktrace.c 2008-12-18 07:13:31.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gbacktrace.c 2008-12-18 07:35:31.000000000 -0800
|
|
@@ -158,7 +158,7 @@
|
|
void
|
|
g_on_error_stack_trace (const gchar *prg_name)
|
|
{
|
|
-#if defined(G_OS_UNIX) || defined(G_OS_BEOS)
|
|
+#if defined(G_OS_UNIX) || defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
pid_t pid;
|
|
gchar buf[16];
|
|
gchar *args[4] = { "gdb", NULL, NULL, NULL };
|
|
@@ -193,7 +193,7 @@
|
|
#endif
|
|
}
|
|
|
|
-#ifndef G_OS_WIN32
|
|
+#if !defined(G_OS_WIN32) && !defined(G_OS_BEOS)
|
|
|
|
static gboolean stack_trace_done = FALSE;
|
|
|
|
diff -urN glib-2.19.2/glib/gmain.c glib-2.19.2-haiku/glib/gmain.c
|
|
--- glib-2.19.2/glib/gmain.c 2008-12-18 07:13:43.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gmain.c 2008-12-18 07:35:31.000000000 -0800
|
|
@@ -70,6 +70,12 @@
|
|
#include <sys/wait.h>
|
|
#endif /* G_OS_BEOS */
|
|
|
|
+#ifdef G_OS_HAIKU
|
|
+#include <sys/socket.h>
|
|
+#include <sys/wait.h>
|
|
+#include "fcntl.h"
|
|
+#endif /* G_OS_HAIKU */
|
|
+
|
|
#ifdef G_OS_UNIX
|
|
#include <fcntl.h>
|
|
#include <sys/wait.h>
|
|
@@ -3701,6 +3707,7 @@
|
|
static void
|
|
g_child_watch_source_init_multi_threaded (void)
|
|
{
|
|
+#if !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
|
GError *error = NULL;
|
|
struct sigaction action;
|
|
|
|
@@ -3720,6 +3727,7 @@
|
|
sigemptyset (&action.sa_mask);
|
|
action.sa_flags = SA_RESTART | SA_NOCLDSTOP;
|
|
sigaction (SIGCHLD, &action, NULL);
|
|
+#endif
|
|
}
|
|
|
|
static void
|
|
diff -urN glib-2.19.2/glib/gslice.c glib-2.19.2-haiku/glib/gslice.c
|
|
--- glib-2.19.2/glib/gslice.c 2008-12-18 07:13:55.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gslice.c 2008-12-18 07:35:31.000000000 -0800
|
|
@@ -302,6 +302,8 @@
|
|
GetSystemInfo (&system_info);
|
|
sys_page_size = system_info.dwPageSize;
|
|
}
|
|
+#elif defined(G_OS_BEOS)
|
|
+ sys_page_size = 4096;
|
|
#else
|
|
sys_page_size = sysconf (_SC_PAGESIZE); /* = sysconf (_SC_PAGE_SIZE); = getpagesize(); */
|
|
#endif
|
|
diff -urN glib-2.19.2/glib/gspawn.c glib-2.19.2-haiku/glib/gspawn.c
|
|
--- glib-2.19.2/glib/gspawn.c 2008-12-18 07:13:48.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gspawn.c 2008-12-18 07:35:31.000000000 -0800
|
|
@@ -238,6 +238,9 @@
|
|
gint *exit_status,
|
|
GError **error)
|
|
{
|
|
+#if defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
+ return FALSE;
|
|
+#else
|
|
gint outpipe = -1;
|
|
gint errpipe = -1;
|
|
GPid pid;
|
|
@@ -433,6 +436,7 @@
|
|
|
|
return TRUE;
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
/**
|
|
@@ -908,7 +912,7 @@
|
|
gint fd;
|
|
gint res = 0;
|
|
|
|
-#ifdef HAVE_SYS_RESOURCE_H
|
|
+#if defined(HAVE_SYS_RESOURCE_H) && !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
|
struct rlimit rl;
|
|
#endif
|
|
|
|
@@ -951,7 +955,7 @@
|
|
|
|
#endif
|
|
|
|
-#ifdef HAVE_SYS_RESOURCE_H
|
|
+#if defined(HAVE_SYS_RESOURCE_H) && !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
|
|
|
if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY)
|
|
open_max = rl.rlim_max;
|
|
diff -urN glib-2.19.2/glib/gstdio.c glib-2.19.2-haiku/glib/gstdio.c
|
|
--- glib-2.19.2/glib/gstdio.c 2008-12-18 07:13:55.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gstdio.c 2008-12-18 07:36:44.000000000 -0800
|
|
@@ -47,7 +47,7 @@
|
|
|
|
#include "galias.h"
|
|
|
|
-#if !defined (G_OS_UNIX) && !defined (G_OS_WIN32) && !defined (G_OS_BEOS)
|
|
+#if !defined (G_OS_UNIX) && !defined (G_OS_WIN32) && !defined (G_OS_BEOS) && !defined(G_OS_HAIKU)
|
|
#error Please port this to your operating system
|
|
#endif
|
|
|
|
diff -urN glib-2.19.2/glib/gstrfuncs.c glib-2.19.2-haiku/glib/gstrfuncs.c
|
|
--- glib-2.19.2/glib/gstrfuncs.c 2008-12-18 07:13:40.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gstrfuncs.c 2008-12-18 07:35:31.000000000 -0800
|
|
@@ -1328,7 +1328,7 @@
|
|
#ifdef HAVE_STRSIGNAL
|
|
const char *msg_locale;
|
|
|
|
-#if defined(G_OS_BEOS) || defined(G_WITH_CYGWIN)
|
|
+#if defined(G_OS_BEOS) || defined(G_OS_HAIKU) || defined(G_WITH_CYGWIN)
|
|
extern const char *strsignal(int);
|
|
#else
|
|
/* this is declared differently (const) in string.h on BeOS */
|
|
diff -urN glib-2.19.2/glib/gtester.c glib-2.19.2-haiku/glib/gtester.c
|
|
--- glib-2.19.2/glib/gtester.c 2008-12-18 07:13:35.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gtester.c 2008-12-18 07:35:31.000000000 -0800
|
|
@@ -630,6 +630,7 @@
|
|
* we must fiddle with sigaction() *before* glib is used, otherwise
|
|
* we could revoke signal hanmdler setups from glib initialization code.
|
|
*/
|
|
+#ifdef SA_RESTART
|
|
if (TRUE)
|
|
{
|
|
struct sigaction sa;
|
|
@@ -639,6 +640,7 @@
|
|
sa.sa_flags = SA_RESTART;
|
|
sigaction (SIGCHLD, &sa, &osa);
|
|
}
|
|
+#endif
|
|
|
|
g_set_prgname (argv[0]);
|
|
parse_args (&argc, &argv);
|
|
diff -urN glib-2.19.2/glib/gutils.c glib-2.19.2-haiku/glib/gutils.c
|
|
--- glib-2.19.2/glib/gutils.c 2008-12-18 07:13:36.000000000 -0800
|
|
+++ glib-2.19.2-haiku/glib/gutils.c 2008-12-18 08:28:37.000000000 -0800
|
|
@@ -478,7 +478,7 @@
|
|
}
|
|
|
|
path = g_getenv ("PATH");
|
|
-#if defined(G_OS_UNIX) || defined(G_OS_BEOS)
|
|
+#if defined(G_OS_UNIX) || defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
if (path == NULL)
|
|
{
|
|
/* There is no `PATH' in the environment. The default
|
|
@@ -2311,9 +2311,24 @@
|
|
}
|
|
#endif /* G_OS_WIN32 */
|
|
|
|
+#if defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
|
+static void
|
|
+load_user_special_dirs (void)
|
|
+{
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_DESKTOP] = g_strdup("$HOME/Desktop");
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_DOCUMENTS] = g_strdup("$HOME");
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_DOWNLOAD] = g_strdup("$HOME/Desktop");
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_MUSIC] = NULL;
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_PICTURES] = NULL;
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_PUBLIC_SHARE] = NULL;
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_TEMPLATES] = NULL;
|
|
+ g_user_special_dirs[G_USER_DIRECTORY_VIDEOS] = NULL;
|
|
+}
|
|
+#endif /* G_OS_BEOS */
|
|
+
|
|
static void g_init_user_config_dir (void);
|
|
|
|
-#if defined(G_OS_UNIX) && !defined(HAVE_CARBON)
|
|
+#if defined(G_OS_UNIX) && !defined(HAVE_CARBON) && !defined(G_OS_HAIKU)
|
|
|
|
/* adapted from xdg-user-dir-lookup.c
|
|
*
|