[freetds] $Id and include file

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Tue Oct 19 11:35:23 EDT 2004


Some small analisy show that using these lines in include 

static char rcsid_tds_h[] = "$Id$";
static void *no_unused_tds_h_warn[] = { rcsid_tds_h,
no_unused_tds_h_warn };

cause a replication of this string for every library module. Also this
code goes on all programs that use tds include. I readed recently a
Samba coding style and they use size to determine if program can have
thread problems (just data should be null). After changing line above
into

static const char rcsid_tds_h[] = "$Id$";
static const void *const no_unused_tds_h_warn[] = { rcsid_tds_h,
no_unused_tds_h_warn };

code get placed in the same place of constants strings.

Just for statistics all $Id strings occupy about 13K of ODBC while all
ODBC occupy 260k (that is 5%).

Perhaps it would be better to use /* $Id */ in include and add const in
modules ??

freddy77


More information about the FreeTDS mailing list