There is no need to write SAMBA_VERSION_STRING as CTDB_VERSION_STRING.
Wherever required use SAMBA_VERSION_STRING directly.
Avoids the confusion with two version.h files.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789
Signed-off-by: Amitay Isaacs <amitay@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Mar 15 06:31:50 UTC 2019 on sn-devel-144
+++ /dev/null
-/*
- 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;
+++ /dev/null
-/*
- 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[];
+++ /dev/null
-#include "version.h"
-
-#define CTDB_VERSION_STRING SAMBA_VERSION_STRING
#include "lib/util/blocking.h"
#include "lib/util/become_daemon.h"
-#include "common/version.h"
+#include "version.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
ctdb->ctdbd_pid = getpid();
DEBUG(DEBUG_ERR, ("Starting CTDBD (Version %s) as PID: %u\n",
- ctdb_version_string, ctdb->ctdbd_pid));
+ SAMBA_VERSION_STRING, ctdb->ctdbd_pid));
ctdb_create_pidfile(ctdb);
/* create a unix domain stream socket to listen to */
#include <tevent.h>
#include <tdb.h>
-#include "common/version.h"
+#include "version.h"
#include "lib/util/debug.h"
#include "lib/util/samba_util.h"
#include "lib/util/sys_rw.h"
static int control_version(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
int argc, const char **argv)
{
- printf("%s\n", ctdb_version_string);
+ printf("%s\n", SAMBA_VERSION_STRING);
return 0;
}
pidfile.c run_proc.c
hash_count.c
run_event.c event_script.c
- sock_client.c version.c
+ sock_client.c
cmdline.c path.c conf.c line.c
'''),
deps='''samba-util sys_rw tevent-util