aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Abel `00z' Camarillo <00z@the00z.org>2009-06-06 22:39:19 +0200
committerGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-06-06 22:39:19 +0200
commitbd6fb013e4ddf7c89f8154ff2ef7bc7f7108ca98 (patch)
treee578a28f46a6c28c516577d6ebe573c4ed6aa037
parente9740015543cf20fd3ad1387ca47b15745ff024f (diff)
parentabec4c22eae603c70670e015111c854000beb638 (diff)
uzbl now builds on OpenBSD
-rw-r--r--AUTHORS1
-rw-r--r--Makefile4
-rw-r--r--uzbl.c10
-rw-r--r--uzbl.h2
4 files changed, 9 insertions, 8 deletions
diff --git a/AUTHORS b/AUTHORS
index 441d9ce..e5e3806 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -24,6 +24,7 @@ Contributors:
Tom Adams (holizz) - few patches
neutralinsomniac - load_progress = 0 fix
Maximilian Gaß (mxey) - small patches
+ Abel Camarillo (00z) - make it compile on OpenBSD
Originaly based on http://trac.webkit.org/browser/trunk/WebKitTools/GtkLauncher/main.c
Which is copyrighted:
diff --git a/Makefile b/Makefile
index 4c3a483..04012ed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS)
-LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0) $(LDFLAGS)
+CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS)
+LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4) -pthread $(LDFLAGS)
all: uzbl uzblctrl
PREFIX?=$(DESTDIR)/usr
diff --git a/uzbl.c b/uzbl.c
index 0cd449a..9abcaa1 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -1116,7 +1116,7 @@ sharg_append(GArray *a, const gchar *str) {
// make sure that the args string you pass can properly be interpreted (eg properly escaped against whitespace, quotes etc)
static gboolean
run_command (const gchar *command, const guint npre, const gchar **args,
- const gboolean sync, char **stdout) {
+ const gboolean sync, char **output_stdout) {
//command <uzbl conf> <uzbl pid> <uzbl win id> <uzbl fifo file> <uzbl socket file> [args]
GError *err = NULL;
@@ -1140,10 +1140,10 @@ run_command (const gchar *command, const guint npre, const gchar **args,
gboolean result;
if (sync) {
- if (*stdout) *stdout = strfree(*stdout);
+ if (*output_stdout) *output_stdout = strfree(*output_stdout);
result = g_spawn_sync(NULL, (gchar **)a->data, NULL, G_SPAWN_SEARCH_PATH,
- NULL, NULL, stdout, NULL, NULL, &err);
+ NULL, NULL, output_stdout, NULL, NULL, &err);
} else result = g_spawn_async(NULL, (gchar **)a->data, NULL, G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, &err);
@@ -1157,8 +1157,8 @@ run_command (const gchar *command, const guint npre, const gchar **args,
g_string_append_printf(s, " -- result: %s", (result ? "true" : "false"));
printf("%s\n", s->str);
g_string_free(s, TRUE);
- if(stdout) {
- printf("Stdout: %s\n", *stdout);
+ if(output_stdout) {
+ printf("Stdout: %s\n", *output_stdout);
}
}
if (err) {
diff --git a/uzbl.h b/uzbl.h
index ab45bae..a6a3a6e 100644
--- a/uzbl.h
+++ b/uzbl.h
@@ -323,7 +323,7 @@ close_uzbl (WebKitWebView *page, GArray *argv);
static gboolean
run_command(const gchar *command, const guint npre,
- const gchar **args, const gboolean sync, char **stdout);
+ const gchar **args, const gboolean sync, char **output_stdout);
static void
spawn(WebKitWebView *web_view, GArray *argv);