uzbl now builds on OpenBSD
authorAbel `00z' Camarillo <00z@the00z.org>
Sat, 6 Jun 2009 20:39:19 +0000 (22:39 +0200)
committerDieter Plaetinck <dieter@plaetinck.be>
Sat, 6 Jun 2009 20:39:19 +0000 (22:39 +0200)
1  2 
AUTHORS
Makefile
uzbl.c
uzbl.h

diff --cc AUTHORS
+++ b/AUTHORS
@@@ -15,15 -15,7 +15,16 @@@ Contributors
      Damien Leon - misc
      Peter Suschlik - backwards searching
      (salinasv) - move some variables to heap
 -    Sylvester Johansson (scj) - original form filler script
 +    Sylvester Johansson (scj) - form filler script & different take on link follower 
 +    (mxf) - uzblcat
 +    Mark Nevill - misc patches
 +    Uli Schlachter (psychon) - basic mime_policy_cb & Makefile patch
 +    (uranther) - zoom level
 +    (bobpaul) - session script patches
 +    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 --cc Makefile
+++ b/Makefile
@@@ -1,9 -1,7 +1,9 @@@
- 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)
 -CPPFLAGS=$(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/.* //")\""
 -LDFLAGS=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4) -pthread
++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
 +
  test: uzbl
        ./uzbl --uri http://www.uzbl.org
  
diff --cc uzbl.c
--- 1/uzbl.c
--- 2/uzbl.c
+++ b/uzbl.c
@@@ -1116,7 -905,7 +1116,7 @@@ sharg_append(GArray *a, const gchar *st
  // 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 **_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;
      
      
      gboolean result;
      if (sync) {
-         if (*stdout) *stdout = strfree(*stdout);
 -        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, _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);
  
          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) {
          g_printerr("error on run_command: %s\n", err->message);
diff --cc uzbl.h
--- 1/uzbl.h
--- 2/uzbl.h
+++ b/uzbl.h
@@@ -323,7 -283,7 +323,7 @@@ close_uzbl (WebKitWebView *page, GArra
  
  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 **_stdout);
++            const gchar **args, const gboolean sync, char **output_stdout);
  
  static void
  spawn(WebKitWebView *web_view, GArray *argv);