From e12ed08bd5c94f287acf0938a19a3d314624016a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 21 Sep 2017 11:51:09 -0700 Subject: 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 Reviewed-by: Amitay Isaacs --- ctdb/common/version.c | 20 ++++++++++++++++++++ ctdb/common/version.h | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ctdb/common/version.c create mode 100644 ctdb/common/version.h (limited to 'ctdb/common') 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 . +*/ + +#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 . +*/ + +extern const char ctdb_version_string[]; -- cgit v1.2.1