Page 1 of 1

BOPM

Posted: Thu May 18, 2006 4:59 am
by Ping
Somebody has the config.c modified with the Patch for works in gcc4?

Posted: Fri May 19, 2006 11:29 am
by mexx3k
Exact the same question was posted some days ago in the bopm-list


i'll quote the answer by David Nelson for you ;)

From an earlier post of mine to the mailing list. The patch should work

Message below:

A C++ savvy friend of mine wrote a patch to make it work with GCC4, and
it compiled fine :)

Patch below:

<<<<<<<<<<<<<<<<<PATCH>>>>>>>>>>>>>>>>>>>>>>>>>>>

--- bopm.old/src/libopm/src/config.c 2003-06-20 06:18:44.000000000 +0200
+++ bopm-3.1.2/src/libopm/src/config.c 2006-04-14 20:39:20.000000000 +0200
@@ -90,16 +90,16 @@
break;

case OPM_TYPE_STRING:
- (char *) ret->vars = strdup("");
+ ret->vars = strdup("");
break;

case OPM_TYPE_ADDRESS:
- (opm_sockaddr *) ret->vars =
MyMalloc(sizeof(opm_sockaddr));
+ ret->vars = MyMalloc(sizeof(opm_sockaddr));
memset((opm_sockaddr *) ret->vars, 0, sizeof(opm_sockaddr));
break;

case OPM_TYPE_STRINGLIST:
- (OPM_LIST_T *) ret->vars = libopm_list_create();
+ ret->vars = libopm_list_create();
break;
default:
ret->vars = NULL;
@@ -188,7 +188,7 @@
case OPM_TYPE_STRING:
if((char *) config->vars[key] != NULL)
MyFree(config->vars[key]);
- (char *) config->vars[key] = strdup((char *) value);
+ config->vars[key] = strdup((char *) value);
break;

case OPM_TYPE_INT:

<<<<<<<<<<<<<<<<<END OF PATCH>>>>>>>>>>>>>>>>>>>>>

Posted: Sun May 21, 2006 10:03 am
by Ping
Did you tried that? I can't apply the patch :/