BOPM

Talk about pretty much anything here, but DO NOT USE FOR SUPPORT.

Moderator: Supporters

Locked
Ping
Posts: 16
Joined: Fri Nov 04, 2005 11:49 am
Contact:

BOPM

Post by Ping »

Somebody has the config.c modified with the Patch for works in gcc4?
mexx3k
Posts: 17
Joined: Sun Apr 10, 2005 8:54 pm
Location: Chaoz-IRC
Contact:

Post 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>>>>>>>>>>>>>>>>>>>>>
Ping
Posts: 16
Joined: Fri Nov 04, 2005 11:49 am
Contact:

Post by Ping »

Did you tried that? I can't apply the patch :/
Locked