1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Minor changes to help the VMS port

This commit is contained in:
Werner Koch 2010-09-28 10:07:30 +00:00
parent 9921fb3a8c
commit aa29ba1689
19 changed files with 232 additions and 21 deletions

View file

@ -1,3 +1,29 @@
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 .
* 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>.
* signal.c [__VMS]: Include vms.h.
(got_fatal_signal) [__VMS]: Restore terminal echo.
* plaintext.c [__VMS]: Include vms.h.
* openfile.c (make_outfile_name): __VMS] Do not use.
(open_outfile) [__VMS]: Use vms_append_ext.
(try_make_homedir) [__VMS]: chmod directory.
* misc.c (disable_core_dumps) [__VMS]: Disable.
(path_access) [__VMS]: Do not use.
2010-09-28 Werner Koch <wk@g10code.com>
* passphrase.c [!ENABLE_AGENT_SUPPORT]: Do not include
sys/socket.h to help the VMS port.
2010-08-31 Werner Koch <wk@g10code.com>
* mainproc.c (print_pkenc_list): Print a STATUS_ERROR. Fixes

View file

@ -491,9 +491,14 @@ do_plaintext( IOBUF out, int ctb, PKT_plaintext *pt )
wipememory(buf,1000); /* burn the buffer */
if( (ctb&0x40) && !pt->len )
iobuf_set_partial_block_mode(out, 0 ); /* turn off partial */
/* On VMS, byte counts will not match for some file record
* formats, so it's best to disable the following error. */
#ifndef __VMS
if( pt->len && n != pt->len )
log_error("do_plaintext(): wrote %lu bytes but expected %lu bytes\n",
(ulong)n, (ulong)pt->len );
#endif
return rc;
}

View file

@ -418,6 +418,10 @@ void tty_kill_prompt(void) {}
int tty_get_answer_is_yes( const char *prompt ) {return 0;}
int tty_no_terminal(int onoff) {return 0;}
void tty_cleanup_after_signal (void) {}
#ifdef __VMS
FILE *ttyfp_is (void) { return stderr; }
void init_ttyfp (void) { }
#endif /*__VMS*/
#ifdef HAVE_LIBREADLINE
void tty_enable_completion(rl_completion_func_t *completer) {}
void tty_disable_completion(void) {}

View file

@ -1012,7 +1012,9 @@ keyserver_spawn(enum ks_action action,STRLIST list,KEYDB_SEARCH_DESC *desc,
command=xmalloc(strlen(libexecdir)+strlen(DIRSEP_S)+
GPGKEYS_PREFIX_LEN+strlen(scheme)+3+strlen(EXEEXT)+1);
strcpy(command,libexecdir);
strcat(command,DIRSEP_S);
#ifndef __VMS
strcat (command, DIRSEP_S);
#endif
}
end=command+strlen(command);

View file

@ -54,6 +54,10 @@
#include "dynload.h"
#endif /*_WIN32*/
#ifdef __VMS
# include <time.h>
#endif /* def __VMS */
#include "util.h"
#include "main.h"
#include "photoid.h"
@ -106,7 +110,7 @@ trap_unaligned(void)
int
disable_core_dumps()
{
#ifdef HAVE_DOSISH_SYSTEM
#if defined(HAVE_DOSISH_SYSTEM) || defined(__VMS)
return 0;
#else
#ifdef HAVE_SETRLIMIT
@ -1333,7 +1337,11 @@ get_libexecdir (void)
return GNUPG_LIBEXECDIR;
}
/* Similar to access(2), but uses PATH to find the file. */
/* Similar to access(2), but uses PATH to find the file.
(2006-07-08 SMS: See "vmslib/vms.c" for a VMS-specific replacement
function) */
#ifndef __VMS
int
path_access(const char *file,int mode)
{
@ -1376,3 +1384,5 @@ path_access(const char *file,int mode)
return ret;
}
#endif /*ndef __VMS*/

View file

@ -98,7 +98,11 @@ overwrite_filep( const char *fname )
/****************
* Strip know extensions from iname and return a newly allocated
* filename. Return NULL if we can't do that.
*
* (See vmslib/vms.c for the VMS-specific replacement function,
* vms_make_outfile_name())
*/
#ifndef __VMS
char *
make_outfile_name( const char *iname )
{
@ -125,6 +129,7 @@ make_outfile_name( const char *iname )
log_info(_("%s: unknown suffix\n"), iname );
return NULL;
}
#endif /* ndef __VMS */
/****************

View file

@ -39,6 +39,13 @@
#include "status.h"
#include "i18n.h"
#ifdef __VMS
# include "vms.h" /* Not part of the standard GnuPG tarball. See
http://antinode.info/dec/sw/gnupg.html */
# define fopen fopen_vms
#endif /* def __VMS */
/****************
* Handle a plaintext packet. If MFX is not NULL, update the MDs