summaryrefslogtreecommitdiff
path: root/ctdb/common
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-09-21 11:51:09 -0700
committerVolker Lendecke <vl@samba.org>2017-09-26 09:37:13 +0200
commite12ed08bd5c94f287acf0938a19a3d314624016a (patch)
treee3fb34c2a368bc8799fb1eb4aa2c037735c8ebc5 /ctdb/common
parenta919ded138a40008ac960525a753e55da3704af7 (diff)
downloadsamba-e12ed08bd5c94f287acf0938a19a3d314624016a.tar.gz
ctdb: Centralize ctdb_version_string
Whenever the current git hash changes, we recompile ctdb.c and ctdb_daemon.c. As both have quite a few warnings with -Wall, this makes it quite difficult to see the real warnings that pop up during development. Centralize the ctdb_version_string to just a single file without warnings. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/version.c20
-rw-r--r--ctdb/common/version.h18
2 files changed, 38 insertions, 0 deletions
diff --git a/ctdb/common/version.c b/ctdb/common/version.c
new file mode 100644
index 00000000000..e34e98c09ef
--- /dev/null
+++ b/ctdb/common/version.c
@@ -0,0 +1,20 @@
+/*
+ CTDB version string
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ctdb_version.h"
+
+const char ctdb_version_string[] = CTDB_VERSION_STRING;
diff --git a/ctdb/common/version.h b/ctdb/common/version.h
new file mode 100644
index 00000000000..1cf1c5d0cab
--- /dev/null
+++ b/ctdb/common/version.h
@@ -0,0 +1,18 @@
+/*
+ CTDB version string
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+extern const char ctdb_version_string[];