[svn] GnuPG - r5146 - in branches/STABLE-BRANCH-1-4: include scripts util

svn author wk cvs at cvs.gnupg.org
Thu Sep 3 17:27:31 CEST 2009


Author: wk
Date: 2009-09-03 17:27:30 +0200 (Thu, 03 Sep 2009)
New Revision: 5146

Modified:
   branches/STABLE-BRANCH-1-4/include/ChangeLog
   branches/STABLE-BRANCH-1-4/include/util.h
   branches/STABLE-BRANCH-1-4/scripts/ChangeLog
   branches/STABLE-BRANCH-1-4/scripts/w32installer.nsi
   branches/STABLE-BRANCH-1-4/util/ChangeLog
   branches/STABLE-BRANCH-1-4/util/argparse.c
   branches/STABLE-BRANCH-1-4/util/strgutil.c
   branches/STABLE-BRANCH-1-4/util/ttyio.c
Log:
Fix a W32 problem


Modified: branches/STABLE-BRANCH-1-4/include/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/include/ChangeLog	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/include/ChangeLog	2009-09-03 15:27:30 UTC (rev 5146)
@@ -1,3 +1,7 @@
+2009-09-03  Werner Koch  <wk at g10code.com>
+
+	* util.h (xtryvasprintf): New.
+
 2009-08-25  Werner Koch  <wk at g10code.com>
 
 	* compat.h: Add xstrconcat.

Modified: branches/STABLE-BRANCH-1-4/scripts/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/scripts/ChangeLog	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/scripts/ChangeLog	2009-09-03 15:27:30 UTC (rev 5146)
@@ -1,3 +1,7 @@
+2009-09-03  Werner Koch  <wk at g10code.com>
+
+	* w32installer.nsi: Set the final OutPath to Doc/.
+
 2008-01-30  Werner Koch  <wk at g10code.com>
 
 	* w32installer.nsi: Set the OutPath back.

Modified: branches/STABLE-BRANCH-1-4/util/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/util/ChangeLog	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/util/ChangeLog	2009-09-03 15:27:30 UTC (rev 5146)
@@ -1,5 +1,8 @@
 2009-09-03  Werner Koch  <wk at 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.

Modified: branches/STABLE-BRANCH-1-4/include/util.h
===================================================================
--- branches/STABLE-BRANCH-1-4/include/util.h	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/include/util.h	2009-09-03 15:27:30 UTC (rev 5146)
@@ -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 @@
 /*-- strgutil.c --*/
 char *xasprintf (const char *fmt, ...);
 char *xtryasprintf (const char *fmt, ...);
+char *xtryvasprintf (const char *fmt, va_list arg_ptr);
 
 
 /*-- pka.c --*/

Modified: branches/STABLE-BRANCH-1-4/scripts/w32installer.nsi
===================================================================
--- branches/STABLE-BRANCH-1-4/scripts/w32installer.nsi	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/scripts/w32installer.nsi	2009-09-03 15:27:30 UTC (rev 5146)
@@ -352,7 +352,7 @@
   ;;
 
   # Set the Outpath pack so that the README file can be displayed.
-  SetOutPath "$INSTDIR"
+  SetOutPath "$INSTDIR\Doc"
 
 SectionEnd ; "-Finish"
 

Modified: branches/STABLE-BRANCH-1-4/util/argparse.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/argparse.c	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/util/argparse.c	2009-09-03 15:27:30 UTC (rev 5146)
@@ -917,7 +917,7 @@
         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"; 

Modified: branches/STABLE-BRANCH-1-4/util/strgutil.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/strgutil.c	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/util/strgutil.c	2009-09-03 15:27:30 UTC (rev 5146)
@@ -1153,6 +1153,19 @@
 }
 
 
+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 ********
  ****************************************************/

Modified: branches/STABLE-BRANCH-1-4/util/ttyio.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/ttyio.c	2009-09-03 14:08:25 UTC (rev 5145)
+++ branches/STABLE-BRANCH-1-4/util/ttyio.c	2009-09-03 15:27:30 UTC (rev 5146)
@@ -243,9 +243,9 @@
         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 @@
         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))




More information about the Gnupg-commits mailing list