[GRASS5] [bug #4349] (grass) Segfault in several display
modules on x86_64
glynn at gclements.plus.com
Fri Apr 28 13:08:48 EDT 2006
> > > libdb is calling db_version, expecting to call its own function of
> > > that name, but it's actually calling the one in libgrass_dbmiclient.
> > >
> > > I'm not sure that there's any solution other than to rename the DBMI
> > > functions to use a different prefix (one which isn't already used by
> > > a common system library).
> > Maybe
> > db_gversion
> That's for that one function, there are lots of generic-named fns in the
> dmbi lib like db_delete() etc..
> maybe make them all dbmi_* ? I guess gdb_ is no good.. :)
That's what I thought. Then I remembered that the linker might not be
case sensitive. Then, I realised that if the linker isn't case
sensitive, using GRASS in a GTK+ is out of the question, as libgis
(G_*) will conflict with glib (g_*), e.g. G_malloc() vs g_malloc().
DBMI_* would probably be safe enough.
In any case, renaming all of the db_* functions isn't really an option
Doing it by hand is out of the question (275 source files). A script
to change identifiers beginning with db_ might change variable or type
Fortunately, the Berkely DB library only exports a few functions
beginning with "db_" (the main interface is via function pointers in
the DB structure). Apart from the 19 db_env_set_func_* functions, it
db_version is the only one which currently conflicts with the DBMI
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev