1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

The rest of the VMS changes.

This commit is contained in:
Werner Koch 2010-09-28 15:55:24 +00:00
parent aa29ba1689
commit 6764837956
10 changed files with 68 additions and 11 deletions

View File

@ -23,6 +23,8 @@ int rndunix_gather_random (void (*add)(const void*, size_t, int),
int requester, size_t length, int level);
int rndlinux_gather_random (void (*add)(const void*, size_t, int),
int requester, size_t length, int level);
int rndvms_gather_random (void (*add)(const void*, size_t, int),
int requester, size_t length, int level);
int rndegd_connect_socket (int nofail);
int rndegd_gather_random (void (*add)(const void*, size_t, int),
int requester, size_t length, int level );

View File

@ -470,7 +470,7 @@ 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_HOMEDIR "/SYS$LOGIN/gnupg"
# else
# define GNUPG_HOMEDIR "~/.gnupg"
# endif

View File

@ -1,12 +1,9 @@
2010-09-28 Werner Koch <wk@g10code.com>
* gpgv.c (ttyfp_is, init_ttyfp) [__VMS]: Add subs.
2010-09-28 Steven M. Schweda <sms@antinode.info> (wk)
Changes to help the VMS port. See
http://antinode.info/dec/sw/gnupg.html .
* gpgv.c (ttyfp_is, init_ttyfp) [__VMS]: Add stubs.
* build-packet.c (do_plaintext) [__VMS]: Disable error message.
* keyserver.c (keyserver_spawn) [__VMS]: Do not add the DIRSEP_S.
* misc.c [__VMS]: Include <time.h>.

View File

@ -248,8 +248,13 @@ open_outfile( const char *iname, int mode, IOBUF *a )
#endif /* USE_ONLY_8DOT3 */
{
buf = xmalloc(strlen(iname)+4+1);
#ifdef __VMS
vms_append_ext (buf, iname,
mode==1 ? "asc" : mode==2 ? "sig" : "gpg");
#else /*!def __VMS*/
strcpy(stpcpy(buf,iname), mode==1 ? EXTSEP_S "asc" :
mode==2 ? EXTSEP_S "sig" : EXTSEP_S "gpg");
#endif /*!def __VMS*/
}
name = buf;
}
@ -435,6 +440,15 @@ try_make_homedir( const char *fname )
fname, strerror(errno) );
else if( !opt.quiet )
log_info( _("directory `%s' created\n"), fname );
#ifdef __VMS
/* Explicitly remove group and world (other) access, which may
be allowed by default. */
if (chmod (fname, S_IRWXU ))
log_fatal ("can't set protection on directory `%s': %s\n",
fname, strerror (errno));
#endif /*def __VMS*/
copy_options_file( fname );
/* log_info(_("you have to start GnuPG again, " */
/* "so it can read the new configuration file\n") ); */

View File

@ -25,10 +25,12 @@
#include <string.h>
#include <unistd.h>
#include <assert.h>
#ifdef ENABLE_AGENT_SUPPORT
# if !defined(HAVE_DOSISH_SYSTEM) && !defined(__riscos__)
# include <sys/socket.h>
# include <sys/un.h>
# endif
#endif
#if defined (_WIN32)
#include <windows.h>
#endif

View File

@ -38,6 +38,10 @@
#include "main.h"
#include "ttyio.h"
#ifdef __VMS
# include "vms.h"
#endif /* __VMS */
#ifdef HAVE_DOSISH_SYSTEM
void init_signals(void) {}
void pause_on_sigusr(int which) {}
@ -110,6 +114,12 @@ got_fatal_signal( int sig )
#endif
write(2, " caught ... exiting\n", 20 );
#ifdef __VMS
/* 2006-08-10 SMS.
Restore terminal echo, if needed, before exiting. */
vms_set_term_echo (-1);
#endif /* def __VMS */
/* Reset action to default action and raise signal again. */
init_one_signal (sig, SIG_DFL, 0);
remove_lockfiles ();

View File

@ -38,6 +38,9 @@
yet... */
#ifndef T_CERT
# define T_CERT 37
# ifdef __VMS
# include "cert_vms.h"
# endif /* def __VMS */
#endif
#ifdef USE_DNS_CERT

View File

@ -123,6 +123,28 @@ log_set_strict(int val)
void
g10_log_print_prefix(const char *text)
{
#ifdef __VMS
/* 2006-08-10 SMS.
VMS terminal carriage control differs from that on UNIX, and one
result is overwritten messages when terminal output is done
through multiple file pointers (like logfp and ttyfp), even when
they both are connected to the same terminal. The accomodation
attempted here is to initialize ttyfp before logfp, and if stderr
and ttyfp are both terminals (presumably the same one), to set an
unset logfp to ttyfp instead of to stderr. */
if (!logfp )
{
FILE *ttyfp_local;
init_ttyfp();
ttyfp_local = ttyfp_is ();
if (isatty (fileno (stderr)) && isatty (fileno (ttyfp_local)))
{
logfp = ttyfp_local;
}
}
#endif /* def __VMS */
if( !logfp )
logfp = stderr;
if( pgm_name )

View File

@ -189,7 +189,11 @@ lock_pool( void *p, size_t n )
&& errno != ENOMEM
#endif
)
#ifdef __VMS
log_warning ("can't lock memory: %s\n", strerror(err));
#else
log_error ("can't lock memory: %s\n", strerror(err));
#endif
show_warning = 1;
}

View File

@ -37,6 +37,9 @@
yet... */
#ifndef T_SRV
# define T_SRV 33
# ifdef __VMS
# include "cert_vms.h"
# endif /* def __VMS */
#endif
static int