]> granicus.if.org Git - pgbouncer/commitdiff
Tweak version string
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 19 Sep 2019 09:34:12 +0000 (11:34 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 19 Sep 2019 09:34:12 +0000 (11:34 +0200)
Use Autoconf's PACKAGE_STRING for the --version and SHOW VERSION
output instead of our own macro.  This changes the output format
slightly, but we might as well change to the standard format while
we're changing around SHOW VERSION.

include/bouncer.h
src/admin.c
src/main.c

index 7603cb5c5cb87fe91b0d93760976e958afc2dd7e..95f4a4e64be026b348296d20bc42118dad753114 100644 (file)
@@ -38,8 +38,6 @@
 
 #include <event.h>
 
-#define FULLVER   PACKAGE_NAME " version " PACKAGE_VERSION
-
 /* each state corresponds to a list */
 enum SocketState {
        CL_FREE,                /* free_client_list */
index b75baa0b20781f89f98dd0dfe9411c4e17bb76ad..4f11f202ecc5b411f32ea02943dd51018bb109f8 100644 (file)
@@ -1306,7 +1306,7 @@ static bool admin_show_version(PgSocket *admin, const char *arg)
        }
 
        pktbuf_write_RowDescription(buf, "s", "version");
-       pktbuf_write_DataRow(buf, "s", FULLVER);
+       pktbuf_write_DataRow(buf, "s", PACKAGE_STRING);
 
        admin_flush(admin, buf, "SHOW");
 
index 21647496b97a60e59bcc7f8e849782c5bb181d02..0c0ccd0d54fc2f5720f79527a4495739b3673445 100644 (file)
@@ -844,7 +844,7 @@ int main(int argc, char *argv[])
                        cf_verbose++;
                        break;
                case 'V':
-                       printf("%s\n", FULLVER);
+                       printf("%s\n", PACKAGE_STRING);
                        return 0;
                case 'd':
                        cf_daemon = 1;