patches/compizconfig-backend-gconf-01-solaris-port.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 18110 93461edb1490
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18110
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     1
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/configure.ac compizconfig-backend-gconf-0.7.6.modif/configure.ac
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     2
--- compizconfig-backend-gconf-0.7.6/configure.ac	2008-05-29 14:59:03.000000000 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     3
+++ compizconfig-backend-gconf-0.7.6.modif/configure.ac	2008-06-16 15:21:56.365882156 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     4
@@ -1,12 +1,12 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     5
 AC_PREREQ(2.57)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     6
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     7
-AC_INIT([compizconfig-backend-gconf],esyscmd(. ./VERSION;echo -n $VERSION), [[email protected]])
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     8
+AC_INIT([compizconfig-backend-gconf],esyscmd(. ./VERSION;echo $VERSION | tr -d "\n"), [[email protected]])
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     9
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    10
 #AC_CONFIG_AUX_DIR(config)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    11
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    12
 AM_INIT_AUTOMAKE([1.9 dist-bzip2])
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    13
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    14
-#AC_CONFIG_HEADER([config.h])
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    15
+AC_CONFIG_HEADER([config.h])
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    16
 AM_MAINTAINER_MODE
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    17
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    18
 AC_ISC_POSIX
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    19
@@ -15,6 +15,7 @@ AC_PROG_CPP
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    20
 AC_PROG_LIBTOOL
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    21
 AC_HEADER_STDC
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    22
 AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    23
+AC_CHECK_FUNCS(va_copy __va_copy vasprintf asprintf strsep)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    24
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    25
 if test "x$GCC" = "xyes"; then
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    26
   case " $CFLAGS " in
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    27
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/Makefile.am compizconfig-backend-gconf-0.7.6.modif/settings-backend/Makefile.am
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    28
--- compizconfig-backend-gconf-0.7.6/settings-backend/Makefile.am	2008-05-29 14:59:03.000000000 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    29
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/Makefile.am	2008-06-16 15:21:56.367784131 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    30
@@ -6,7 +6,7 @@ INCLUDES = @GLIB_CFLAGS@ \
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    31
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    32
 libgconf_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    33
 libgconf_la_LIBADD = @CCS_LIBS@ @GCONF_LIBS@ @GLIB_LIBS@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    34
