From 97efb85f51438d3f9e66e40c47db52dd90aca954 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 21 Jan 2004 04:35:32 +0000 Subject: [PATCH] * keylist.c (set_attrib_fd): Open attribute fd in binary mode. This isn't meaningful on POSIX systems, but the Mingw builds aren't exactly POSIX. --- g10/ChangeLog | 4 ++++ g10/keylist.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index 09035df37..03e3efd61 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,9 @@ 2004-01-20 David Shaw + * keylist.c (set_attrib_fd): Open attribute fd in binary + mode. This isn't meaningful on POSIX systems, but the Mingw builds + aren't exactly POSIX. + * trustdb.c (reset_trust_records): New, faster, implementation that doesn't involve a keyring scan. (clear_validity): Removed. diff --git a/g10/keylist.c b/g10/keylist.c index 1cc9720e2..29cf9462d 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -1,6 +1,6 @@ /* keylist.c - * Copyright (C) 1998, 1999, 2000, 2001, 2002 - * 2003 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 + * 2004 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -1469,10 +1469,11 @@ void set_attrib_fd(int fd) else if( fd == 2 ) attrib_fp = stderr; else - attrib_fp = fdopen( fd, "w" ); + attrib_fp = fdopen( fd, "wb" ); if( !attrib_fp ) { log_fatal("can't open fd %d for attribute output: %s\n", fd, strerror(errno)); } + last_fd = fd; }