My favorites | Sign in
Project Home Downloads Wiki Issues Source Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 167: Need version macros in dev headers and version API
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Sep 2009


Sign in to add a comment
 
Reported by vic...@gmail.com, Sep 4, 2009
Application that depends on tcmalloc would like to find out which version
the tcmalloc is, so it can warn about old versions at build/configure phase
and whether there is a mismatch between headers and libraries.

Something like TC_VERSION macros and tc_version() a la Berkeley DB headers
would be great.
Sep 10, 2009
Project Member #1 csilv...@gmail.com
Good idea!  I'll look into getting tc_version (but probably not TC_VERSION, since I'd
rather avoid macros until there's an identified need for it) into the next release.
Status: Started
Labels: Type-Enhancement Priority-Medium
Sep 10, 2009
#2 vic...@gmail.com
Both (macros and API) are needed for checking header/library mismatch, especially for
shared libraries. Such mismatch (header has different struct size/members or function
arguments than those in the library) can lead to crashes that are hard to track down,
especially for C linkage, where only function names are used at link time.
Sep 10, 2009
Project Member #3 csilv...@gmail.com
OK, I can look into adding a macro.  I couldn't find any documentation of DB_VERSION
from libdb; can you point me to what you were thinking the macro should look like?
Sep 10, 2009
#4 vic...@gmail.com
Excerpts from /usr/include/db.h:

/*
 * Berkeley DB version information.
 */
#define DB_VERSION_MAJOR        4
#define DB_VERSION_MINOR        7
#define DB_VERSION_PATCH        25
#define DB_VERSION_STRING       "Berkeley DB 4.7.25: (May 15, 2008)"

char *db_version __P((int *major, int *minor, int *patch));
Sep 11, 2009
Project Member #5 csilv...@gmail.com
I've added a similar set of macros and functions to perftools 1.4, just released.
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting