diff options
author | Werner Koch <wk@gnupg.org> | 2007-05-07 21:49:12 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2007-05-07 21:49:12 +0200 |
commit | d5052fd22864ebb879e3b417ecfefd88e6c1800a (patch) | |
tree | 82f547df2e3ac98021fd713f470cc00610482c8e /g10/openfile.c | |
parent | Updated to automake 1.10. (diff) | |
download | gnupg2-d5052fd22864ebb879e3b417ecfefd88e6c1800a.tar.xz gnupg2-d5052fd22864ebb879e3b417ecfefd88e6c1800a.zip |
Upgraded gettext.
Fixed accidental dependency on libgcrypt 1.3.0.
Diffstat (limited to 'g10/openfile.c')
-rw-r--r-- | g10/openfile.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/g10/openfile.c b/g10/openfile.c index 381f93bd2..d0be66157 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -77,6 +77,10 @@ overwrite_filep( const char *fname ) if ( !strcmp ( fname, "/dev/null" ) ) return 1; /* does not do any harm */ #endif +#ifdef HAVE_W32_SYSTEM + if ( !strcmp ( fname, "/dev/nul" ) ) + return 1; +#endif /* fixme: add some backup stuff in case of overwrite */ if( opt.answer_yes ) @@ -196,8 +200,14 @@ open_outfile( const char *iname, int mode, IOBUF *a ) char *buf = NULL; const char *name; - if( opt.dry_run ) - name = "/dev/null"; + if ( opt.dry_run ) + { +#ifdef HAVE_W32_SYSTEM + name = "/dev/nul"; +#else + name = "/dev/null"; +#endif + } else if( opt.outfile ) name = opt.outfile; else { |