-libgconf_la_SOURCES = gconf.c
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    35
+libgconf_la_SOURCES = gconf.c compat.c
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    36
 backenddir = $(libdir)/compizconfig/backends
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    37
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    38
 METASOURCES = AUTO
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    39
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/compat.c compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.c
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    40
--- compizconfig-backend-gconf-0.7.6/settings-backend/compat.c	1970-01-01 01:00:00.000000000 +0100
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    41
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.c	2008-06-16 15:21:56.366247598 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    42
@@ -0,0 +1,131 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    43
+/*
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    44
+ * Copyright (c) 2007 Albert Lee <[email protected]>.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    45
+ * 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    46
+ * Copyright (c) 2004 Darren Tucker.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    47
+ *
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    48
+ * Based originally on asprintf.c from OpenBSD:
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    49
+ * Copyright (c) 1997 Todd C. Miller <[email protected]>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    50
+ *
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    51
+ * Permission to use, copy, modify, and distribute this software for any
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    52
+ * purpose with or without fee is hereby granted, provided that the above
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    53
+ * copyright notice and this permission notice appear in all copies.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    54
+ * 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    55
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    56
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    57
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    58
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    59
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    60
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    61
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    62
+ * OTHER DEALINGS IN THE SOFTWARE.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    63
+ */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    64
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    65
+#include "config.h"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    66
+#include "compat.h"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    67
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    68
+#ifndef HAVE_VASPRINTF
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    69
+#include <errno.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    70
+#include <stdio.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    71
+#include <stdarg.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    72
+#include <stdlib.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    73
+#include <limits.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    74
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    75
+#ifndef VA_COPY
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    76
+# ifdef HAVE_VA_COPY
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    77
+#  define VA_COPY(dest, src) va_copy(dest, src)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    78
+# else
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    79
+#  ifdef HAVE___VA_COPY
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    80
+#   define VA_COPY(dest, src) __va_copy(dest, src)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    81
+#  else
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    82
+#   define VA_COPY(dest, src) (dest) = (src)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    83
+#  endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    84
+# endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    85
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    86
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    87
+#define INIT_SZ	128
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    88
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    89
+static int vasprintf(char **str, const char *fmt, va_list ap);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    90
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    91
+static int vasprintf(char **str, const char *fmt, va_list ap)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    92
+{
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    93
+	int ret = -1;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    94
+	va_list ap2;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    95
+	char *string, *newstr;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    96
+	size_t len;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    97
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    98
+	VA_COPY(ap2, ap);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    99
+	if ((string = malloc(INIT_SZ)) == NULL)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   100
+		goto fail;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   101
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   102
+	ret = vsnprintf(string, INIT_SZ, fmt, ap2);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   103
+	if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   104
+		*str = string;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   105
+	} else if (ret == INT_MAX) { /* shouldn't happen */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   106
+		goto fail;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   107
+	} else {	/* bigger than initial, realloc allowing for nul */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   108
+		len = (size_t)ret + 1;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   109
+		if ((newstr = realloc(string, len)) == NULL) {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   110
+			free(string);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   111
+			goto fail;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   112
+		} else {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   113
+			va_end(ap2);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   114
+			VA_COPY(ap2, ap);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   115
+			ret = vsnprintf(newstr, len, fmt, ap2);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   116
+			if (ret >= 0 && (size_t)ret < len) {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   117
+				*str = newstr;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   118
+			} else { /* failed with realloc'ed string, give up */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   119
+				free(newstr);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   120
+				goto fail;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   121
+			}
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   122
+		}
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   123
+	}
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   124
+	va_end(ap2);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   125
+	return (ret);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   126
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   127
+fail:
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   128
+	*str = NULL;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   129
+	errno = ENOMEM;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   130
+	va_end(ap2);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   131
+	return (-1);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   132
+}
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   133
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   134
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   135
+#ifndef HAVE_ASPRINTF
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   136
+#include <stdio.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   137
+#include <stdarg.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   138
+#include <stdlib.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   139
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   140
+int asprintf(char **str, const char *fmt, ...)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   141
+{
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   142
+	va_list ap;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   143
+	int ret;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   144
+	
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   145
+	*str = NULL;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   146
+	va_start(ap, fmt);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   147
+	ret = vasprintf(str, fmt, ap);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   148
+	va_end(ap);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   149
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   150
+	return ret;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   151
+}
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   152
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   153
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   154
+#ifndef HAVE_STRSEP
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   155
+#include <string.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   156
+    	
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   157
+char *strsep(char **stringp, const char *delim)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   158
+{
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   159
+	char *s = *stringp;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   160
+	char *e;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   161
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   162
+	if (!s)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   163
+		return NULL;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   164
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   165
+	e = strpbrk(s, delim);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   166
+	if (e)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   167
+		*e++ = '\0';
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   168
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   169
+	*stringp = e;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   170
+	return s;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   171
+}
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   172
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   173
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   174
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/compat.h compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.h
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   175
--- compizconfig-backend-gconf-0.7.6/settings-backend/compat.h	1970-01-01 01:00:00.000000000 +0100
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   176
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.h	2008-06-16 15:21:56.366500278 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   177
@@ -0,0 +1,31 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   178
+/*
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   179
+ * Copyright (c) 2007 Albert Lee <[email protected]>.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   180
+ * 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   181
+ * Copyright (c) 2004 Darren Tucker.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   182
+ *
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   183
+ * Based originally on asprintf.c from OpenBSD:
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   184
+ * Copyright (c) 1997 Todd C. Miller <[email protected]>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   185
+ *
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   186
+ * Permission to use, copy, modify, and distribute this software for any
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   187
+ * purpose with or without fee is hereby granted, provided that the above
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   188
+ * copyright notice and this permission notice appear in all copies.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   189
+ * 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   190
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   191
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   192
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   193
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   194
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   195
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   196
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   197
+ * OTHER DEALINGS IN THE SOFTWARE.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   198
+ */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   199
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   200
+#include "config.h"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   201
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   202
+#ifndef HAVE_ASPRINTF
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   203
+int asprintf(char **str, const char *fmt, ...);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   204
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   205
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   206
+#ifndef HAVE_STRSEP
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   207
+char *strsep(char **stringp, const char *delim);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   208
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   209
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/gconf.c compizconfig-backend-gconf-0.7.6.modif/settings-backend/gconf.c
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   210
--- compizconfig-backend-gconf-0.7.6/settings-backend/gconf.c	2008-05-29 14:59:03.000000000 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   211
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/gconf.c	2008-06-16 15:21:56.367512110 +0200
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   212
@@ -24,6 +24,9 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   213
  *
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   214
  **/
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   215
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   216
+#include "config.h"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   217
+#include "compat.h"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   218
+
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   219
 #define _GNU_SOURCE
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   220
 #include <stdio.h>
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
   221
 #include <stdlib.h>