Support code page 852. Thanks to Tamas Tevesz.
[u/mdw/putty] / version.c
CommitLineData
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
32char ver[] = "Development snapshot " SNAPSHOT_TEXT;
33char sshver[] = "PuTTY-Snapshot-" SNAPSHOT_TEXT;
34
35#undef SNAPSHOT_TEXT
067a15ea 36
37#elif defined RELEASE
38
39char ver[] = "Release " STR(RELEASE);
900a4ee6 40char sshver[] = "PuTTY-Release-" STR(RELEASE);
067a15ea 41
30ea5678 42#elif defined SVN_REV
43
23e4df36 44char ver[] = "Custom build r" STR(SVN_REV) ", " __DATE__ " " __TIME__;
30ea5678 45char sshver[] = "PuTTY-Custom-r" STR(SVN_REV);
46
067a15ea 47#else
48
49char ver[] = "Unidentified build, " __DATE__ " " __TIME__;
900a4ee6 50char sshver[] = "PuTTY-Local: " __DATE__ " " __TIME__;
067a15ea 51
52#endif
900a4ee6 53
54/*
55 * SSH local version string MUST be under 40 characters. Here's a
56 * compile time assertion to verify this.
57 */
58enum { vorpal_sword = 1 / (sizeof(sshver) <= 40) };