patches/ctrlproxy-02-sunpro.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 2194 b68ccec69b06
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2193
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     1
--- ctrlproxy-3.0.8.orig/configure.ac	2009-10-07 11:58:39.842762000 -0400
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     2
+++ ctrlproxy-3.0.8/configure.ac	2009-10-07 11:59:04.269585297 -0400
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     3
@@ -31,9 +31,15 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     4
 # Checks for programs.
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     5
 AC_PROG_CC
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     6
 AC_PROG_INSTALL
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     7
-AC_PATH_PROG(LD,ld)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     8
 AC_PATH_PROG(IRCDTORTURE,ircdtorture)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     9
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    10
+if test "$GCC" = "yes"; then
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    11
+	CFLAGS="$CFLAGS -ansi -Wall"
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    12
+	DYNAMIC="-rdynamic"
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    13
+fi
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    14
+AC_SUBST(GCC)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    15
+AC_SUBST(DYNAMIC)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    16
+
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    17
 AC_ARG_ENABLE(gcov,
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    18
 [ --enable-gcov		Enable GCOV support ],
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    19
 [ WITH_GCOV=1 ], [ WITH_GCOV=0 ])
2194
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    20
--- ctrlproxy-3.0.8.orig/Makefile.settings.in	Sat Dec  6 12:36:33 2008
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    21
+++ ctrlproxy-3.0.8/Makefile.settings.in	Wed Oct  7 15:01:53 2009
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    22
@@ -3,6 +3,8 @@
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    23
 LIBS = @LIBS@ @COMMON_LIBS@ 
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    24
 CC = @CC@
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    25
 LD = @CC@
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    26
+GCC = @GCC@
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    27
+DYNAMIC = @DYNAMIC@
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    28
 prefix = @prefix@
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    29
 exec_prefix = @exec_prefix@
b68ccec69b06 2009-10-07 Albert Lee <[email protected]>
trisk
parents: 2193
diff changeset
    30
 datarootdir = @datarootdir@
2193
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    31
--- ctrlproxy-3.0.8.orig/Makefile	2008-12-06 12:36:33.000000000 -0500
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    32
+++ ctrlproxy-3.0.8/Makefile	2009-10-07 11:57:11.853721092 -0400
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    33
@@ -18,7 +18,7 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    34
 CFLAGS += $(GNUTLS_CFLAGS)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    35
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    36
 CFLAGS+=-DHAVE_CONFIG_H -DDEFAULT_CONFIG_DIR=\"$(DEFAULT_CONFIG_DIR)\" -DHELPFILE=\"$(HELPFILE)\"
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    37
-CFLAGS+=-ansi -Wall -DMODULESDIR=\"$(modulesdir)\" -DSTRICT_MEMORY_ALLOCS=
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    38
+CFLAGS+=-DMODULESDIR=\"$(modulesdir)\" -DSTRICT_MEMORY_ALLOCS=
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    39
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    40
 LIBIRC_STATIC = libirc.a
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    41
 LIBIRC = $(LIBIRC_STATIC)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    42
@@ -103,11 +103,11 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    43
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    44
 linestack-cmd$(EXEEXT): src/linestack-cmd.o $(objs) $(LIBIRC)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    45
 	@echo Linking $@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    46
-	@$(LD) $(LIBS) -lreadline -rdynamic -o $@ $^
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    47
+	@$(CC) $(LIBS) -lreadline $(DYNAMIC) -o $@ $^
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    48
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    49
 ctrlproxy$(EXEEXT): src/main.o $(objs) $(LIBIRC)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    50
 	@echo Linking $@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    51
-	@$(LD) $(LDFLAGS) -rdynamic -o $@ $^ $(LIBS)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    52
+	@$(CC) $(LDFLAGS) $(DYNAMIC) -o $@ $^ $(LIBS)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    53
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    54
 src/settings.o: CFLAGS+=-DSYSCONFDIR=\"${sysconfdir}\"
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    55
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    56
@@ -119,11 +119,11 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    57
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    58
 ctrlproxyd$(EXEEXT): $(daemon_objs) $(objs) $(LIBIRC)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    59
 	@echo Linking $@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    60
-	@$(LD) $(LDFLAGS) -rdynamic -o $@ $^ $(LIBS)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    61
+	@$(CC) $(LDFLAGS) $(DYNAMIC) -o $@ $^ $(LIBS)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    62
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    63
 ctrlproxy-admin$(EXEEXT): src/admin-cmd.o
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    64
 	@echo Linking $@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    65
-	@$(LD) $(LDFLAGS) -rdynamic -o $@ $^ $(LIBS)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    66
+	@$(CC) $(LDFLAGS) $(DYNAMIC) -o $@ $^ $(LIBS)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    67
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    68
 %.o: %.c
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    69
 	@echo Compiling $<
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    70
@@ -215,7 +215,7 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    71
 	@ar -rcs $@ $^
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    72
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    73
 $(LIBIRC_SHARED): $(lib_objs)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    74
