From 0e96be8c015da08437e4638bb39c0cfb145fe20d Mon Sep 17 00:00:00 2001 From: "D. Richard Hipp" Date: Tue, 16 Jan 2018 20:05:27 +0000 Subject: [PATCH] Move the ZLIB version announcement in the CLI out of the default banner and put it in the ".version" command. --- src/shell.c.in | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/shell.c.in b/src/shell.c.in index ce5294de81..523d7ef7bf 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -7537,6 +7537,20 @@ static int do_meta_command(char *zLine, ShellState *p){ if( c=='v' && strncmp(azArg[0], "version", n)==0 ){ utf8_printf(p->out, "SQLite %s %s\n" /*extra-version-info*/, sqlite3_libversion(), sqlite3_sourceid()); +#if SQLITE_HAVE_ZLIB + utf8_printf(p->out, "zlib version %s\n", zlibVersion()); +#endif +#define CTIMEOPT_VAL_(opt) #opt +#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt) +#if defined(__clang__) && defined(__clang_major__) + utf8_printf(p->out, "clang-" CTIMEOPT_VAL(__clang_major__) "." + CTIMEOPT_VAL(__clang_minor__) "." + CTIMEOPT_VAL(__clang_patchlevel__) "\n"); +#elif defined(_MSC_VER) + utf8_printf(p->out, "msvc-" CTIMEOPT_VAL(_MSC_VER) "\n"); +#elif defined(__GNUC__) && defined(__VERSION__) + utf8_printf(p->out, "gcc-" __VERSION__ "\n"); +#endif }else if( c=='v' && strncmp(azArg[0], "vfsinfo", n)==0 ){ @@ -8380,9 +8394,6 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ "Enter \".help\" for usage hints.\n", sqlite3_libversion(), sqlite3_sourceid() ); -#if SQLITE_HAVE_ZLIB - printf("Using zlib version %s.\n", zlibVersion()); -#endif if( warnInmemoryDb ){ printf("Connected to a "); printBold("transient in-memory database"); -- 2.11.4.GIT