xrootd
XrdVersion.hh
Go to the documentation of this file.
1 /******************************************************************************/
2 /* */
3 /* X r d V e r s i o n . h h . i n */
4 /* */
5 /* (c) 2012 by the Board of Trustees of the Leland Stanford, Jr., University */
6 /* */
7 /* This file is part of the XRootD software suite. */
8 /* */
9 /* XRootD is free software: you can redistribute it and/or modify it under */
10 /* the terms of the GNU Lesser General Public License as published by the */
11 /* Free Software Foundation, either version 3 of the License, or (at your */
12 /* option) any later version. */
13 /* */
14 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
15 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
16 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
17 /* License for more details. */
18 /* */
19 /* You should have received a copy of the GNU Lesser General Public License */
20 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
21 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
22 /* */
23 /* The copyright holder's institutional names and contributor's names may not */
24 /* be used to endorse or promote products derived from this software without */
25 /* specific prior written permission of the institution or contributor. */
26 /******************************************************************************/
27 
28 #ifndef __XRD_VERSION_H__
29 #define __XRD_VERSION_H__
30 
31 #define XrdVERSION "v5.6.2"
32 
33 // Numeric representation of the version tag
34 // The format for the released code is: xyyzz, where: x is the major version,
35 // y is the minor version and zz is the bugfix revision number
36 // For the non-released code the value is 1000000
37 #define XrdVNUMUNK 1000000
38 #define XrdVNUMBER 50602
39 
40 #if XrdDEBUG
41 #define XrdVSTRING XrdVERSION "_dbg"
42 #else
43 #define XrdVSTRING XrdVERSION
44 #endif
45 
46 // The following defines the shared library version number of any plug-in.
47 // Generally, all plug-ins have a uniform version number releative to a
48 // specific compilation. This version is appended to the so-name and for
49 // dylibs becomes part of he actual filename (MacOS format).
50 //
51 #ifndef XRDPLUGIN_SOVERSION
52 #define XRDPLUGIN_SOVERSION "5"
53 #endif
54 
55 #define XrdDEFAULTPORT 1094;
56 
57 // The following macros extract version digits from a numeric version number
58 #define XrdMajorVNUM(x) x/10000
59 #define XrdMinorVNUM(x) x/100%100
60 #define XrdPatchVNUM(x) x%100
61 
62 // The following structure defines the standard way to record a version. You can
63 // determine component version numbers within an object file by simply executing
64 // "strings <objectfile> | grep '@V:'".
65 //
66 struct XrdVersionInfo {int vNum; const char vOpt; const char vPfx[3];\
67  const char vStr[64];};
68 
69 // Macro to define the suffix to use when generating the extern version symbol.
70 // This is used by SysPlugin. We cannot use it here as cpp does not expand the
71 // macro when catenating tokens togther and we want to avoid yet another macro.
72 //
73 #define XrdVERSIONINFOSFX "_"
74 
75 // The following macro defines a local copy of version information. Parameters:
76 // x -> The variable name of the version information structure
77 // y -> An unquoted 1- to 15-character component name (e.g. cmsd, seckrb5)
78 // vn -> The integer version number to be used
79 // vs -> The string version number to be used
80 //
81 #define XrdVERSIONINFODEF(x,y,vn,vs) \
82  XrdVersionInfo x = \
83  {vn, (sizeof(#y)-1) & 0x0f,{'@','V',':'}, #y " " vs}
84 
85 // The following macro defines an externally referencable structure that records
86 // the version used to compile code. It is used by the plugin loader. Parms:
87 // x -> The variable name of the version information structure
88 // y -> An unquoted 1- to 15-character component name (e.g. cmsd, seckrb5, etc).
89 //
90 #define XrdVERSIONINFO(x,y) \
91  extern "C" {XrdVERSIONINFODEF(x##_,y,XrdVNUMBER,XrdVERSION);}
92 
93 // The following macro is an easy way to declare externally defined version
94 // information. This macro must be used at file level.
95 //
96 #define XrdVERSIONINFOREF(x) extern "C" XrdVersionInfo x##_
97 
98 // The following macro can be used to reference externally defined version
99 // information. As the composition of the symbolic name may change you should
100 // use this macro to refer to the version information declaration.
101 //
102 #define XrdVERSIONINFOVAR(x) x##_
103 #endif
Definition: XrdVersion.hh:66
int vNum
Definition: XrdVersion.hh:66
const char vPfx[3]
Definition: XrdVersion.hh:66
const char vOpt
Definition: XrdVersion.hh:66
const char vStr[64]
Definition: XrdVersion.hh:67