Fixed a W32bug in rungpg.c
authorWerner Koch <wk@gnupg.org>
Mon, 17 Sep 2007 10:21:20 +0000 (10:21 +0000)
committerWerner Koch <wk@gnupg.org>
Mon, 17 Sep 2007 10:21:20 +0000 (10:21 +0000)
ChangeLog
README.SVN [moved from README.CVS with 76% similarity]
configure.ac
gpgme/ChangeLog
gpgme/gpgme.h
gpgme/rungpg.c

index f45f6e322defcc61443f86f814e05b5957414e2d..392733f56a582d64fa38931df92a68a58e47ca0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-17  Werner Koch  <wk@g10code.com>
+
+       * configure.ac: Use the svn version magic.
+
 2007-09-07  Marcus Brinkmann  <marcus@g10code.de>
 
        * configure.ac: Check for C++, Qt and support --enable-w32-qt.
similarity index 76%
rename from README.CVS
rename to README.SVN
index 642dda0a2dc0842035af286b4f4eaa86a2f7664f..c6422829fddeb01e39b0c57126a50022df2d3920 100644 (file)
@@ -1,9 +1,11 @@
-If you are building from CVS, run the script
+If you are building from Subversion, run the script
 
 ./autogen.sh
 
 first, to make sure that you have all the necessary maintainer tools
-are installed and to build the actual configuration files.  Then run
+are installed and to build the actual configuration files.  If you
+have just updated from SVN, you should add the option "--force" to
+autogen.sh so that meta data from SVN is noticed.  Then run
 
 ./configure --enable-maintainer-mode
 
@@ -40,20 +42,10 @@ knowledge about the actual tools used by autgen.sh.
 
 Please don't use autopoint, libtoolize or autoreconf unless you are
 the current maintainer and want to update the standard configuration
-files.  All those files should be in the CVS and only updated manually
+files.  All those files should be in the SVN and only updated manually
 if the maintainer decides that newer versions are required.  The
 maintainer should also make sure that the required version of automake
 et al. are properly indicated at the top of configure.ac and take care
 to copy the files and not merely use symlinks.
 
 
-Copyright 2004 g10 Code GmbH
-
-This file is free software; as a special exception the author gives
-unlimited permission to copy and/or distribute it, with or without
-modifications, as long as this notice is preserved.
-
-This file is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE.
index 963ab6c08e6ba148d4bd2ff9fba0a7bb5ea0d922..ca639398b2509f42859d267bedb57798088ee99e 100644 (file)
@@ -23,24 +23,22 @@ AC_PREREQ(2.59)
 min_automake_version="1.9.3"
 
 # Version number: Remember to change it immediately *after* a release.
-#                 Make sure to run  "svn up" before a "make dist".
-#                 See below for the LT versions.
+#                 Make sure to run  "svn up" and "./autogen.sh --force"
+#                  before a "make dist".  See below for the LT versions.
 #
-# The CVS version is usually the next intended release version with
-# the string "-cvs" appended.  The reason for this is that tests for a
+# The SVN version is usually the next intended release version with
+# the string "-svnNNN" appended.  The reason for this is that tests for a
 # specific feature can already be done under the assumption that the
-# CVS version is the most recent one in a branch.  To disable the CVS
-# version for the real release, just comment out the my_iscvs macro.
-# Note, that we are now using Subversion instead of CVS and append the
-# SVN revision number to the "cvs" suffix.  To make this most useful
-# for snapshot releases please do an "svn up" right before recreating
-# the configure script, so that a proper revision number for all files
-# is available when running a "make distcheck".
+# SVN version is the most recent one in a branch.  To disable the SVN
+# version for the real release, set the my_issvn macro to no.
 m4_define(my_version, [1.1.5])
-m4_define(my_iscvs, yes)
-AC_INIT([gpgme], my_version[]m4_ifdef([my_iscvs], [-cvs[]m4_translit(
-               [$Revision$],[Ra-z $:])]),
-               [bug-gpgme@gnupg.org])
+m4_define(my_issvn, [yes])
+
+m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
+            || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
+AC_INIT([gpgme], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
+        [bug-gpgme@gnupg.org])
+
 
 # LT Version numbers, remember to change them just *before* a release.
 #   (Code changed:                     REVISION++)
@@ -59,6 +57,7 @@ GPGME_CONFIG_API_VERSION=1
 ##############################################
 
 
+BUILD_REVISION=svn_revision
 PACKAGE=$PACKAGE_NAME
 VERSION=$PACKAGE_VERSION
 
@@ -577,10 +576,6 @@ AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")
 GNUPG_FIX_HDR_VERSION(gpgme/gpgme.h, GPGME_VERSION)
 
 # Generate values for the DLL version info
-changequote(,)dnl 
-BUILD_REVISION="`echo '$Revision$' | sed 's/[^0-9]//g'`"
-changequote([,])dnl
-test -z "$BUILD_REVISION" && BUILD_REVISION="0"
 if test "$have_w32_system" = yes; then
     BUILD_TIMESTAMP=`date --iso-8601=minutes`
     changequote(,)dnl 
index 53a1d0b8c382e3d3c80618934785add68e075d80..9465509e92c7b5c8b79c6110bb640321a4445779 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-17  Werner Koch  <wk@g10code.com>
+
+       * rungpg.c (gpg_new): Make robust against undefined ttyname or
+       ttytype.
+
 2007-09-14  Werner Koch  <wk@g10code.com>
 
        * data-mem.c (gpgme_data_release_and_get_mem): Fix tracing bug.
index 5bdd103591b32d8ba0cedeb041e7076a733f3e86..1b2c8823867950f648e525aabcb1785197ea820d 100644 (file)
@@ -73,7 +73,7 @@ extern "C" {
    AM_PATH_GPGME macro) check that this header matches the installed
    library.  Warning: Do not edit the next line.  configure will do
    that for you!  */
-#define GPGME_VERSION "1.1.5-cvs1251"
+#define GPGME_VERSION "1.1.5-svn1255"
 
 
 \f
index 70293f8303cb28613730f0d85c024cc4305c8ff1..5618f84992d5e7b4902d3f7f0b6d240538239fe6 100644 (file)
@@ -483,18 +483,26 @@ gpg_new (void **engine, const char *file_name, const char *home_dir)
        rc = gpg_error_from_errno (errno);
       else
        {
-         rc = add_arg (gpg, "--ttyname");
-         if (!rc)
-           rc = add_arg (gpg, dft_ttyname);
-         if (!rc)
+          if (dft_ttyname)
+            {
+              rc = add_arg (gpg, "--ttyname");
+              if (!rc)
+                rc = add_arg (gpg, dft_ttyname);
+            }
+          else
+            rc = 0;
+          if (!rc)
            {
              rc = _gpgme_getenv ("TERM", &dft_ttytype);
              if (rc)
                goto leave;
-
-             rc = add_arg (gpg, "--ttytype");
-             if (!rc)
-               rc = add_arg (gpg, dft_ttytype);
+              
+              if (dft_ttytype)
+                {
+                  rc = add_arg (gpg, "--ttytype");
+                  if (!rc)
+                    rc = add_arg (gpg, dft_ttytype);
+                }
 
              free (dft_ttytype);
            }