067a15ea |
1 | /* |
2 | * PuTTY version numbering |
3 | */ |
4 | |
5 | #define STR1(x) #x |
6 | #define STR(x) STR1(x) |
7 | |
44747c53 |
8 | #ifdef INCLUDE_EMPTY_H |
9 | /* |
10 | * Horrible hack to force version.o to be rebuilt unconditionally in |
11 | * the automake world: empty.h is an empty header file, created by the |
12 | * makefile and forcibly updated every time make is run. Including it |
13 | * here causes automake to track it as a dependency, which will cause |
14 | * version.o to be rebuilt too. |
15 | * |
16 | * The space between # and include causes mkfiles.pl's dependency |
17 | * scanner (for all other makefile types) to ignore this include, |
18 | * which is correct because only the automake makefile passes |
19 | * -DINCLUDE_EMPTY_H to enable it. |
20 | */ |
21 | # include "empty.h" |
22 | #endif |
23 | |
067a15ea |
24 | #if defined SNAPSHOT |
25 | |
1cb3ebfe |
26 | #if defined SVN_REV |
27 | #define SNAPSHOT_TEXT STR(SNAPSHOT) ":r" STR(SVN_REV) |
28 | #else |
29 | #define SNAPSHOT_TEXT STR(SNAPSHOT) |
30 | #endif |
31 | |
32 | char ver[] = "Development snapshot " SNAPSHOT_TEXT; |
33 | char sshver[] = "PuTTY-Snapshot-" SNAPSHOT_TEXT; |
34 | |
35 | #undef SNAPSHOT_TEXT |
067a15ea |
36 | |
37 | #elif defined RELEASE |
38 | |
39 | char ver[] = "Release " STR(RELEASE); |
900a4ee6 |
40 | char sshver[] = "PuTTY-Release-" STR(RELEASE); |
067a15ea |
41 | |
479fb463 |
42 | #elif defined PRERELEASE |
43 | |
44 | char ver[] = "Pre-release " STR(PRERELEASE) ":r" STR(SVN_REV); |
45 | char sshver[] = "PuTTY-Prerelease-" STR(PRERELEASE) ":r" STR(SVN_REV); |
46 | |
30ea5678 |
47 | #elif defined SVN_REV |
48 | |
23e4df36 |
49 | char ver[] = "Custom build r" STR(SVN_REV) ", " __DATE__ " " __TIME__; |
30ea5678 |
50 | char sshver[] = "PuTTY-Custom-r" STR(SVN_REV); |
51 | |
067a15ea |
52 | #else |
53 | |
54 | char ver[] = "Unidentified build, " __DATE__ " " __TIME__; |
900a4ee6 |
55 | char sshver[] = "PuTTY-Local: " __DATE__ " " __TIME__; |
067a15ea |
56 | |
57 | #endif |
900a4ee6 |
58 | |
59 | /* |
60 | * SSH local version string MUST be under 40 characters. Here's a |
61 | * compile time assertion to verify this. |
62 | */ |
63 | enum { vorpal_sword = 1 / (sizeof(sshver) <= 40) }; |