mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
* break glib-2.18.3-haiku.diff into a well-written part (some) and a provisionally-written part (more);
* some.diff: fncntl.h included conditionally instead of not being included at all; * more.diff: the chunks that made it into here regard Makefiles, interpreter path in perl scripts and a couple of C functions which are disabled, but probably should be implemented.
This commit is contained in:
285
dev-libs/glib/glib-2.18.3-haiku-more.diff
Normal file
285
dev-libs/glib/glib-2.18.3-haiku-more.diff
Normal file
@@ -0,0 +1,285 @@
|
||||
diff -Naur glib-2.18.3-some/gio/Makefile.am glib-2.18.3-more/gio/Makefile.am
|
||||
--- glib-2.18.3-some/gio/Makefile.am 2009-03-29 05:36:04.000000000 +0000
|
||||
+++ glib-2.18.3-more/gio/Makefile.am 2009-03-29 05:37:24.000000000 +0000
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
endif
|
||||
|
||||
-SUBDIRS += tests
|
||||
+#SUBDIRS += tests
|
||||
|
||||
libgio_2_0_la_SOURCES = \
|
||||
gappinfo.c \
|
||||
diff -Naur glib-2.18.3-some/gio/gunixinputstream.c glib-2.18.3-more/gio/gunixinputstream.c
|
||||
--- glib-2.18.3-some/gio/gunixinputstream.c 2009-03-29 05:36:05.000000000 +0000
|
||||
+++ glib-2.18.3-more/gio/gunixinputstream.c 2009-03-29 05:37:24.000000000 +0000
|
||||
@@ -28,7 +28,9 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
+#ifdef HAVE_POLL
|
||||
#include <poll.h>
|
||||
+#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
@@ -171,6 +173,9 @@
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
+#if defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
||||
+ return -1;
|
||||
+#else
|
||||
GUnixInputStream *unix_stream;
|
||||
gssize res;
|
||||
struct pollfd poll_fds[2];
|
||||
@@ -226,6 +231,7 @@
|
||||
}
|
||||
|
||||
return res;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -331,6 +337,7 @@
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
+#if !defined(G_OS_BEOS) &&!defined(G_OS_HAIKU)
|
||||
GSource *source;
|
||||
GUnixInputStream *unix_stream;
|
||||
ReadAsyncData *data;
|
||||
@@ -353,6 +360,7 @@
|
||||
g_source_attach (source, NULL);
|
||||
|
||||
g_source_unref (source);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static gssize
|
||||
diff -Naur glib-2.18.3-some/gio/gunixmounts.c glib-2.18.3-more/gio/gunixmounts.c
|
||||
--- glib-2.18.3-some/gio/gunixmounts.c 2009-03-29 05:36:05.000000000 +0000
|
||||
+++ glib-2.18.3-more/gio/gunixmounts.c 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-some/gio/gunixoutputstream.c glib-2.18.3-more/gio/gunixoutputstream.c
|
||||
--- glib-2.18.3-some/gio/gunixoutputstream.c 2009-03-29 05:36:05.000000000 +0000
|
||||
+++ glib-2.18.3-more/gio/gunixoutputstream.c 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -28,7 +28,9 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
+#ifdef HAVE_POLL
|
||||
#include <poll.h>
|
||||
+#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
@@ -159,6 +161,9 @@
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
+#if defined(G_OS_BEOS) || defined(G_OS_HAIKU)
|
||||
+ return -1;
|
||||
+#else
|
||||
GUnixOutputStream *unix_stream;
|
||||
gssize res;
|
||||
struct pollfd poll_fds[2];
|
||||
@@ -215,6 +220,7 @@
|
||||
}
|
||||
|
||||
return res;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -320,6 +326,7 @@
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
+#if !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
||||
GSource *source;
|
||||
GUnixOutputStream *unix_stream;
|
||||
WriteAsyncData *data;
|
||||
@@ -342,6 +349,7 @@
|
||||
g_source_attach (source, NULL);
|
||||
|
||||
g_source_unref (source);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static gssize
|
||||
diff -Naur glib-2.18.3-some/gio/makegioalias.pl glib-2.18.3-more/gio/makegioalias.pl
|
||||
--- glib-2.18.3-some/gio/makegioalias.pl 2009-03-29 05:36:05.000000000 +0000
|
||||
+++ glib-2.18.3-more/gio/makegioalias.pl 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -w
|
||||
+#!/boot/home/config/bin/perl -w
|
||||
|
||||
my $do_def = 0;
|
||||
|
||||
diff -Naur glib-2.18.3-some/glib/Makefile.am glib-2.18.3-more/glib/Makefile.am
|
||||
--- glib-2.18.3-some/glib/Makefile.am 2009-03-29 05:36:06.000000000 +0000
|
||||
+++ glib-2.18.3-more/glib/Makefile.am 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
gregex_h =
|
||||
endif
|
||||
|
||||
-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
|
||||
+SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre .
|
||||
|
||||
DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
|
||||
|
||||
diff -Naur glib-2.18.3-some/glib/gbacktrace.c glib-2.18.3-more/glib/gbacktrace.c
|
||||
--- glib-2.18.3-some/glib/gbacktrace.c 2009-03-29 05:36:06.000000000 +0000
|
||||
+++ glib-2.18.3-more/glib/gbacktrace.c 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-some/glib/gmain.c glib-2.18.3-more/glib/gmain.c
|
||||
--- glib-2.18.3-some/glib/gmain.c 2009-03-29 05:36:08.000000000 +0000
|
||||
+++ glib-2.18.3-more/glib/gmain.c 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -82,6 +82,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>
|
||||
@@ -569,6 +575,10 @@
|
||||
#undef NO_FD_SET
|
||||
#endif /* G_OS_BEOS */
|
||||
|
||||
+#ifdef G_OS_HAIKU
|
||||
+#undef NO_FD_SET
|
||||
+#endif /* G_OS_HAIKU */
|
||||
+
|
||||
#ifndef NO_FD_SET
|
||||
# define SELECT_MASK fd_set
|
||||
#else /* !NO_FD_SET */
|
||||
@@ -4022,6 +4032,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;
|
||||
|
||||
@@ -4041,6 +4052,7 @@
|
||||
sigemptyset (&action.sa_mask);
|
||||
action.sa_flags = SA_RESTART | SA_NOCLDSTOP;
|
||||
sigaction (SIGCHLD, &action, NULL);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
diff -Naur glib-2.18.3-some/glib/gspawn.c glib-2.18.3-more/glib/gspawn.c
|
||||
--- glib-2.18.3-some/glib/gspawn.c 2009-03-29 05:36:08.000000000 +0000
|
||||
+++ glib-2.18.3-more/glib/gspawn.c 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-some/glib/makegalias.pl glib-2.18.3-more/glib/makegalias.pl
|
||||
--- glib-2.18.3-some/glib/makegalias.pl 2009-03-29 05:36:09.000000000 +0000
|
||||
+++ glib-2.18.3-more/glib/makegalias.pl 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -w
|
||||
+#!/boot/home/config/bin/perl -w
|
||||
|
||||
my $do_def = 0;
|
||||
|
||||
diff -Naur glib-2.18.3-some/gobject/makegobjectalias.pl glib-2.18.3-more/gobject/makegobjectalias.pl
|
||||
--- glib-2.18.3-some/gobject/makegobjectalias.pl 2009-03-29 05:36:09.000000000 +0000
|
||||
+++ glib-2.18.3-more/gobject/makegobjectalias.pl 2009-03-29 05:37:25.000000000 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -w
|
||||
+#!/boot/home/config/bin/perl -w
|
||||
|
||||
my $do_def = 0;
|
||||
|
||||
323
dev-libs/glib/glib-2.18.3-haiku-some.diff
Normal file
323
dev-libs/glib/glib-2.18.3-haiku-some.diff
Normal file
@@ -0,0 +1,323 @@
|
||||
diff -Naur glib-2.18.3-clean/configure.in glib-2.18.3-some/configure.in
|
||||
--- glib-2.18.3-clean/configure.in 2009-03-29 05:11:44.000000000 +0000
|
||||
+++ glib-2.18.3-some/configure.in 2009-03-29 05:36:03.000000000 +0000
|
||||
@@ -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])
|
||||
@@ -3280,6 +3291,9 @@
|
||||
#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 -Naur glib-2.18.3-clean/docs/reference/glib/glib-overrides.txt glib-2.18.3-some/docs/reference/glib/glib-overrides.txt
|
||||
--- glib-2.18.3-clean/docs/reference/glib/glib-overrides.txt 2009-03-29 05:11:44.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/glib-overrides.txt 2009-03-29 05:36:03.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-clean/docs/reference/glib/glib-sections.txt glib-2.18.3-some/docs/reference/glib/glib-sections.txt
|
||||
--- glib-2.18.3-clean/docs/reference/glib/glib-sections.txt 2009-03-29 05:11:44.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/glib-sections.txt 2009-03-29 05:36:03.000000000 +0000
|
||||
@@ -125,6 +125,7 @@
|
||||
<SUBSECTION>
|
||||
G_OS_WIN32
|
||||
G_OS_BEOS
|
||||
+G_OS_HAIKU
|
||||
G_OS_UNIX
|
||||
|
||||
<SUBSECTION>
|
||||
diff -Naur glib-2.18.3-clean/docs/reference/glib/html/glib-Standard-Macros.html glib-2.18.3-some/docs/reference/glib/html/glib-Standard-Macros.html
|
||||
--- glib-2.18.3-clean/docs/reference/glib/html/glib-Standard-Macros.html 2009-03-29 05:11:45.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/html/glib-Standard-Macros.html 2009-03-29 05:36:04.000000000 +0000
|
||||
@@ -60,6 +60,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>
|
||||
@@ -115,6 +116,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 -Naur glib-2.18.3-clean/docs/reference/glib/html/glib.devhelp glib-2.18.3-some/docs/reference/glib/html/glib.devhelp
|
||||
--- glib-2.18.3-clean/docs/reference/glib/html/glib.devhelp 2009-03-29 05:11:45.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/html/glib.devhelp 2009-03-29 05:36:04.000000000 +0000
|
||||
@@ -189,6 +189,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 -Naur glib-2.18.3-clean/docs/reference/glib/html/glib.devhelp2 glib-2.18.3-some/docs/reference/glib/html/glib.devhelp2
|
||||
--- glib-2.18.3-clean/docs/reference/glib/html/glib.devhelp2 2009-03-29 05:11:45.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/html/glib.devhelp2 2009-03-29 05:36:04.000000000 +0000
|
||||
@@ -189,6 +189,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 -Naur glib-2.18.3-clean/docs/reference/glib/html/ix01.html glib-2.18.3-some/docs/reference/glib/html/ix01.html
|
||||
--- glib-2.18.3-clean/docs/reference/glib/html/ix01.html 2009-03-29 05:11:45.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/html/ix01.html 2009-03-29 05:36:04.000000000 +0000
|
||||
@@ -2260,6 +2260,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 -Naur glib-2.18.3-clean/docs/reference/glib/tmpl/macros.sgml glib-2.18.3-some/docs/reference/glib/tmpl/macros.sgml
|
||||
--- glib-2.18.3-clean/docs/reference/glib/tmpl/macros.sgml 2009-03-29 05:11:45.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/tmpl/macros.sgml 2009-03-29 05:36:04.000000000 +0000
|
||||
@@ -33,6 +33,14 @@
|
||||
|
||||
|
||||
|
||||
+<!-- ##### 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 ##### -->
|
||||
<para>
|
||||
This macro is defined only on UNIX. So you can bracket
|
||||
diff -Naur glib-2.18.3-clean/docs/reference/glib/xml/api-index-full.xml glib-2.18.3-some/docs/reference/glib/xml/api-index-full.xml
|
||||
--- glib-2.18.3-clean/docs/reference/glib/xml/api-index-full.xml 2009-03-29 05:11:45.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/xml/api-index-full.xml 2009-03-29 05:36:04.000000000 +0000
|
||||
@@ -1107,6 +1107,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>
|
||||
<indexentry><primaryie linkends="g-parse-debug-string"><link linkend="g-parse-debug-string">g_parse_debug_string</link></primaryie></indexentry>
|
||||
diff -Naur glib-2.18.3-clean/docs/reference/glib/xml/macros.xml glib-2.18.3-some/docs/reference/glib/xml/macros.xml
|
||||
--- glib-2.18.3-clean/docs/reference/glib/xml/macros.xml 2009-03-29 05:11:45.000000000 +0000
|
||||
+++ glib-2.18.3-some/docs/reference/glib/xml/macros.xml 2009-03-29 05:36:04.000000000 +0000
|
||||
@@ -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="G_OS_UNIX">G_OS_UNIX</primary></indexterm><programlisting>#define G_OS_UNIX
|
||||
diff -Naur glib-2.18.3-clean/gio/xdgmime/xdgmimealias.c glib-2.18.3-some/gio/xdgmime/xdgmimealias.c
|
||||
--- glib-2.18.3-clean/gio/xdgmime/xdgmimealias.c 2009-03-29 05:11:46.000000000 +0000
|
||||
+++ glib-2.18.3-some/gio/xdgmime/xdgmimealias.c 2009-03-29 05:40:01.000000000 +0000
|
||||
@@ -35,7 +35,10 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
-#include <fnmatch.h>
|
||||
+
|
||||
+#if !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
||||
+# include <fnmatch.h>
|
||||
+#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
diff -Naur glib-2.18.3-clean/gio/xdgmime/xdgmimecache.c glib-2.18.3-some/gio/xdgmime/xdgmimecache.c
|
||||
--- glib-2.18.3-clean/gio/xdgmime/xdgmimecache.c 2009-03-29 05:11:46.000000000 +0000
|
||||
+++ glib-2.18.3-some/gio/xdgmime/xdgmimecache.c 2009-03-29 05:40:41.000000000 +0000
|
||||
@@ -34,7 +34,11 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
-#include <fnmatch.h>
|
||||
+
|
||||
+#if !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
||||
+# include <fnmatch.h>
|
||||
+#endif
|
||||
+
|
||||
#include <assert.h>
|
||||
|
||||
#include <netinet/in.h> /* for ntohl/ntohs */
|
||||
diff -Naur glib-2.18.3-clean/gio/xdgmime/xdgmimeglob.c glib-2.18.3-some/gio/xdgmime/xdgmimeglob.c
|
||||
--- glib-2.18.3-clean/gio/xdgmime/xdgmimeglob.c 2009-03-29 05:11:46.000000000 +0000
|
||||
+++ glib-2.18.3-some/gio/xdgmime/xdgmimeglob.c 2009-03-29 05:41:11.000000000 +0000
|
||||
@@ -35,7 +35,10 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
-#include <fnmatch.h>
|
||||
+
|
||||
+#if !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
||||
+# include <fnmatch.h>
|
||||
+#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
diff -Naur glib-2.18.3-clean/gio/xdgmime/xdgmimeparent.c glib-2.18.3-some/gio/xdgmime/xdgmimeparent.c
|
||||
--- glib-2.18.3-clean/gio/xdgmime/xdgmimeparent.c 2009-03-29 05:11:46.000000000 +0000
|
||||
+++ glib-2.18.3-some/gio/xdgmime/xdgmimeparent.c 2009-03-29 05:41:22.000000000 +0000
|
||||
@@ -35,7 +35,10 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
-#include <fnmatch.h>
|
||||
+
|
||||
+#if !defined(G_OS_BEOS) && !defined(G_OS_HAIKU)
|
||||
+# include <fnmatch.h>
|
||||
+#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
diff -Naur glib-2.18.3-clean/glib/gslice.c glib-2.18.3-some/glib/gslice.c
|
||||
--- glib-2.18.3-clean/glib/gslice.c 2009-03-29 05:11:52.000000000 +0000
|
||||
+++ glib-2.18.3-some/glib/gslice.c 2009-03-29 05:36:08.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-clean/glib/gstdio.c glib-2.18.3-some/glib/gstdio.c
|
||||
--- glib-2.18.3-clean/glib/gstdio.c 2009-03-29 05:11:52.000000000 +0000
|
||||
+++ glib-2.18.3-some/glib/gstdio.c 2009-03-29 05:36:08.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-clean/glib/gstrfuncs.c glib-2.18.3-some/glib/gstrfuncs.c
|
||||
--- glib-2.18.3-clean/glib/gstrfuncs.c 2009-03-29 05:11:52.000000000 +0000
|
||||
+++ glib-2.18.3-some/glib/gstrfuncs.c 2009-03-29 05:36:08.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-clean/glib/gtester.c glib-2.18.3-some/glib/gtester.c
|
||||
--- glib-2.18.3-clean/glib/gtester.c 2009-03-29 05:11:52.000000000 +0000
|
||||
+++ glib-2.18.3-some/glib/gtester.c 2009-03-29 05:36:08.000000000 +0000
|
||||
@@ -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 -Naur glib-2.18.3-clean/glib/gutils.c glib-2.18.3-some/glib/gutils.c
|
||||
--- glib-2.18.3-clean/glib/gutils.c 2009-03-29 05:11:52.000000000 +0000
|
||||
+++ glib-2.18.3-some/glib/gutils.c 2009-03-29 05:36:08.000000000 +0000
|
||||
@@ -458,7 +458,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
|
||||
@@ -2279,6 +2279,21 @@
|
||||
}
|
||||
#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)
|
||||
Reference in New Issue
Block a user