diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/config/config libcompizconfig-0.8.4/config/config
--- libcompizconfig-0.8.4.orig/config/config 2009-10-15 08:06:12.324613010 +0200
+++ libcompizconfig-0.8.4/config/config 2009-10-15 08:06:29.308065755 +0200
@@ -14,7 +14,8 @@ integration = true
plugin_list_autosort = true
[general]
-backend = ini
+backend = gconf
+integration = true
plugin_list_autosort = true
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/configure.ac libcompizconfig-0.8.4/configure.ac
--- libcompizconfig-0.8.4.orig/configure.ac 2009-10-15 08:06:12.323163716 +0200
+++ libcompizconfig-0.8.4/configure.ac 2009-10-15 08:06:29.308326426 +0200
@@ -1,6 +1,6 @@
AC_PREREQ(2.57)
-AC_INIT([libcompizconfig],esyscmd(. ./VERSION;echo -n $VERSION), [dev@opencompositing.org])
+AC_INIT([libcompizconfig],esyscmd(. ./VERSION;echo $VERSION | tr -d "\n"), [dev@opencompositing.org])
#AC_CONFIG_AUX_DIR(config)
@@ -17,6 +17,7 @@ AC_PROG_CPP
AC_PROG_LIBTOOL
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
+AC_CHECK_FUNCS(va_copy __va_copy vasprintf asprintf strcasestr strsep)
IT_PROG_INTLTOOL([0.35.0])
AC_SUBST(ALL_LINGUAS)
AM_GLIB_GNU_GETTEXT
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/Makefile.am libcompizconfig-0.8.4/src/Makefile.am
--- libcompizconfig-0.8.4.orig/src/Makefile.am 2009-10-15 08:06:12.325570865 +0200
+++ libcompizconfig-0.8.4/src/Makefile.am 2009-10-15 08:06:29.308522964 +0200
@@ -43,6 +43,8 @@ libcompizconfig_la_SOURCES = \
ini.c \
bindings.c \
filewatch.c \
+ compat.c \
+ compat.h \
ccs-private.h \
iniparser.h
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/bindings.c libcompizconfig-0.8.4/src/bindings.c
--- libcompizconfig-0.8.4.orig/src/bindings.c 2009-10-15 08:06:12.325807893 +0200
+++ libcompizconfig-0.8.4/src/bindings.c 2009-10-15 08:06:29.308778268 +0200
@@ -38,6 +38,7 @@
#include <X11/Xlib.h>
#include <ccs.h>
+#include "compat.h"
#define CompAltMask (1 << 16)
#define CompMetaMask (1 << 17)
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/compat.c libcompizconfig-0.8.4/src/compat.c
--- libcompizconfig-0.8.4.orig/src/compat.c 1970-01-01 01:00:00.000000000 +0100
+++ libcompizconfig-0.8.4/src/compat.c 2009-10-15 08:06:29.309035158 +0200
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2007 Albert Lee <trisk@acm.jhu.edu>.
+ *
+ * Copyright (c) 2004 Darren Tucker.
+ *
+ * Based originally on asprintf.c from OpenBSD:
+ * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "config.h"
+#include "compat.h"
+
+#ifndef HAVE_VASPRINTF
+#include <errno.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#ifndef VA_COPY
+# ifdef HAVE_VA_COPY
+# define VA_COPY(dest, src) va_copy(dest, src)
+# else
+# ifdef HAVE___VA_COPY
+# define VA_COPY(dest, src) __va_copy(dest, src)
+# else
+# define VA_COPY(dest, src) (dest) = (src)
+# endif
+# endif
+#endif
+
+#define INIT_SZ 128
+
+static int vasprintf(char **str, const char *fmt, va_list ap);
+
+static int vasprintf(char **str, const char *fmt, va_list ap)
+{
+ int ret = -1;
+ va_list ap2;
+ char *string, *newstr;
+ size_t len;
+
+ VA_COPY(ap2, ap);
+ if ((string = malloc(INIT_SZ)) == NULL)
+ goto fail;
+
+ ret = vsnprintf(string, INIT_SZ, fmt, ap2);
+ if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
+ *str = string;
+ } else if (ret == INT_MAX) { /* shouldn't happen */
+ goto fail;
+ } else { /* bigger than initial, realloc allowing for nul */
+ len = (size_t)ret + 1;
+ if ((newstr = realloc(string, len)) == NULL) {
+ free(string);
+ goto fail;
+ } else {
+ va_end(ap2);
+ VA_COPY(ap2, ap);
+ ret = vsnprintf(newstr, len, fmt, ap2);
+ if (ret >= 0 && (size_t)ret < len) {
+ *str = newstr;
+ } else { /* failed with realloc'ed string, give up */
+ free(newstr);
+ goto fail;
+ }
+ }
+ }
+ va_end(ap2);
+ return (ret);
+
+fail:
+ *str = NULL;
+ errno = ENOMEM;
+ va_end(ap2);
+ return (-1);
+}
+#endif
+
+#ifndef HAVE_ASPRINTF
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+int asprintf(char **str, const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ *str = NULL;
+ va_start(ap, fmt);
+ ret = vasprintf(str, fmt, ap);
+ va_end(ap);
+
+ return ret;
+}
+#endif
+
+#ifndef HAVE_STRCASESTR
+#include <ctype.h>
+#include <string.h>
+char *strcasestr (char *h, char *n)
+{
+ char *hp, *np = n, *match = 0;
+
+ if(!*np) {
+ return hp;
+ }
+
+ for (hp = h; *hp; hp++) {
+ if (toupper(*hp) == toupper(*np)) {
+ if (!match) {
+ match = hp;
+ }
+ if(!*++np) {
+ return match;
+ }
+ } else {
+ if (match) {
+ match = 0;
+ np = n;
+ }
+ }
+ }
+
+ return NULL;
+}
+#endif
+
+#ifndef HAVE_STRSEP
+#include <string.h>
+
+char *strsep(char **stringp, const char *delim)
+{
+ char *s = *stringp;
+ char *e;
+
+ if (!s)
+ return NULL;
+
+ e = strpbrk(s, delim);
+ if (e)
+ *e++ = '\0';
+
+ *stringp = e;
+ return s;
+}
+#endif
+
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/compat.h libcompizconfig-0.8.4/src/compat.h
--- libcompizconfig-0.8.4.orig/src/compat.h 1970-01-01 01:00:00.000000000 +0100
+++ libcompizconfig-0.8.4/src/compat.h 2009-10-15 08:06:29.309190433 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2007 Albert Lee <trisk@acm.jhu.edu>.
+ *
+ * Copyright (c) 2004 Darren Tucker.
+ *
+ * Based originally on asprintf.c from OpenBSD:
+ * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _COMPAT_H
+#include "config.h"
+
+#ifndef HAVE_ASPRINTF
+int asprintf(char **str, const char *fmt, ...);
+#endif
+
+#ifndef HAVE_STRCASESTR
+char *strcasestr (char *h, char *n);
+#endif
+
+#ifndef HAVE_STRSEP
+char *strsep(char **stringp, const char *delim);
+#endif
+#endif /* _COMPAT_H */
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/compiz.cpp libcompizconfig-0.8.4/src/compiz.cpp
--- libcompizconfig-0.8.4.orig/src/compiz.cpp 2009-10-15 08:06:12.325409002 +0200
+++ libcompizconfig-0.8.4/src/compiz.cpp 2009-10-15 08:06:29.310399989 +0200
@@ -44,6 +44,7 @@ extern "C"
#include <compiz-core.h>
#include <ccs.h>
#include "ccs-private.h"
+#include "compat.h"
}
extern int xmlLoadExtDtdDefaultValue;
@@ -3014,7 +3015,7 @@ ccsLoadPlugin (CCSContext * context, cha
void
ccsLoadPlugins (CCSContext * context)
{
- D (D_FULL, "Adding plugins\n");
+ D (D_FULL, "Adding plugins\n", NULL);
#ifdef USE_PROTOBUF
initPBLoading ();
@@ -3134,7 +3135,7 @@ ccsLoadPluginSettings (CCSPlugin * plugi
writePBFile (pPrivate->pbFilePath, (PluginMetadata *) pluginPBToWrite,
NULL, &xmlStat);
#endif
- D (D_FULL, "done\n");
+ D (D_FULL, "done\n", NULL);
collateGroups (pPrivate);
ccsReadPluginSettings (plugin);
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/config.c libcompizconfig-0.8.4/src/config.c
--- libcompizconfig-0.8.4.orig/src/config.c 2009-10-15 08:06:12.325461134 +0200
+++ libcompizconfig-0.8.4/src/config.c 2009-10-15 08:06:29.310619201 +0200
@@ -26,6 +26,7 @@
#include <string.h>
#include "ccs-private.h"
+#include "compat.h"
#define SETTINGPATH "compiz/compizconfig"
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/ini.c libcompizconfig-0.8.4/src/ini.c
--- libcompizconfig-0.8.4.orig/src/ini.c 2009-10-15 08:06:12.325723780 +0200
+++ libcompizconfig-0.8.4/src/ini.c 2009-10-15 08:06:29.310909907 +0200
@@ -26,6 +26,7 @@
#include <ccs.h>
#include "iniparser.h"
+#include "compat.h"
/**
* Creates the parent directory for @fileName, recursively creating a directory
diff -x '*~' -x '*.*~' -x '*.rej' -x '*.orig' -Nrup libcompizconfig-0.8.4.orig/src/main.c libcompizconfig-0.8.4/src/main.c
--- libcompizconfig-0.8.4.orig/src/main.c 2009-10-15 08:06:12.325656353 +0200
+++ libcompizconfig-0.8.4/src/main.c 2009-10-15 08:06:29.311549238 +0200
@@ -37,6 +37,7 @@
#include "ccs-private.h"
#include "iniparser.h"
+#include "compat.h"
Bool basicMetadata = FALSE;