Browse code

cfg_size macro renamed to cfg_sizeof to avoid a conflict with one of the functions in libconfuse, this library is used by one of the kamailio modules.

Acked by Miklos Tirpak.

Jan Janak authored on 26/02/2009 11:39:37
Showing 4 changed files
... ...
@@ -77,7 +77,7 @@ typedef struct _cfg_def {
77 77
 int cfg_declare(char *group_name, cfg_def_t *def, void *values, int def_size,
78 78
 			void **handler);
79 79
 
80
-#define cfg_size(gname) \
80
+#define cfg_sizeof(gname) \
81 81
 	sizeof(struct cfg_group_##gname)
82 82
 
83 83
 #define cfg_get(gname, handle, var) \
... ...
@@ -147,7 +147,7 @@ Each row consists of the following items:
147 147
 
148 148
 static int mod_init(void)
149 149
 {
150
-	if (cfg_declare("foo", cfg_def, &default_cfg, cfg_size(foo),
150
+	if (cfg_declare("foo", cfg_def, &default_cfg, cfg_sizeof(foo),
151 151
 			 &cfg_handle)
152 152
 	) {
153 153
 		/* error */
... ...
@@ -1988,7 +1988,7 @@ try_again:
1988 1988
 		goto error;
1989 1989
 	}
1990 1990
 	/* declare the core cfg before the module configs */
1991
-	if (cfg_declare("core", core_cfg_def, &default_core_cfg, cfg_size(core),
1991
+	if (cfg_declare("core", core_cfg_def, &default_core_cfg, cfg_sizeof(core),
1992 1992
 			&core_cfg)
1993 1993
 	) {
1994 1994
 		LOG(L_CRIT, "could not declare the core configuration\n");
... ...
@@ -707,7 +707,7 @@ static int mod_init(void)
707 707
 #endif
708 708
 
709 709
 	/* declare the configuration */
710
-	if (cfg_declare("tm", tm_cfg_def, &default_tm_cfg, cfg_size(tm),
710
+	if (cfg_declare("tm", tm_cfg_def, &default_tm_cfg, cfg_sizeof(tm),
711 711
 			 &tm_cfg)) {
712 712
 		LOG(L_ERR, "ERROR: mod_init: failed to declare the configuration\n");
713 713
 		return -1;