aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-09-03 15:27:30 +0000
committerWerner Koch <[email protected]>2009-09-03 15:27:30 +0000
commit79566204852adedee814f6424060f8440e82b63e (patch)
tree31146a40a6bf5873e5b137e676fef1b66ee5a8c3
parentUpdate zH_TW and check for stdint.h (diff)
downloadgnupg-79566204852adedee814f6424060f8440e82b63e.tar.gz
gnupg-79566204852adedee814f6424060f8440e82b63e.zip
Fix a W32 problem
-rw-r--r--include/ChangeLog4
-rw-r--r--include/util.h3
-rw-r--r--scripts/ChangeLog4
-rw-r--r--scripts/w32installer.nsi2
-rw-r--r--util/ChangeLog3
-rw-r--r--util/argparse.c2
-rw-r--r--util/strgutil.c13
-rw-r--r--util/ttyio.c8
8 files changed, 31 insertions, 8 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 9a9fa5bd5..aa0cba88a 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-03 Werner Koch <[email protected]>
+
+ * util.h (xtryvasprintf): New.
+
2009-08-25 Werner Koch <[email protected]>
* compat.h: Add xstrconcat.
diff --git a/include/util.h b/include/util.h
index 72e3959e2..4b3c40bbb 100644
--- a/include/util.h
+++ b/include/util.h
@@ -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 --*/
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index a6b536f12..eca136ae4 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-03 Werner Koch <[email protected]>
+
+ * w32installer.nsi: Set the final OutPath to Doc/.
+
2008-01-30 Werner Koch <[email protected]>
* w32installer.nsi: Set the OutPath back.
diff --git a/scripts/w32installer.nsi b/scripts/w32installer.nsi
index bccdd0fb2..317149d30 100644
--- a/scripts/w32installer.nsi
+++ b/scripts/w32installer.nsi
@@ -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"
diff --git a/util/ChangeLog b/util/ChangeLog
index 152b859e3..534e59dd3 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,5 +1,8 @@
2009-09-03 Werner Koch <[email protected]>
+ * 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.
diff --git a/util/argparse.c b/util/argparse.c
index 164009062..2f1c6d250 100644
--- a/util/argparse.c
+++ b/util/argparse.c
@@ -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";
diff --git a/util/strgutil.c b/util/strgutil.c
index 5193df0f8..91e20f24b 100644
--- a/util/strgutil.c
+++ b/util/strgutil.c
@@ -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 ********
****************************************************/
diff --git a/util/ttyio.c b/util/ttyio.c
index d02a884ee..3adcdf9ca 100644
--- a/util/ttyio.c
+++ b/util/ttyio.c
@@ -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))