summaryrefslogtreecommitdiffstats
path: root/pcilib/version.h.in
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-05-02 14:45:42 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-05-02 14:45:42 +0200
commit5387063faa68d774e2f586e6d8284520f3cde12f (patch)
treec849a07034fe0ba9880fdf8db27972925f93c75a /pcilib/version.h.in
parent92b8fe6e949f08308d237e87441e066a19a9eda6 (diff)
downloadpcitool-5387063faa68d774e2f586e6d8284520f3cde12f.tar.gz
pcitool-5387063faa68d774e2f586e6d8284520f3cde12f.tar.bz2
pcitool-5387063faa68d774e2f586e6d8284520f3cde12f.tar.xz
pcitool-5387063faa68d774e2f586e6d8284520f3cde12f.zip
Include version information in all API descriptions
Diffstat (limited to 'pcilib/version.h.in')
-rw-r--r--pcilib/version.h.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/pcilib/version.h.in b/pcilib/version.h.in
new file mode 100644
index 0000000..6eb3b20
--- /dev/null
+++ b/pcilib/version.h.in
@@ -0,0 +1,15 @@
+#ifndef _PCILIB_VERSION_H
+#define _PCILIB_VERSION_H
+
+#define PCILIB_VERSION_MAJOR ${PCILIB_VERSION_MAJOR}
+#define PCILIB_VERSION_MINOR ${PCILIB_VERSION_MINOR}
+#define PCILIB_VERSION_MICRO ${PCILIB_VERSION_MICRO}
+
+#define PCILIB_MAKE_VERSION(major, minor, micro) ((major<<16)|(minor<<8)|(micro))
+#define PCILIB_VERSION_GET_MAJOR(version) ((version>>16)&&0xFF)
+#define PCILIB_VERSION_GET_MINOR(version) ((version>>8)&&0xFF)
+#define PCILIB_VERSION_GET_MICRO(version) ((version)&&0xFF)
+
+#define PCILIB_VERSION PCILIB_MAKE_VERSION(PCILIB_VERSION_MAJOR, PCILIB_VERSION_MINOR, PCILIB_VERSION_MICRO)
+
+#endif /* _PCILIB_VERSION_H */