mdbx: rework version info (stub for now).

This commit is contained in:
Leo Yuriev
2017-05-24 01:07:15 +03:00
parent 88ea2768f5
commit 62ebc59330
18 changed files with 103 additions and 93 deletions

View File

@@ -633,7 +633,8 @@ int main(int argc, char *argv[]) {
while ((i = getopt(argc, argv, "Vvqnwcds:")) != EOF) {
switch (i) {
case 'V':
printf("%s\n", MDBX_VERSION_STRING);
printf("%s (%s, build %s)\n", mdbx_version.git.describe,
mdbx_version.git.datetime, mdbx_build.datetime);
exit(EXIT_SUCCESS);
break;
case 'v':

View File

@@ -1,5 +1,5 @@
.\" Copyright 2015-2017 Leonid Yuriev <leo@yuriev.ru>.
.\" Copyright 2012-2017 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDB_COPY 1 "2014/06/20" "LMDB 0.9.14"

View File

@@ -34,8 +34,9 @@ int main(int argc, char *argv[]) {
else if (argv[1][1] == 'c' && argv[1][2] == '\0')
cpflags |= MDB_CP_COMPACT;
else if (argv[1][1] == 'V' && argv[1][2] == '\0') {
printf("%s\n", MDBX_VERSION_STRING);
exit(0);
printf("%s (%s, build %s)\n", mdbx_version.git.describe,
mdbx_version.git.datetime, mdbx_build.datetime);
exit(EXIT_SUCCESS);
} else
argc = 0;
}

View File

@@ -1,5 +1,5 @@
.\" Copyright 2015-2017 Leonid Yuriev <leo@yuriev.ru>.
.\" Copyright 2014-2017 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDB_DUMP 1 "2014/06/20" "LMDB 0.9.14"

View File

@@ -177,8 +177,9 @@ int main(int argc, char *argv[]) {
while ((i = getopt(argc, argv, "af:lnps:V")) != EOF) {
switch (i) {
case 'V':
printf("%s\n", MDBX_VERSION_STRING);
exit(0);
printf("%s (%s, build %s)\n", mdbx_version.git.describe,
mdbx_version.git.datetime, mdbx_build.datetime);
exit(EXIT_SUCCESS);
break;
case 'l':
list = 1;

View File

@@ -1,5 +1,5 @@
.\" Copyright 2015-2017 Leonid Yuriev <leo@yuriev.ru>.
.\" Copyright 2014-2017 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDB_LOAD 1 "2014/06/20" "LMDB 0.9.14"

View File

@@ -317,8 +317,9 @@ int main(int argc, char *argv[]) {
while ((i = getopt(argc, argv, "f:ns:NTV")) != EOF) {
switch (i) {
case 'V':
printf("%s\n", MDBX_VERSION_STRING);
exit(0);
printf("%s (%s, build %s)\n", mdbx_version.git.describe,
mdbx_version.git.datetime, mdbx_build.datetime);
exit(EXIT_SUCCESS);
break;
case 'f':
if (freopen(optarg, "r", stdin) == NULL) {

View File

@@ -1,5 +1,5 @@
.\" Copyright 2015-2017 Leonid Yuriev <leo@yuriev.ru>.
.\" Copyright 2012-2017 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDB_STAT 1 "2014/06/20" "LMDB 0.9.14"

View File

@@ -64,8 +64,9 @@ int main(int argc, char *argv[]) {
while ((i = getopt(argc, argv, "Vaefnrs:")) != EOF) {
switch (i) {
case 'V':
printf("%s\n", MDBX_VERSION_STRING);
exit(0);
printf("%s (%s, build %s)\n", mdbx_version.git.describe,
mdbx_version.git.datetime, mdbx_build.datetime);
exit(EXIT_SUCCESS);
break;
case 'a':
if (subname)