File indexing completed on 2024-12-22 04:17:22

0001 #include <config.h>
0002 #ifdef __linux__
0003 #ifndef PROC_VERSION_H
0004 #define PROC_VERSION_H
0005 
0006 #ifndef S
0007 #define S(X) ((unsigned long long)(X) << 10)
0008 #endif
0009 
0010 #include "procps.h"
0011 
0012 /* Suite version information for procps utilities
0013  * Copyright (c) 1995 Martin Schulze <joey@infodrom.north.de>
0014  * Linux kernel version information for procps utilities
0015  * Copyright (c) 1996 Charles Blake <cblake@bbn.com>
0016  * Distributable under the terms of the GNU Library General Public License
0017  *
0018  * Copy right 2002 Albert Cahalan
0019  */
0020 
0021 EXTERN_C_BEGIN
0022 
0023 extern void display_version(void);  /* display suite version */
0024 extern const char procps_version[];     /* global buf for suite version */
0025 
0026 extern int linux_version_code;      /* runtime version of LINUX_VERSION_CODE
0027                        in /usr/include/linux/version.h */
0028 
0029 /* Convenience macros for composing/decomposing version codes */
0030 #define LINUX_VERSION(x,y,z)   (0x10000*(x) + 0x100*(y) + z)
0031 #define LINUX_VERSION_MAJOR(x) (((x)>>16) & 0xFF)
0032 #define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF)
0033 #define LINUX_VERSION_PATCH(x) ( (x)      & 0xFF)
0034 
0035 EXTERN_C_END
0036 
0037 #endif  /* PROC_VERSION_H */
0038 #endif