Skip to Content.
Sympa Menu

freetds - [freetds] $Id and include file

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] $Id and include file
  • Date: Tue, 19 Oct 2004 17:35:23 +0200

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




Archive powered by MHonArc 2.6.24.

Top of Page