]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/server/version.c
r4262@bucket (orig r252): kcr | 2008-01-20 22:11:00 -0500
[1ts-debian.git] / zephyr / server / version.c
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It contains the version identification of the Zephyr server
3  *
4  *      Created by:     John T. Kohl
5  *
6  *      $Id$
7  *
8  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
9  *      For copying and distribution information, see the file
10  *      "mit-copyright.h". 
11  */
12
13 #include <zephyr/mit-copyright.h>
14
15 #include <sys/utsname.h>
16
17 #include "zserver.h"
18 #include "version.h"
19
20 const char zephyr_version[] = "Zephyr system version 2.0";
21
22 #ifdef DEBUG
23 const char version[] = "Zephyr server (DEBUG) $Revision$";
24 #else
25 const char version[] = "Zephyr server $Revision$";
26 #endif
27
28 #if !defined (lint) && !defined (SABER)
29 static const char rcsid_version_c[] =
30     "$Id$";
31 static const char copyright[] =
32     "Copyright (c) 1987,1988,1989,1990 Massachusetts Institute of Technology.\n";
33 #endif
34
35 char *
36 get_version(void)
37 {
38   static char vers_buf[256];
39   struct utsname un;
40
41   if (vers_buf[0] == '\0') {
42 #ifdef DEBUG
43     sprintf(vers_buf,"Zephyr Server (DEBUG) $Revision$: %s",
44             ZSERVER_VERSION_STRING);
45 #else
46     sprintf(vers_buf,"Zephyr Server $Revision$: %s",
47             ZSERVER_VERSION_STRING);
48 #endif /* DEBUG */
49
50     (void) strcat(vers_buf, "/");
51 #ifdef vax
52     (void) strcat(vers_buf, "VAX");
53 #endif /* vax */
54 #ifdef ibm032
55     (void) strcat(vers_buf, "IBM RT");
56 #endif /* ibm032 */
57 #ifdef _IBMR2
58     (void) strcat(vers_buf, "IBM RS/6000");
59 #endif /* _IBMR2 */
60 #ifdef sun
61     (void) strcat(vers_buf, "SUN");
62 #ifdef sparc
63     (void) strcat (vers_buf, "-4");
64 #endif /* sparc */
65 #ifdef sun386
66     (void) strcat (vers_buf, "-386I");
67 #endif /* sun386 */
68 #endif /* sun */
69
70 #ifdef mips
71 #ifdef ultrix                   /* DECstation */
72     (void) strcat (vers_buf, "DEC-");
73 #endif /* ultrix */
74     (void) strcat(vers_buf, "MIPS");
75 #endif /* mips */
76 #ifdef NeXT
77     (void) strcat(vers_buf, "NeXT");
78 #endif /* NeXT */
79
80     if (vers_buf[strlen(vers_buf) - 1] == '/') {
81         uname(&un);
82         (void) strcat(vers_buf, un.machine);
83         (void) strcat(vers_buf, "-");
84         (void) strcat(vers_buf, un.sysname);
85     }
86   }
87   return(vers_buf);
88 }