Avoid warnings: add missing prototype, don't shadow.
[openssl.git] / apps / version.c
index 0cbcb47f881f4a39700976b9486828f753534766..041da37e99afb4f3300849434297a13eecf0ba11 100644 (file)
@@ -172,7 +172,19 @@ int MAIN(int argc, char **argv)
                        }
                }
 
-       if (version) printf("%s\n",SSLeay_version(SSLEAY_VERSION));
+       if (version)
+               {
+               if (SSLeay() == SSLEAY_VERSION_NUMBER)
+                       {
+                       printf("%s\n",SSLeay_version(SSLEAY_VERSION));
+                       }
+               else
+                       {
+                       printf("%s (Library: %s)\n",
+                               OPENSSL_VERSION_TEXT,
+                               SSLeay_version(SSLEAY_VERSION));
+                       }
+               }
        if (date)    printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON));
        if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM));
        if (options) 
@@ -200,5 +212,5 @@ int MAIN(int argc, char **argv)
        if (dir)  printf("%s\n",SSLeay_version(SSLEAY_DIR));
 end:
        apps_shutdown();
-       EXIT(ret);
+       OPENSSL_EXIT(ret);
        }