Port fix for bug #419 from branch_1_1
[freeradius.git] / src / main / version.c
1 /*
2  * version.c    Print version number and exit.
3  *
4  * Version:     $Id$
5  *
6  *   This program is free software; you can redistribute it and/or modify
7  *   it under the terms of the GNU General Public License as published by
8  *   the Free Software Foundation; either version 2 of the License, or
9  *   (at your option) any later version.
10  *
11  *   This program is distributed in the hope that it will be useful,
12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *   GNU General Public License for more details.
15  *
16  *   You should have received a copy of the GNU General Public License
17  *   along with this program; if not, write to the Free Software
18  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  *
20  * Copyright 2000,2006  The FreeRADIUS server project
21  * Copyright 2000  Alan DeKok <aland@ox.org>
22  * Copyright 2000  Chris Parker <cparker@starnetusa.com>
23  */
24
25 #include <freeradius-devel/ident.h>
26 RCSID("$Id$")
27
28 #include <freeradius-devel/autoconf.h>
29
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <freeradius-devel/radiusd.h>
33
34 /*
35  *      Display the revision number for this program
36  */
37 void NEVER_RETURNS version(void)
38 {
39
40         printf("%s: %s\n", progname, radiusd_version);
41 #if 0
42         printf("Compilation flags: ");
43
44         /* here are all the conditional feature flags */
45 #if defined(OSFC2)
46         printf(" OSFC2");
47 #endif
48 #if defined(WITH_SNMP)
49         printf(" WITH_SNMP");
50 #endif
51         printf("\n");
52 #endif
53         printf("Copyright (C) 2000-2003 The FreeRADIUS server project.\n");
54         printf("There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n");
55         printf("PARTICULAR PURPOSE.\n");
56         printf("You may redistribute copies of FreeRADIUS under the terms of the\n");
57         printf("GNU General Public License.\n");
58         printf("For more information about these matters, see the file named COPYRIGHT.\n");
59         exit (0);
60 }
61