• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef PROC_VERSION_H
2 #define PROC_VERSION_H
3 
4 #include "procps.h"
5 
6 /* Suite version information for procps utilities
7  * Copyright (c) 1995 Martin Schulze <joey@infodrom.north.de>
8  * Linux kernel version information for procps utilities
9  * Copyright (c) 1996 Charles Blake <cblake@bbn.com>
10  * Distributable under the terms of the GNU Library General Public License
11  *
12  * Copyright 2002 Albert Cahalan
13  */
14 
15 EXTERN_C_BEGIN
16 
17 extern void display_version(void);	/* display suite version */
18 extern const char procps_version[];		/* global buf for suite version */
19 
20 extern int linux_version_code;		/* runtime version of LINUX_VERSION_CODE
21 					   in /usr/include/linux/version.h */
22 
23 /* Convenience macros for composing/decomposing version codes */
24 #define LINUX_VERSION(x,y,z)   (0x10000*(x) + 0x100*(y) + z)
25 #define LINUX_VERSION_MAJOR(x) (((x)>>16) & 0xFF)
26 #define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF)
27 #define LINUX_VERSION_PATCH(x) ( (x)      & 0xFF)
28 
29 EXTERN_C_END
30 
31 #endif	/* PROC_VERSION_H */
32