-	$(LD) -shared $(LDFLAGS) -Wl,-soname,$(LIBIRC_SONAME) -o $@ $^
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    75
+	$(CC) -shared $(LDFLAGS) -Wl,-soname,$(LIBIRC_SONAME) -o $@ $^
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    76
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    77
 cscope.out::
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    78
 	cscope -b -R
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    79
@@ -286,4 +286,6 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    80
 check-gdb: 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    81
 	$(MAKE) check-nofork DEBUGGER="gdb --args"
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    82
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    83
+ifeq ($(GCC),yes)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    84
 -include $(dep_files)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    85
+endif
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    86
--- ctrlproxy-3.0.8.orig/src/log_subst.c	2008-12-06 12:36:34.000000000 -0500
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    87
+++ ctrlproxy-3.0.8/src/log_subst.c	2009-10-07 11:03:11.593731248 -0400
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    88
@@ -30,7 +30,7 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    89
 struct log_mapping {
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    90
 	char *command;
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    91
 	char subst;
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    92
-	unsigned int index;
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    93
+	size_t index;
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    94
 	/* If index is -1 */
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    95
 	char *(*callback) (struct subst_context *subst_ctx, 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    96
 					   const struct irc_line *line,
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    97
@@ -161,20 +161,20 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    98
 }
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    99
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   100
 static struct log_mapping mappings[] = {
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   101
-	{NULL, '@', -1, get_identifier },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   102
-	{NULL, 'h', -1, get_hours },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   103
-	{NULL, 'M', -1, get_minutes },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   104
-	{NULL, 's', -1, get_seconds },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   105
-	{NULL, 'd', -1, get_day },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   106
-	{NULL, 'B', -1, get_month },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   107
-	{NULL, 'Y', -1, get_year },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   108
-	{NULL, 'e', -1, get_seconds_since_1970 },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   109
-	{NULL, 'b', -1, get_monthname },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   110
-	{NULL, 'n', -1, get_nick },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   111
-	{NULL, 'u', -1, get_user },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   112
-	{NULL, 'N', -1, get_network },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   113
-	{NULL, 'S', -1, get_server },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   114
-	{NULL, '%', -1, get_percent },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   115
+	{NULL, '@', (size_t)-1, get_identifier },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   116
+	{NULL, 'h', (size_t)-1, get_hours },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   117
+	{NULL, 'M', (size_t)-1, get_minutes },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   118
+	{NULL, 's', (size_t)-1, get_seconds },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   119
+	{NULL, 'd', (size_t)-1, get_day },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   120
+	{NULL, 'B', (size_t)-1, get_month },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   121
+	{NULL, 'Y', (size_t)-1, get_year },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   122
+	{NULL, 'e', (size_t)-1, get_seconds_since_1970 },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   123
+	{NULL, 'b', (size_t)-1, get_monthname },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   124
+	{NULL, 'n', (size_t)-1, get_nick },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   125
+	{NULL, 'u', (size_t)-1, get_user },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   126
+	{NULL, 'N', (size_t)-1, get_network },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   127
+	{NULL, 'S', (size_t)-1, get_server },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   128
+	{NULL, '%', (size_t)-1, get_percent },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   129
 	{"JOIN", 'c', 1, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   130
 	{"PART", 'c', 1, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   131
 	{"PART", 'm', 2, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   132
@@ -192,7 +192,7 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   133
 	{"TOPIC", 't', 2, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   134
 	{"MODE", 't', 1, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   135
 	{"MODE", 'p', 2, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   136
-	{"MODE", 'c', -1, get_modechanges },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   137
+	{"MODE", 'c', (size_t)-1, get_modechanges },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   138
 	{"NICK", 'r', 1, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   139
 	{NULL, '0', 0, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   140
 	{NULL, '1', 1, NULL },
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   141
--- ctrlproxy-3.0.8.orig/src/settings.c	2008-12-06 12:36:34.000000000 -0500
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   142
+++ ctrlproxy-3.0.8/src/settings.c	2009-10-07 10:54:42.998143329 -0400
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   143
@@ -1009,6 +1009,9 @@
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   144
 	g_strfreev(groups);
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   145
 }
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   146
 
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   147
+#ifndef __STRING
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   148
+#define __STRING(x) #x
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   149
+#endif
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   150
 #define FETCH_SETTING(data, kf, section, prefix, name) (data)->name = g_key_file_get_string((kf), (section), prefix __STRING(name), NULL)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   151
 #define STORE_SETTING(data, kf, section, prefix, name) g_key_file_set_string((kf), (section), prefix __STRING(name), (data)->name)
4ec99bea41f9 2009-10-07 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   152