Update version number to 4.53.
[exim.git] / src / src / version.c
CommitLineData
ab34101c 1/* $Cambridge: exim/src/src/version.c,v 1.9 2005/07/28 08:07:18 ph10 Exp $ */
059ec3d9
PH
2
3/*************************************************
4* Exim - an Internet mail transport agent *
5*************************************************/
6
c988f1f4 7/* Copyright (c) University of Cambridge 1995 - 2005 */
059ec3d9
PH
8/* See the file NOTICE for conditions of use and distribution. */
9
10/* Function for setting up the version string. */
11
12#include "exim.h"
13
14
ab34101c 15#define THIS_VERSION "4.53"
059ec3d9
PH
16
17
18/* The header file cnumber.h contains a single line containing the
19compilation number, making it easy to have it updated automatically.
20Hence the fudgery below to get the number turned into a string, since
21we can't use #include inside a macro argument list */
22
23void
24version_init(void)
25{
26static uschar cnumber_buffer[24];
27static uschar date_buffer[32];
28
29uschar today[20];
30uschar *version_cnumber_format;
31
32int cnumber =
33#include "cnumber.h"
34;
35
36/* The odd magic after each of these is so they can be easily found
37for automatic patching to standard values when running regression tests.
38The reason that version_cnumber_format isn't just written inline in the
39sprintf() call is the gcc -Wall warns about a \0 in a format string. */
40
41version_cnumber = cnumber_buffer;
42version_cnumber_format = US"%d\0<<eximcnumber>>";
43sprintf(CS version_cnumber, CS version_cnumber_format, cnumber);
44version_string = US THIS_VERSION "\0<<eximversion>>";
45
46Ustrcpy(today, __DATE__);
47if (today[4] == ' ') today[4] = '0';
48today[3] = today[6] = '-';
49
50version_date = date_buffer;
51version_date[0] = 0;
52Ustrncat(version_date, today+4, 3);
53Ustrncat(version_date, today, 4);
54Ustrncat(version_date, today+7, 4);
55Ustrcat(version_date, " ");
56Ustrcat(version_date, __TIME__);
57}
58
59/* End of version.c */