Feature Requests item #432532, was updated on 2001-06-12 13:29
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=353152&aid=432532&group_id=3152
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Scott Goodwin (scottg)
Assigned to: Nobody/Anonymous (nobody)
Summary: Better version numbering in source code
Initial Comment:
I'd like to see better version numbering in the
AOLserver source code to make it easier for modules to
conditionally compile chunks based on the server's
version release. Right now, NSD_VERSION is defined in
nsd/nsd.h like this:
#define NSD_VERSION 3.4
However, this is a pain to use for #if preprocessing
statements.
Case in point. I need the nsopenssl module to be able
to determine whether the version number is greater
than 3.4 (or less than 4). It's not easy to do this
when NSD_VERSION is set to 4.0b or 3.4. I cannot do
this, for example:
#if NSD_VERSION > 3.4
because the preprocessor thinks 3.4 is a string, not a
number.
OpenSSL version numbers are used like this:
#if SSLEAY_VERSION_NUMBER >= 0x0090581fL
... stuff ...
#else
... other stuff ...
#endif
I propose we do something a little less cryptic:
1. create an include/version.h file
2. in that file, place the following:
#define AOLSERVER_MAJOR_VERSION 3
#define AOLSERVER_MINOR_VERSION 4
#define AOLSERVER_RELEASE_STATUS beta
This would allow me to do the following:
#if AOLSERVER_MAJOR_RELEASE < 4
... compile for aolserver 3.x ...
#else
... compile for aolserver 4.x ...
#endif
It would also allow me to put in code for alpha and
beta releases of the server that won't affect anyone
who is compiling against a released version.
It's too late to do this for the 3.x series, but if we
start out like this with version 4.x, I can do this:
#ifndef AOLSERVER_MAJOR_RELEASE
... assume it's 3.x ...
#else
... assume it's 4.x ...
#endif
I have commit access to the repository to do this, but
I want others to review before I make this happen.
Maybe there is a better way to do this without
altering the source.
thanks,
/s.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=353152&aid=432532&group_id=3152