From 41f5b0a40268bf24ad2f5226e9654d40f8ea7541 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sun, 10 Oct 2010 09:53:02 +0000 Subject: [PATCH] VMS fixes --- ChangeLog | 5 +++++ configure.ac | 17 ++++++++++++++--- g10/ChangeLog | 4 ++++ g10/keyring.c | 8 ++++---- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d3a82587..2d040859b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-10 Werner Koch + + * configure.ac (AH_BOTTOM): Add GNUPG_BAK_SFX and GNUPG_TMP_SFX. + Define GNUPG_HOMEDIR et al for VMS. + 2010-10-05 Werner Koch * configure.ac: Remove check for the faqprog. diff --git a/configure.ac b/configure.ac index e98ffc473..407804284 100644 --- a/configure.ac +++ b/configure.ac @@ -25,8 +25,8 @@ min_automake_version="1.9.3" # Remember to change the version number immediately *after* a release. # Set my_issvn to "yes" for non-released code. Remember to run an # "svn up" and "autogen.sh --force" right before creating a distribution. -m4_define([my_version], [1.4.11rc1]) -m4_define([my_issvn], [no]) +m4_define([my_version], [1.4.11]) +m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) AC_INIT([gnupg], @@ -460,6 +460,14 @@ is intended for making fat binary builds on OS X. */ # define PATHSEP_S ":" #endif +#ifdef __VMS +# define GNUPG_BAK_SFX "_bak" +# define GNUPG_TMP_SFX "_tmp" +#else /*!def __VMS */ +# define GNUPG_BAK_SFX "~" +# define GNUPG_TMP_SFX EXTSEP_S "tmp" +#endif /* def __VMS [else] */ + /* For some OSes we need to use fixed strings for certain directories. */ #ifdef HAVE_DRIVE_LETTERS @@ -470,7 +478,10 @@ is intended for making fat binary builds on OS X. */ # define GNUPG_HOMEDIR "c:\\\\gnupg" #else # ifdef __VMS -# define GNUPG_HOMEDIR "/SYS$LOGIN/gnupg" +# define GNUPG_DATADIR "/SYS$MANAGER/gnupg_share" +# define GNUPG_HOMEDIR "/SYS$LOGIN/gnupg" +# define GNUPG_LIBDIR "/SYS$MANAGER/gnupg_share" +# define GNUPG_LIBEXECDIR "" # else # define GNUPG_HOMEDIR "~/.gnupg" # endif diff --git a/g10/ChangeLog b/g10/ChangeLog index ae5b29e32..7ac769b6e 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,7 @@ +2010-10-10 Werner Koch + + * keyring.c (create_tmp_file): Use GNUPG_TMP_SFX anf GNUPG_BAK_SFX. + 2010-09-28 David Shaw * options.skel: Make the example for force-v3-sigs match diff --git a/g10/keyring.c b/g10/keyring.c index 4dc662ed9..fb399d4a2 100644 --- a/g10/keyring.c +++ b/g10/keyring.c @@ -1182,11 +1182,11 @@ create_tmp_file (const char *template, strcpy (stpcpy(tmpfname, template), EXTSEP_S "tmp"); } # else /* Posix file names */ - bakfname = xmalloc (strlen( template ) + 2); - strcpy (stpcpy (bakfname,template),"~"); + bakfname = xmalloc (strlen (template) + sizeof (GNUPG_BAK_SFX) + 1); + strcpy (stpcpy (bakfname, template), GNUPG_BAK_SFX); - tmpfname = xmalloc (strlen( template ) + 5); - strcpy (stpcpy(tmpfname,template), EXTSEP_S "tmp"); + tmpfname = xmalloc (strlen (template) + sizeof (GNUPG_TMP_SFX) + 1 ); + strcpy (stpcpy(tmpfname, template), GNUPG_TMP_SFX); # endif /* Posix filename */ /* Create the temp file with limited access */