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 | |
| 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')
| -rw-r--r-- | src/version.c | 17 | ||||
| -rw-r--r-- | src/versioninfo.rc.in | 6 | 
2 files changed, 20 insertions, 3 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; diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in index 9c1b4f50..a4ab0af4 100644 --- a/src/versioninfo.rc.in +++ b/src/versioninfo.rc.in @@ -18,7 +18,7 @@  VS_VERSION_INFO VERSIONINFO - FILEVERSION @LIBGPGME_LT_CURRENT@,@LIBGPGME_LT_AGE@,@LIBGPGME_LT_REVISION@,@BUILD_NUMBER@ + FILEVERSION @BUILD_FILEVERSION@   PRODUCTVERSION @BUILD_FILEVERSION@   FILEFLAGSMASK 0x3fL  #ifdef _DEBUG @@ -37,9 +37,9 @@ BEGIN              VALUE "Comments", "Provided under the terms of the GNU Lesser General Public License.\0"              VALUE "CompanyName", "g10 Code GmbH\0"              VALUE "FileDescription", "GPGME - GnuPG Made Easy\0" -            VALUE "FileVersion", "@LIBGPGME_LT_CURRENT@.@LIBGPGME_LT_AGE@.@LIBGPGME_LT_REVISION@.@BUILD_NUMBER@\0" +            VALUE "FileVersion", "@LIBGPGME_LT_CURRENT@.@LIBGPGME_LT_AGE@.@LIBGPGME_LT_REVISION@.@BUILD_REVISION@\0"              VALUE "InternalName", "gpgme\0" -            VALUE "LegalCopyright", "Copyright � 2005 g10 Code GmbH\0" +            VALUE "LegalCopyright", "Copyright � 2001-2013 g10 Code GmbH\0"              VALUE "LegalTrademarks", "\0"              VALUE "OriginalFilename", "gpgme.dll\0"              VALUE "PrivateBuild", "\0" | 
