aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog26
-rw-r--r--g10/build-packet.c5
-rw-r--r--g10/gpgv.c4
-rw-r--r--g10/keyserver.c4
-rw-r--r--g10/misc.c14
-rw-r--r--g10/openfile.c5
-rw-r--r--g10/plaintext.c7
7 files changed, 62 insertions, 3 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index a9233c1f4..8085c097d 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,29 @@
+2010-09-28 Werner Koch <[email protected]>
+
+ * gpgv.c (ttyfp_is, init_ttyfp) [__VMS]: Add subs.
+
+2010-09-28 Steven M. Schweda <[email protected]> (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 <[email protected]>
+
+ * passphrase.c [!ENABLE_AGENT_SUPPORT]: Do not include
+ sys/socket.h to help the VMS port.
+
2010-08-31 Werner Koch <[email protected]>
* mainproc.c (print_pkenc_list): Print a STATUS_ERROR. Fixes
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 4db1d5830..7eceda0e7 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -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;
}
diff --git a/g10/gpgv.c b/g10/gpgv.c
index c906be7b2..d93da38fb 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -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) {}
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 0c67f9b64..80e934ef3 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -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);
diff --git a/g10/misc.c b/g10/misc.c
index f41e5b75c..8dd4e52b1 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -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*/
+
diff --git a/g10/openfile.c b/g10/openfile.c
index 94d00cf24..0ac5965cd 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -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 */
/****************
diff --git a/g10/plaintext.c b/g10/plaintext.c
index 61c4f24a3..29324d90d 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -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