GNUPG-1-9-BRANCH gnupg (10 files)

cvs user wk cvs at cvs.gnupg.org
Tue Dec 7 12:13:39 CET 2004


    Date: Tuesday, December 7, 2004 @ 12:21:40
  Author: wk
    Path: /cvs/gnupg/gnupg
     Tag: GNUPG-1-9-BRANCH

   Added: jnlib/w32-pth.c
Modified: common/ChangeLog common/asshelp.c configure.ac jnlib/ChangeLog
          jnlib/Makefile.am jnlib/w32-pth.h sm/ChangeLog sm/Makefile.am
          sm/misc.c

* asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.

* w32-pth.c, w32-pth.h: New.

* Makefile.am (gpgsm_LDADD): Put libassuan before jnlib because
under W32 we need the w32 pth code from jnlib.

* misc.c (setup_pinentry_env) [W32]: Disabled.


-------------------+
 common/ChangeLog  |    4 ++++
 common/asshelp.c  |    5 +++++
 configure.ac      |    4 ++--
 jnlib/ChangeLog   |    4 ++++
 jnlib/Makefile.am |    4 +++-
 jnlib/w32-pth.c   |   42 ++++++++++++++++++++++++++++++++++++++++++
 jnlib/w32-pth.h   |    6 +++---
 sm/ChangeLog      |    7 +++++++
 sm/Makefile.am    |    5 +++--
 sm/misc.c         |    3 ++-
 10 files changed, 75 insertions(+), 9 deletions(-)


Index: gnupg/common/ChangeLog
diff -u gnupg/common/ChangeLog:1.30.2.32 gnupg/common/ChangeLog:1.30.2.33
--- gnupg/common/ChangeLog:1.30.2.32	Mon Dec  6 19:28:56 2004
+++ gnupg/common/ChangeLog	Tue Dec  7 12:21:40 2004
@@ -1,3 +1,7 @@
+2004-12-07  Werner Koch  <wk at g10code.com>
+
+	* asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
+
 2004-12-06  Werner Koch  <wk at g10code.com>
 
 	* exechelp.h, exechelp.c: New.  Based on code from ../sm/import.c.
Index: gnupg/common/asshelp.c
diff -u gnupg/common/asshelp.c:1.1.2.1 gnupg/common/asshelp.c:1.1.2.2
--- gnupg/common/asshelp.c:1.1.2.1	Sat Mar  6 21:11:17 2004
+++ gnupg/common/asshelp.c	Tue Dec  7 12:21:40 2004
@@ -66,8 +66,13 @@
   if (!opt_ttyname)
     {
       dft_ttyname = getenv ("GPG_TTY");
+#ifdef HAVE_DOSISH_SYSTEM
+      if (!dft_ttyname || !*dft_ttyname )
+        dft_ttyname = "/dev/tty"; /* Use a fake. */
+#else      
       if ((!dft_ttyname || !*dft_ttyname) && ttyname (0))
         dft_ttyname = ttyname (0);
+#endif
     }
   if (opt_ttyname || dft_ttyname)
     {
Index: gnupg/configure.ac
diff -u gnupg/configure.ac:1.36.2.71 gnupg/configure.ac:1.36.2.72
--- gnupg/configure.ac:1.36.2.71	Mon Dec  6 14:49:14 2004
+++ gnupg/configure.ac	Tue Dec  7 12:21:40 2004
@@ -345,7 +345,7 @@
 have_dosish_system=no
 have_w32_system=no
 case "${host}" in
-    *-*-mingw32*)
+    *-mingw32*)
         # special stuff for Windoze NT
         ac_cv_have_dev_random=no
         AC_DEFINE(USE_ONLY_8DOT3,1,
@@ -677,7 +677,7 @@
 AC_SUBST(GPGKEYS_MAILTO)
 
 case "${host}" in
-    *-*-mingw32*)
+    *-mingw32*)
         PRINTABLE_OS_NAME="MingW32"
         ;;
     *-*-cygwin*)
Index: gnupg/jnlib/ChangeLog
diff -u gnupg/jnlib/ChangeLog:1.3.2.19 gnupg/jnlib/ChangeLog:1.3.2.20
--- gnupg/jnlib/ChangeLog:1.3.2.19	Thu Dec  2 08:48:09 2004
+++ gnupg/jnlib/ChangeLog	Tue Dec  7 12:21:40 2004
@@ -1,3 +1,7 @@
+2004-12-07  Werner Koch  <wk at g10code.com>
+
+	* w32-pth.c, w32-pth.h: New.
+
 2004-11-26  Werner Koch  <wk at g10code.com>
 
 	* logging.c [_WIN32]: Don't include socket headers.
Index: gnupg/jnlib/Makefile.am
diff -u gnupg/jnlib/Makefile.am:1.4.2.3 gnupg/jnlib/Makefile.am:1.4.2.4
--- gnupg/jnlib/Makefile.am:1.4.2.3	Thu Feb 12 10:29:00 2004
+++ gnupg/jnlib/Makefile.am	Tue Dec  7 12:21:40 2004
@@ -37,7 +37,9 @@
 	argparse.c argparse.h \
 	logging.c logging.h  \
 	dotlock.c dotlock.h  \
-	types.h mischelp.h
+	types.h mischelp.h \
+	w32-pth.c w32-pth.h \
+	w32-afunix.c w32-afunix.h 
 
 #		     xmalloc.c xmalloc.h       
 
Index: gnupg/jnlib/w32-pth.c
diff -u /dev/null gnupg/jnlib/w32-pth.c:1.1.2.1
--- /dev/null	Tue Dec  7 12:21:40 2004
+++ gnupg/jnlib/w32-pth.c	Tue Dec  7 12:21:40 2004
@@ -0,0 +1,42 @@
+/* w32-pth.c - GNU Pth emulation for W32 (MS Windows).
+ * Copyright (C) 2004 g10 Code GmbH
+ *
+ * This file is part of GnuPG.
+ *
+ * GnuPG is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include <config.h>
+#ifdef HAVE_W32_SYSTEM
+#include <stdio.h>
+#include <windows.h>
+#include <io.h>
+
+#include "w32-pth.h"
+
+ssize_t
+pth_read (int fd, void *buffer, size_t size)
+{
+  return read (fd, buffer, size);
+}
+
+ssize_t
+pth_write (int fd, const void *buffer, size_t size)
+{
+  return write (fd, buffer, size);
+}
+
+
+#endif /*HAVE_W32_SYSTEM*/
Index: gnupg/jnlib/w32-pth.h
diff -u gnupg/jnlib/w32-pth.h:1.1.2.1 gnupg/jnlib/w32-pth.h:1.1.2.2
--- gnupg/jnlib/w32-pth.h:1.1.2.1	Mon Dec  6 14:49:14 2004
+++ gnupg/jnlib/w32-pth.h	Tue Dec  7 12:21:40 2004
@@ -18,9 +18,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 
  */
 
-/* Note that this header is usually through a symlinked pth.h file.
-   This is needed so that we don't have a pth.h file here which would
-   conflict if a system really has pth available. */
+/* Note that this header is usually used through a symlinked pth.h
+   file.  This is needed so that we don't have a pth.h file here which
+   would conflict if a system really has pth available. */
 #ifndef W32_PTH_H
 #define W32_PTH_H
 
Index: gnupg/sm/ChangeLog
diff -u gnupg/sm/ChangeLog:1.101.2.78 gnupg/sm/ChangeLog:1.101.2.79
--- gnupg/sm/ChangeLog:1.101.2.78	Mon Dec  6 19:28:56 2004
+++ gnupg/sm/ChangeLog	Tue Dec  7 12:21:40 2004
@@ -1,3 +1,10 @@
+2004-12-07  Werner Koch  <wk at g10code.com>
+
+	* Makefile.am (gpgsm_LDADD): Put libassuan before jnlib because
+	under W32 we need the w32 pth code from jnlib.
+
+	* misc.c (setup_pinentry_env) [W32]: Disabled.
+
 2004-12-06  Werner Koch  <wk at g10code.com>
 
 	* gpgsm.c (run_protect_tool) [_WIN32]: Disabled.
Index: gnupg/sm/Makefile.am
diff -u gnupg/sm/Makefile.am:1.27.2.2 gnupg/sm/Makefile.am:1.27.2.3
--- gnupg/sm/Makefile.am:1.27.2.2	Thu Sep 30 16:34:23 2004
+++ gnupg/sm/Makefile.am	Tue Dec  7 12:21:40 2004
@@ -51,8 +51,9 @@
 	certreqgen.c 
 
 
-gpgsm_LDADD = ../jnlib/libjnlib.a ../kbx/libkeybox.a ../common/libcommon.a \
-               $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(KSBA_LIBS) -lgpg-error \
+gpgsm_LDADD = $(LIBASSUAN_LIBS) ../jnlib/libjnlib.a ../kbx/libkeybox.a	\
+               ../common/libcommon.a \
+               $(LIBGCRYPT_LIBS)  $(KSBA_LIBS) -lgpg-error \
 	       $(LIBINTL)
 
 
Index: gnupg/sm/misc.c
diff -u gnupg/sm/misc.c:1.3.2.3 gnupg/sm/misc.c:1.3.2.4
--- gnupg/sm/misc.c:1.3.2.3	Mon Oct  4 15:21:37 2004
+++ gnupg/sm/misc.c	Tue Dec  7 12:21:40 2004
@@ -38,6 +38,7 @@
 void
 setup_pinentry_env (void)
 {
+#ifndef HAVE_W32_SYSTEM
   char *lc;
 
   if (opt.display)
@@ -75,6 +76,6 @@
   else if ( (lc = setlocale (LC_MESSAGES, "")) )
     setenv ("LC_MESSAGES", lc, 1);
 #endif
-
+#endif /*!HAVE_W32_SYSTEM*/
 }
 




More information about the Gnupg-commits mailing list