metacity r4085 - in branches/veracity: . test/veracity
- From: tthurman svn gnome org
- To: svn-commits-list gnome org
- Subject: metacity r4085 - in branches/veracity: . test/veracity
- Date: Fri, 23 Jan 2009 04:12:06 +0000 (UTC)
Author: tthurman
Date: Fri Jan 23 04:12:06 2009
New Revision: 4085
URL: http://svn.gnome.org/viewvc/metacity?rev=4085&view=rev
Log:
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:
Modified:
branches/veracity/ChangeLog
branches/veracity/configure.in
branches/veracity/test/veracity/Makefile.am
branches/veracity/test/veracity/veracity.c
Modified: branches/veracity/configure.in
==============================================================================
--- branches/veracity/configure.in (original)
+++ branches/veracity/configure.in Fri Jan 23 04:12:06 2009
@@ -252,7 +252,7 @@
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
Modified: branches/veracity/test/veracity/Makefile.am
==============================================================================
--- branches/veracity/test/veracity/Makefile.am (original)
+++ branches/veracity/test/veracity/Makefile.am Fri Jan 23 04:12:06 2009
@@ -2,15 +2,11 @@
@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
Modified: branches/veracity/test/veracity/veracity.c
==============================================================================
--- branches/veracity/test/veracity/veracity.c (original)
+++ branches/veracity/test/veracity/veracity.c Fri Jan 23 04:12:06 2009
@@ -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 @@
gboolean verbose = FALSE;
+SCM make_window(void);
+SCM parent(SCM raw_window);
+SCM make_window(void);
+
SCM
make_window()
{
@@ -68,8 +79,6 @@
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 @@
/* have to wait a moment here while metacity starts up */
sleep(2);
+ return SCM_BOOL(1);
}
static SCM
@@ -112,6 +122,10 @@
* 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 @@
}
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 @@
gconf_test ("Atlanta");
}
-void
+static void
start_x_server ()
{
/* FIXME: Pick a sane number automagically */
@@ -217,7 +240,7 @@
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 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]