tcpdump mailing list archives

Re: version.h breaks for -current


From: Guy Harris <gharris () sonic net>
Date: Thu, 13 Feb 2003 00:00:19 -0800

On Wed, Feb 12, 2003 at 03:18:46PM +1100, Darren Reed wrote:
Somehow this doesn't look right for version.h:

current-cvs#define VERSION_MAJOR
current-cvs#define VERSION_MINOR
current-cvs.tcpdump.org#define VERSION_DOTDOT 02.11

It turns out that, on many of the UNIXes I tested, if you have a
*static* string in a shared library, and return that string from a
function, the return value of the function will reflect the version of
the shared library being used by the program calling that function, not
the version of the shared library with which that program was linked.

I don't have an IRIX system on which to try it, but at least on SunOS
5.x, Digital UNIX 4.0, AIX 4.3, FreeBSD 3.4, some version of Red Hat
Linux, HP-UX 11.00, and MacOS X 10.1, the return value of a small test
function reflected the value of the string in the library with which the
program was linked.

Therefore, we can just put the version string definition into
"version.h" and return that string, rather than constructing the string
at run time.

I've checked in that change, so it should Just Work.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: