summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas James Alexander Thurman <tthurman@src.gnome.org>2009-01-23 04:12:06 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2009-01-23 04:12:06 +0000
commitb4fe3c8356a09a751dc4214662e9525fab6af2cb (patch)
tree465462963bf2c956c5d66dfa0f902b87488bce35
parente6413cce03346fd5c2657184e111c80e1a2e7686 (diff)
downloadmetacity-b4fe3c8356a09a751dc4214662e9525fab6af2cb.tar.gz
Fix autotools thanks to Andreas Dalsgaard;
fix veracity.c to let it compile under our setup. * configure.in: * test/veracity/Makefile.am: * test/veracity/veracity.c: svn path=/branches/veracity/; revision=4085
-rw-r--r--ChangeLog9
-rw-r--r--configure.in2
-rw-r--r--test/veracity/Makefile.am6
-rw-r--r--test/veracity/veracity.c41
4 files changed, 43 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f2514dd..1964e626 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-22 Thomas Thurman <tthurman@gnome.org>
+
+ Fix autotools thanks to Andreas Dalsgaard;
+ fix veracity.c to let it compile under our setup.
+
+ * configure.in:
+ * test/veracity/Makefile.am:
+ * test/veracity/veracity.c:
+
2009-01-21 Thomas Thurman <tthurman@gnome.org>
fix up Makefile.am a little.
diff --git a/configure.in b/configure.in
index 097ade07..24ef7200 100644
--- a/configure.in
+++ b/configure.in
@@ -252,7 +252,7 @@ if test x$enable_veracity = xyes; then
else
use_veracity=no
fi
-AM_CONDITIONAL(BUILD_TESTS, test x$build_tests = xyes)
+AM_CONDITIONAL(BUILD_TESTS, test x$enable_veracity = xyes)
## if no compositor, still possibly enable render
if test x$have_xcomposite = xno; then
diff --git a/test/veracity/Makefile.am b/test/veracity/Makefile.am
index 2e395193..f70df9ea 100644
--- a/test/veracity/Makefile.am
+++ b/test/veracity/Makefile.am
@@ -2,15 +2,11 @@ if BUILD_TESTS
@INTLTOOL_DESKTOP_RULE@
-#INCLUDES=@METACITY_WINDOW_DEMO_CFLAGS@ @METACITY_MESSAGE_CFLAGS@ \
-# -DMETACITY_ICON_DIR=\"$(pkgdatadir)/icons\" \
-# -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
+INCLUDES=@METACITY_CFLAGS@
veracity_SOURCES= \
veracity.c
-bin_PROGRAMS=veracity
-
## don't install the test suite
noinst_PROGRAMS=veracity
diff --git a/test/veracity/veracity.c b/test/veracity/veracity.c
index 7705a579..31ab5102 100644
--- a/test/veracity/veracity.c
+++ b/test/veracity/veracity.c
@@ -18,11 +18,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
+
+#define _SVID_SOURCE
+#define _POSIX_C_SOURCE 200112L
+
#include <stdio.h>
#include <libguile.h>
#include <guile/gh.h>
#include <sys/types.h>
#include <signal.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <gconf/gconf.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -30,7 +37,7 @@
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
-#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
int x_server = 0; /* PID of the tame X server */
int window_manager = 0; /* PID of the window manager */
@@ -41,6 +48,10 @@ Display *current_display = NULL;
gboolean verbose = FALSE;
+SCM make_window(void);
+SCM parent(SCM raw_window);
+SCM make_window(void);
+
SCM
make_window()
{
@@ -68,8 +79,6 @@ SCM
parent(SCM raw_window)
{
Window window = gh_scm2int (raw_window);
- Display *display;
- Window w;
Window root_return;
Window parent_return;
Window *children_return;
@@ -103,6 +112,7 @@ start_wm ()
/* have to wait a moment here while metacity starts up */
sleep(2);
+ return SCM_BOOL(1);
}
static SCM
@@ -112,6 +122,10 @@ key_event ()
* Based around some public domain code by Adam Pierce
* http://www.doctort.org/adam/nerd-notes/x11-fake-keypress-event.html
*/
+
+ /* FIXME */
+
+ return SCM_BOOL(1);
}
static void
@@ -131,15 +145,24 @@ gconf_test (char *test)
}
static void
+die (const char *reason)
+{
+ fprintf (stderr, "Fatal error: %s\n", reason);
+ exit (255);
+}
+
+static void
start_dbus_daemon ()
{
- FILE *dbus_input;
int pipes[2];
char text[10240];
char *cursor = text;
ssize_t size;
- pipe (pipes);
+ if (pipe (pipes)==-1)
+ {
+ die ("Can't create pipes to talk to dbus");
+ }
if (!(dbus_daemon = fork()))
{
@@ -177,7 +200,7 @@ start_gconf_daemon ()
gconf_test ("Atlanta");
}
-void
+static void
start_x_server ()
{
/* FIXME: Pick a sane number automagically */
@@ -217,7 +240,7 @@ start_guile ()
scm_c_define_gsubr("parent", 1, 0, 0, parent);
scm_c_define_gsubr("start-wm", 0, 0, 0, start_wm);
scm_c_define_gsubr("key-event", 2, 0, 0, key_event);
- scm_c_define_gsubr("gconf-set!", 2, 0, 0, gconf_set);
+ /* scm_c_define_gsubr("gconf-set!", 2, 0, 0, gconf_set); */
}
static void
@@ -238,14 +261,14 @@ run_test (char *name)
printf("%20s: ", name);
fflush(stdout);
- // Load the scheme function definitions
+ /* Load the scheme function definitions */
scm_c_primitive_load (name);
SCM result = scm_c_eval_string("(test)");
if (scm_is_string (result))
{
- int length;
+ unsigned int length;
char *raw_text = gh_scm2newstr (result, &length);
printf ("FAIL (%s)\n", raw_text);
free (raw_text);