diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/cert.c | 5 | ||||
-rw-r--r-- | util/logger.c | 22 | ||||
-rw-r--r-- | util/secmem.c | 6 | ||||
-rw-r--r-- | util/srv.c | 5 |
4 files changed, 35 insertions, 3 deletions
diff --git a/util/cert.c b/util/cert.c index 8bc924468..0eaead586 100644 --- a/util/cert.c +++ b/util/cert.c @@ -37,7 +37,10 @@ /* Not every installation has gotten around to supporting CERTs yet... */ #ifndef T_CERT -#define T_CERT 37 +# define T_CERT 37 +# ifdef __VMS +# include "cert_vms.h" +# endif /* def __VMS */ #endif #ifdef USE_DNS_CERT diff --git a/util/logger.c b/util/logger.c index 745344443..d63161196 100644 --- a/util/logger.c +++ b/util/logger.c @@ -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 ) diff --git a/util/secmem.c b/util/secmem.c index f54c3a5b4..88af07fde 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -189,7 +189,11 @@ lock_pool( void *p, size_t n ) && errno != ENOMEM #endif ) - log_error("can't lock memory: %s\n", strerror(err)); +#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; } diff --git a/util/srv.c b/util/srv.c index 1e23887ca..81df9f575 100644 --- a/util/srv.c +++ b/util/srv.c @@ -36,7 +36,10 @@ /* Not every installation has gotten around to supporting SRVs yet... */ #ifndef T_SRV -#define T_SRV 33 +# define T_SRV 33 +# ifdef __VMS +# include "cert_vms.h" +# endif /* def __VMS */ #endif static int |