mirror of git://git.gnupg.org/gnupg.git
* 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.
This commit is contained in:
parent
0a058ac53c
commit
b50a587d8d
|
@ -1,3 +1,7 @@
|
||||||
|
2004-12-07 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
|
||||||
|
|
||||||
2004-12-06 Werner Koch <wk@g10code.com>
|
2004-12-06 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.
|
* exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.
|
||||||
|
|
|
@ -66,8 +66,13 @@ send_pinentry_environment (assuan_context_t ctx,
|
||||||
if (!opt_ttyname)
|
if (!opt_ttyname)
|
||||||
{
|
{
|
||||||
dft_ttyname = getenv ("GPG_TTY");
|
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))
|
if ((!dft_ttyname || !*dft_ttyname) && ttyname (0))
|
||||||
dft_ttyname = ttyname (0);
|
dft_ttyname = ttyname (0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (opt_ttyname || dft_ttyname)
|
if (opt_ttyname || dft_ttyname)
|
||||||
{
|
{
|
||||||
|
|
|
@ -345,7 +345,7 @@ try_gettext=yes
|
||||||
have_dosish_system=no
|
have_dosish_system=no
|
||||||
have_w32_system=no
|
have_w32_system=no
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-mingw32*)
|
*-mingw32*)
|
||||||
# special stuff for Windoze NT
|
# special stuff for Windoze NT
|
||||||
ac_cv_have_dev_random=no
|
ac_cv_have_dev_random=no
|
||||||
AC_DEFINE(USE_ONLY_8DOT3,1,
|
AC_DEFINE(USE_ONLY_8DOT3,1,
|
||||||
|
@ -677,7 +677,7 @@ fi
|
||||||
AC_SUBST(GPGKEYS_MAILTO)
|
AC_SUBST(GPGKEYS_MAILTO)
|
||||||
|
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-mingw32*)
|
*-mingw32*)
|
||||||
PRINTABLE_OS_NAME="MingW32"
|
PRINTABLE_OS_NAME="MingW32"
|
||||||
;;
|
;;
|
||||||
*-*-cygwin*)
|
*-*-cygwin*)
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2004-12-07 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* w32-pth.c, w32-pth.h: New.
|
||||||
|
|
||||||
2004-11-26 Werner Koch <wk@g10code.com>
|
2004-11-26 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* logging.c [_WIN32]: Don't include socket headers.
|
* logging.c [_WIN32]: Don't include socket headers.
|
||||||
|
|
|
@ -37,7 +37,9 @@ libjnlib_a_SOURCES = \
|
||||||
argparse.c argparse.h \
|
argparse.c argparse.h \
|
||||||
logging.c logging.h \
|
logging.c logging.h \
|
||||||
dotlock.c dotlock.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
|
# xmalloc.c xmalloc.h
|
||||||
|
|
||||||
|
|
|
@ -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*/
|
|
@ -18,9 +18,9 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Note that this header is usually through a symlinked pth.h file.
|
/* Note that this header is usually used through a symlinked pth.h
|
||||||
This is needed so that we don't have a pth.h file here which would
|
file. This is needed so that we don't have a pth.h file here which
|
||||||
conflict if a system really has pth available. */
|
would conflict if a system really has pth available. */
|
||||||
#ifndef W32_PTH_H
|
#ifndef W32_PTH_H
|
||||||
#define W32_PTH_H
|
#define W32_PTH_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2004-12-07 Werner Koch <wk@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@g10code.com>
|
2004-12-06 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* gpgsm.c (run_protect_tool) [_WIN32]: Disabled.
|
* gpgsm.c (run_protect_tool) [_WIN32]: Disabled.
|
||||||
|
|
|
@ -51,8 +51,9 @@ gpgsm_SOURCES = \
|
||||||
certreqgen.c
|
certreqgen.c
|
||||||
|
|
||||||
|
|
||||||
gpgsm_LDADD = ../jnlib/libjnlib.a ../kbx/libkeybox.a ../common/libcommon.a \
|
gpgsm_LDADD = $(LIBASSUAN_LIBS) ../jnlib/libjnlib.a ../kbx/libkeybox.a \
|
||||||
$(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(KSBA_LIBS) -lgpg-error \
|
../common/libcommon.a \
|
||||||
|
$(LIBGCRYPT_LIBS) $(KSBA_LIBS) -lgpg-error \
|
||||||
$(LIBINTL)
|
$(LIBINTL)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
void
|
void
|
||||||
setup_pinentry_env (void)
|
setup_pinentry_env (void)
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_W32_SYSTEM
|
||||||
char *lc;
|
char *lc;
|
||||||
|
|
||||||
if (opt.display)
|
if (opt.display)
|
||||||
|
@ -75,6 +76,6 @@ setup_pinentry_env (void)
|
||||||
else if ( (lc = setlocale (LC_MESSAGES, "")) )
|
else if ( (lc = setlocale (LC_MESSAGES, "")) )
|
||||||
setenv ("LC_MESSAGES", lc, 1);
|
setenv ("LC_MESSAGES", lc, 1);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /*!HAVE_W32_SYSTEM*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue