xrootd
XrdVersion.hh
Go to the documentation of this file.
00001 /******************************************************************************/
00002 /*                                                                            */
00003 /*                      X r d V e r s i o n . h h . i n                       */
00004 /*                                                                            */
00005 /* (c) 2012 by the Board of Trustees of the Leland Stanford, Jr., University  */
00006 /*                                                                            */
00007 /* This file is part of the XRootD software suite.                            */
00008 /*                                                                            */
00009 /* XRootD is free software: you can redistribute it and/or modify it under    */
00010 /* the terms of the GNU Lesser General Public License as published by the     */
00011 /* Free Software Foundation, either version 3 of the License, or (at your     */
00012 /* option) any later version.                                                 */
00013 /*                                                                            */
00014 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
00015 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
00016 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
00017 /* License for more details.                                                  */
00018 /*                                                                            */
00019 /* You should have received a copy of the GNU Lesser General Public License   */
00020 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
00021 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
00022 /*                                                                            */
00023 /* The copyright holder's institutional names and contributor's names may not */
00024 /* be used to endorse or promote products derived from this software without  */
00025 /* specific prior written permission of the institution or contributor.       */
00026 /******************************************************************************/
00027 
00028 // this file is automatically updated by the genversion.sh script
00029 // if you touch anything make sure that it still works
00030 
00031 #ifndef __XRD_VERSION_H__
00032 #define __XRD_VERSION_H__
00033 
00034 #define XrdVERSION  "v3.3.2"
00035 
00036 // Numeric representation of the version tag
00037 // The format for the released code is: xyyzz, where: x is the major version,
00038 // y is the minor version and zz is the bugfix revision number
00039 // For the non-released code the value is 1000000
00040 #define XrdVNUMUNK  1000000
00041 #define XrdVNUMBER  30302
00042 
00043 #if XrdDEBUG
00044 #define XrdVSTRING XrdVERSION "_dbg"
00045 #else
00046 #define XrdVSTRING XrdVERSION
00047 #endif
00048 
00049 #define XrdDEFAULTPORT 1094;
00050 
00051 // The following macros extract version digits from a numeric version number
00052 #define XrdMajorVNUM(x) x/10000
00053 #define XrdMinorVNUM(x) x/100%100
00054 #define XrdPatchVNUM(x) x%100
00055 
00056 // The following structure defines the standard way to record a version. You can
00057 // determine component version numbers within an object file by simply executing
00058 // "strings <objectfile> | grep '@V:'".
00059 //
00060 struct XrdVersionInfo {int vNum; const char vOpt; const char vPfx[3];\
00061                                  const char vStr[40];};
00062 
00063 // Macro to define the suffix to use when generating the extern version symbol.
00064 // This is used by SysPlugin. We cannot use it here as cpp does not expand the
00065 // macro when catenating tokens togther and we want to avoid yet another macro.
00066 //
00067 #define XrdVERSIONINFOSFX "_"
00068 
00069 // The following macro defines a local copy of version information. Parameters:
00070 // x  -> The variable name of the version information structure
00071 // y  -> An unquoted 1- to 15-character component name (e.g. cmsd, seckrb5)
00072 // vn -> The integer version number to be used
00073 // vs -> The string  version number to be used
00074 //
00075 #define XrdVERSIONINFODEF(x,y,vn,vs) \
00076         XrdVersionInfo x = \
00077         {vn, (sizeof(#y)-1) & 0x0f,{'@','V',':'}, #y " " vs}
00078 
00079 // The following macro defines an externally referencable structure that records
00080 // the version used to compile code. It is used by the plugin loader. Parms:
00081 // x -> The variable name of the version information structure
00082 // y -> An unquoted 1- to 15-character component name (e.g. cmsd, seckrb5, etc).
00083 //
00084 #define XrdVERSIONINFO(x,y) \
00085         extern "C" {XrdVERSIONINFODEF(x##_,y,XrdVNUMBER,XrdVERSION);}
00086 
00087 // The following macro is an easy way to declare externally defined version
00088 // information. This macro must be used at file level.
00089 //
00090 #define XrdVERSIONINFOREF(x) extern "C" XrdVersionInfo x##_
00091 
00092 // The following macro can be used to reference externally defined version
00093 // information. As the composition of the symbolic name may change you should
00094 // use this macro to refer to the version information declaration.
00095 //
00096 #define XrdVERSIONINFOVAR(x) x##_
00097 #endif