diff options
author | Werner Koch <[email protected]> | 2013-02-26 16:10:18 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-02-26 16:10:18 +0000 |
commit | d8b46c919f45666af0d541e00dcedf57e6c4b66f (patch) | |
tree | 7f07e8e93a55790df77ae6839fc32aebb4200198 /src/version.c | |
parent | Update GnuPG related m4 files. (diff) | |
download | gpgme-d8b46c919f45666af0d541e00dcedf57e6c4b66f.tar.gz gpgme-d8b46c919f45666af0d541e00dcedf57e6c4b66f.zip |
Change the various version numbers to the new scheme.
* configure.ac: Rename my_foo variables to mym4_foo variables to make
clear that they are processed by m4.
(VERSION_NUMBER): New ac_subst.
(AH_BOTTOM): Add CRIGHTBLURB macro.
(BUILD_REVISION, BUILD_FILEVERSION, BUILD_TIMESTAMP): Change them to
work similar to libgpg-error et al.
* src/versioninfo.rc.in: Remove use of BUILD_NUMBER and get it in line
with gpg-error et al.
* src/version.c (cright_blurb): New.
(gpgme_check_version_internal): Add magic to display the above
information.
* tests/t-version.c (main): Add option --verbose.
Diffstat (limited to 'src/version.c')
-rw-r--r-- | src/version.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c index 227a1067..18825f88 100644 --- a/src/version.c +++ b/src/version.c @@ -83,6 +83,21 @@ do_subsystem_inits (void) } +/* Put vesion information into the binary. */ +static const char * +cright_blurb (void) +{ + static const char blurb[] = + "\n\n" + "This is GPGME " PACKAGE_VERSION " - The GnuPG Made Easy library\n" + CRIGHTBLURB + "\n" + "(" BUILD_REVISION " " BUILD_TIMESTAMP ")\n" + "\n\n"; + return blurb; +} + + /* Read the next number in the version string STR and return it in *NUMBER. Return a pointer to the tail of STR after parsing, or *NULL if the version string was invalid. */ @@ -208,6 +223,8 @@ gpgme_check_version_internal (const char *req_version, { const char *result; + if (req_version && req_version[0] == 1 && req_version[1] == 1) + return cright_blurb (); result = gpgme_check_version (req_version); if (result == NULL) return result; |