| 1 |
/* |
| 2 |
* stunnel TLS offloading and load-balancing proxy |
| 3 |
* Copyright (C) 1998-2026 Michal Trojnara <[email protected]> |
| 4 |
* |
| 5 |
* This program is free software; you can redistribute it and/or modify it |
| 6 |
* under the terms of the GNU General Public License as published by the |
| 7 |
* Free Software Foundation; either version 2 of the License, or (at your |
| 8 |
* option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
* See the GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License along |
| 16 |
* with this program; if not, see <http://www.gnu.org/licenses>. |
| 17 |
* |
| 18 |
* Linking stunnel statically or dynamically with other modules is making |
| 19 |
* a combined work based on stunnel. Thus, the terms and conditions of |
| 20 |
* the GNU General Public License cover the whole combination. |
| 21 |
* |
| 22 |
* In addition, as a special exception, the copyright holder of stunnel |
| 23 |
* gives you permission to combine stunnel with free software programs or |
| 24 |
* libraries that are released under the GNU LGPL and with code included |
| 25 |
* in the standard release of OpenSSL under the OpenSSL License (or |
| 26 |
* modified versions of such code, with unchanged license). You may copy |
| 27 |
* and distribute such a system following the terms of the GNU GPL for |
| 28 |
* stunnel and the licenses of the other code concerned. |
| 29 |
* |
| 30 |
* Note that people who make modified versions of stunnel are not obligated |
| 31 |
* to grant this special exception for their modified versions; it is their |
| 32 |
* choice whether to do so. The GNU General Public License gives permission |
| 33 |
* to release a modified version without this exception; this exception |
| 34 |
* also makes it possible to release a modified version which carries |
| 35 |
* forward this exception. |
| 36 |
*/ |
| 37 |
|
| 38 |
#ifndef VERSION_MAJOR |
| 39 |
|
| 40 |
#ifdef HAVE_CONFIG_H |
| 41 |
#include "config.h" |
| 42 |
#endif /* HAVE_CONFIG_H */ |
| 43 |
|
| 44 |
/* HOST may be undefined on Win32 platform */ |
| 45 |
#ifndef HOST |
| 46 |
#if defined(_WIN64) |
| 47 |
#define PLATFORM "x64" |
| 48 |
#elif defined(_WIN32) |
| 49 |
#define PLATFORM "x86" |
| 50 |
#else /* although MSDN claims that _WIN32 is always defined */ |
| 51 |
#define PLATFORM "unknown" |
| 52 |
#endif |
| 53 |
#ifdef __MINGW32__ |
| 54 |
#define HOST PLATFORM "-pc-mingw32-gnu" |
| 55 |
#else /* __MINGW32__ */ |
| 56 |
#ifdef _MSC_VER |
| 57 |
#define xstr(a) str(a) |
| 58 |
#define str(a) #a |
| 59 |
#define HOST PLATFORM "-pc-msvc-" xstr(_MSC_VER) |
| 60 |
#else /* _MSC_VER */ |
| 61 |
#define HOST PLATFORM "-pc-unknown" |
| 62 |
#endif /* _MSC_VER */ |
| 63 |
#endif /* __MINGW32__ */ |
| 64 |
#endif /* HOST */ |
| 65 |
|
| 66 |
/* START CUSTOMIZE */ |
| 67 |
#define VERSION_MAJOR 5 |
| 68 |
#define VERSION_MINOR 78 |
| 69 |
/* END CUSTOMIZE */ |
| 70 |
|
| 71 |
/* all the following macros are ABSOLUTELY NECESSARY to have proper string |
| 72 |
* construction with VARIOUS C preprocessors (EVC, VC, BCC, GCC) */ |
| 73 |
#define STRINGIZE0(x) #x |
| 74 |
#define STRINGIZE(x) STRINGIZE0(x) |
| 75 |
#define STRZCONCAT30(a,b,c) a##b##c |
| 76 |
#define STRZCONCAT3(a,b,c) STRZCONCAT30(a,b,c) |
| 77 |
|
| 78 |
/* for resource.rc, stunnel.c, gui.c */ |
| 79 |
#define STUNNEL_VERSION0 STRZCONCAT3(VERSION_MAJOR, . , VERSION_MINOR) |
| 80 |
#define STUNNEL_VERSION STRINGIZE(STUNNEL_VERSION0) |
| 81 |
|
| 82 |
/* for resources.rc */ |
| 83 |
#define STUNNEL_VERSION_FIELDS VERSION_MAJOR,VERSION_MINOR,0,0 |
| 84 |
#define STUNNEL_PRODUCTNAME "stunnel " STUNNEL_VERSION " for " HOST |
| 85 |
|
| 86 |
/* some useful tricks for preprocessing debugging */ |
| 87 |
#if 0 |
| 88 |
#pragma message ( "VERSION.H: STUNNEL_VERSION is " STUNNEL_VERSION ) |
| 89 |
#pragma message ( "VERSION.H: HOST is " HOST ) |
| 90 |
#pragma message ( "VERSION.H: STUNNEL_PRODUCTNAME is " STUNNEL_PRODUCTNAME ) |
| 91 |
#endif |
| 92 |
|
| 93 |
#endif /* VERSION_MAJOR */ |
| 94 |
|
| 95 |
/* end of version.h */ |