summaryrefslogtreecommitdiff
path: root/libpq/version.h.in
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-09-21 01:02:04 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-10-09 19:14:35 +0300
commit2a969b7f4bdb223d3626dc14b684701942ccafb2 (patch)
tree5b317acd47e5183b7dd127417cd0017c39f28f94 /libpq/version.h.in
parent05ac4b76f5d30def9d51815c7f25d54316592f45 (diff)
Make package to be source rather than stub
Diffstat (limited to 'libpq/version.h.in')
-rw-r--r--libpq/version.h.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/libpq/version.h.in b/libpq/version.h.in
new file mode 100644
index 0000000..f5d6b31
--- /dev/null
+++ b/libpq/version.h.in
@@ -0,0 +1,26 @@
+/* file : libpq/version.h.in -*- C -*-
+ * copyright : Copyright (c) 2016-2017 Code Synthesis Ltd
+ * license : PostgreSQL License; see accompanying COPYRIGHT file
+ */
+
+#ifndef PG_MAJORVERSION /* Note: using the version macro itself. */
+
+/*
+ * Note that staring PostgreSQL 10 the release version schema changed (see
+ * build/bootstrap.build for details).
+ */
+#if $libpq.version.major$ < 10
+# define PG_MAJORVERSION "$libpq.version.major$.$libpq.version.minor$"
+#else
+# error "change PG_MAJORVERSION macro definition"
+# define PG_MAJORVERSION "$libpq.version.major$"
+#endif
+
+/*
+ * Is valid for both old and new version schemes (see above).
+ */
+#define PG_VERSION_NUM (10000 * $libpq.version.major$ + \
+ 100 * $libpq.version.minor$ + \
+ $libpq.version.patch$)
+
+#endif /* PG_MAJORVERSION */