mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-11 21:48:50 +01:00
Fix a W32 problem
This commit is contained in:
parent
91272a546f
commit
7956620485
@ -1,3 +1,7 @@
|
||||
2009-09-03 Werner Koch <wk@g10code.com>
|
||||
|
||||
* util.h (xtryvasprintf): New.
|
||||
|
||||
2009-08-25 Werner Koch <wk@g10code.com>
|
||||
|
||||
* compat.h: Add xstrconcat.
|
||||
|
@ -20,9 +20,7 @@
|
||||
#ifndef G10_UTIL_H
|
||||
#define G10_UTIL_H
|
||||
|
||||
#if defined (_WIN32) || defined (__CYGWIN32__)
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "errors.h"
|
||||
@ -245,6 +243,7 @@ int write_w32_registry_string(const char *root, const char *dir,
|
||||
/*-- strgutil.c --*/
|
||||
char *xasprintf (const char *fmt, ...);
|
||||
char *xtryasprintf (const char *fmt, ...);
|
||||
char *xtryvasprintf (const char *fmt, va_list arg_ptr);
|
||||
|
||||
|
||||
/*-- pka.c --*/
|
||||
|
@ -1,3 +1,7 @@
|
||||
2009-09-03 Werner Koch <wk@g10code.com>
|
||||
|
||||
* w32installer.nsi: Set the final OutPath to Doc/.
|
||||
|
||||
2008-01-30 Werner Koch <wk@g10code.com>
|
||||
|
||||
* w32installer.nsi: Set the OutPath back.
|
||||
|
@ -352,7 +352,7 @@ Section "-Finish"
|
||||
;;
|
||||
|
||||
# Set the Outpath pack so that the README file can be displayed.
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOutPath "$INSTDIR\Doc"
|
||||
|
||||
SectionEnd ; "-Finish"
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
2009-09-03 Werner Koch <wk@g10code.com>
|
||||
|
||||
* ttyio.c (tty_printf) [_WIN32]: s/xtryasprintf/xtryvasprint/
|
||||
* strgutil.c (xtryvasprintf): New.
|
||||
|
||||
* estream-printf.c: Include stdint.h only if HAVE_STDINT_H is
|
||||
defined. Problem reported by Nelson H. F. Beebe.
|
||||
* estream.m4: Check for stdint.h.
|
||||
|
@ -917,7 +917,7 @@ default_strusage( int level )
|
||||
break;
|
||||
case 11: p = "foo"; break;
|
||||
case 13: p = "0.0"; break;
|
||||
case 14: p = "Copyright (C) 2008 Free Software Foundation, Inc."; break;
|
||||
case 14: p = "Copyright (C) 2009 Free Software Foundation, Inc."; break;
|
||||
case 15: p =
|
||||
"This is free software: you are free to change and redistribute it.\n"
|
||||
"There is NO WARRANTY, to the extent permitted by law.\n";
|
||||
|
@ -1153,6 +1153,19 @@ xtryasprintf (const char *fmt, ...)
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
xtryvasprintf (const char *fmt, va_list arg_ptr)
|
||||
{
|
||||
int rc;
|
||||
char *buf;
|
||||
|
||||
rc = estream_vasprintf (&buf, fmt, arg_ptr);
|
||||
if (rc < 0)
|
||||
return NULL;
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************
|
||||
******** locale insensitive ctype functions ********
|
||||
****************************************************/
|
||||
|
@ -243,9 +243,9 @@ tty_printf( const char *fmt, ... )
|
||||
int n;
|
||||
DWORD nwritten;
|
||||
|
||||
buf = xtryasprintf(fmt, arg_ptr);
|
||||
buf = xtryvasprintf(fmt, arg_ptr);
|
||||
if (!buf)
|
||||
log_bug("xtryasprintf() failed\n");
|
||||
log_bug("xtryvasprintf() failed\n");
|
||||
n = strlen (buf);
|
||||
|
||||
if (!WriteConsoleA (con.out, buf, n, &nwritten, NULL))
|
||||
@ -291,9 +291,9 @@ tty_fprintf (FILE *fp, const char *fmt, ... )
|
||||
int n;
|
||||
DWORD nwritten;
|
||||
|
||||
buf = xtryasprintf (fmt, arg_ptr);
|
||||
buf = xtryvasprintf (fmt, arg_ptr);
|
||||
if (!buf)
|
||||
log_bug ("xtryasprintf() failed\n");
|
||||
log_bug ("xtryvasprintf() failed\n");
|
||||
n = strlen (buf);
|
||||
|
||||
if (!WriteConsoleA (con.out, buf, n, &nwritten, NULL))
|
||||
|
Loading…
Reference in New Issue
Block a user