BOPM
Moderator: Supporters
BOPM
Somebody has the config.c modified with the Patch for works in gcc4?
Exact the same question was posted some days ago in the bopm-list
i'll quote the answer by David Nelson for you
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>>>>>>>>>>>>>>>>>>>>>