mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
* signal.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on mingw32.
Noted by Joe Vender. * passphrase.c [_WIN32]: Remove unused variables.
This commit is contained in:
parent
a644a1d3d7
commit
7bf9354bf6
@ -1,3 +1,10 @@
|
|||||||
|
2005-06-01 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* signal.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on
|
||||||
|
mingw32. Noted by Joe Vender.
|
||||||
|
|
||||||
|
* passphrase.c [_WIN32]: Remove unused variables.
|
||||||
|
|
||||||
2005-05-31 David Shaw <dshaw@jabberwocky.com>
|
2005-05-31 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* keyedit.c (menu_clean_uids_from_key,
|
* keyedit.c (menu_clean_uids_from_key,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* passphrase.c - Get a passphrase
|
/* passphrase.c - Get a passphrase
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
* 2004, 2005 Free Software Foundation, Inc.
|
* 2005 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -73,17 +73,10 @@
|
|||||||
*(p) <= 'F'? (*(p)-'A'+10):(*(p)-'a'+10))
|
*(p) <= 'F'? (*(p)-'A'+10):(*(p)-'a'+10))
|
||||||
#define xtoi_2(p) ((xtoi_1(p) * 16) + xtoi_1((p)+1))
|
#define xtoi_2(p) ((xtoi_1(p) * 16) + xtoi_1((p)+1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static char *fd_passwd = NULL;
|
static char *fd_passwd = NULL;
|
||||||
static char *next_pw = NULL;
|
static char *next_pw = NULL;
|
||||||
static char *last_pw = NULL;
|
static char *last_pw = NULL;
|
||||||
|
|
||||||
#if defined (_WIN32)
|
|
||||||
static int read_fd = 0;
|
|
||||||
static int write_fd = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void hash_passphrase( DEK *dek, char *pw, STRING2KEY *s2k, int create );
|
static void hash_passphrase( DEK *dek, char *pw, STRING2KEY *s2k, int create );
|
||||||
|
|
||||||
int
|
int
|
||||||
|
18
g10/signal.c
18
g10/signal.c
@ -1,6 +1,6 @@
|
|||||||
/* signal.c - signal handling
|
/* signal.c - signal handling
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2003,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
* 2004 Free Software Foundation, Inc.
|
* 2005 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -40,13 +40,16 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "ttyio.h"
|
#include "ttyio.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_DOSISH_SYSTEM
|
||||||
|
void init_signals(void) {}
|
||||||
|
void pause_on_sigusr(int which) {}
|
||||||
|
#else
|
||||||
static volatile int caught_fatal_sig = 0;
|
static volatile int caught_fatal_sig = 0;
|
||||||
static volatile int caught_sigusr1 = 0;
|
static volatile int caught_sigusr1 = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_one_signal (int sig, RETSIGTYPE (*handler)(int), int check_ign )
|
init_one_signal (int sig, RETSIGTYPE (*handler)(int), int check_ign )
|
||||||
{
|
{
|
||||||
#ifndef HAVE_DOSISH_SYSTEM
|
|
||||||
#if defined(HAVE_SIGACTION) && defined(HAVE_STRUCT_SIGACTION)
|
#if defined(HAVE_SIGACTION) && defined(HAVE_STRUCT_SIGACTION)
|
||||||
struct sigaction oact, nact;
|
struct sigaction oact, nact;
|
||||||
|
|
||||||
@ -70,7 +73,6 @@ init_one_signal (int sig, RETSIGTYPE (*handler)(int), int check_ign )
|
|||||||
signal (sig, SIG_IGN);
|
signal (sig, SIG_IGN);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /*!HAVE_DOSISH_SYSTEM*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
@ -129,7 +131,6 @@ got_usr_signal( int sig )
|
|||||||
void
|
void
|
||||||
init_signals()
|
init_signals()
|
||||||
{
|
{
|
||||||
#ifndef HAVE_DOSISH_SYSTEM
|
|
||||||
init_one_signal (SIGINT, got_fatal_signal, 1 );
|
init_one_signal (SIGINT, got_fatal_signal, 1 );
|
||||||
init_one_signal (SIGHUP, got_fatal_signal, 1 );
|
init_one_signal (SIGHUP, got_fatal_signal, 1 );
|
||||||
init_one_signal (SIGTERM, got_fatal_signal, 1 );
|
init_one_signal (SIGTERM, got_fatal_signal, 1 );
|
||||||
@ -137,14 +138,12 @@ init_signals()
|
|||||||
init_one_signal (SIGSEGV, got_fatal_signal, 1 );
|
init_one_signal (SIGSEGV, got_fatal_signal, 1 );
|
||||||
init_one_signal (SIGUSR1, got_usr_signal, 0 );
|
init_one_signal (SIGUSR1, got_usr_signal, 0 );
|
||||||
init_one_signal (SIGPIPE, SIG_IGN, 0 );
|
init_one_signal (SIGPIPE, SIG_IGN, 0 );
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
pause_on_sigusr( int which )
|
pause_on_sigusr( int which )
|
||||||
{
|
{
|
||||||
#ifndef HAVE_DOSISH_SYSTEM
|
|
||||||
#if defined(HAVE_SIGPROCMASK) && defined(HAVE_SIGSET_T)
|
#if defined(HAVE_SIGPROCMASK) && defined(HAVE_SIGSET_T)
|
||||||
sigset_t mask, oldmask;
|
sigset_t mask, oldmask;
|
||||||
|
|
||||||
@ -165,7 +164,6 @@ pause_on_sigusr( int which )
|
|||||||
caught_sigusr1 = 0;
|
caught_sigusr1 = 0;
|
||||||
sigrelse(SIGUSR1);
|
sigrelse(SIGUSR1);
|
||||||
#endif /*! HAVE_SIGPROCMASK && HAVE_SIGSET_T */
|
#endif /*! HAVE_SIGPROCMASK && HAVE_SIGSET_T */
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disabled - see comment in tdbio.c:tdbio_begin_transaction() */
|
/* Disabled - see comment in tdbio.c:tdbio_begin_transaction() */
|
||||||
@ -173,7 +171,6 @@ pause_on_sigusr( int which )
|
|||||||
static void
|
static void
|
||||||
do_block( int block )
|
do_block( int block )
|
||||||
{
|
{
|
||||||
#ifndef HAVE_DOSISH_SYSTEM
|
|
||||||
static int is_blocked;
|
static int is_blocked;
|
||||||
#if defined(HAVE_SIGPROCMASK) && defined(HAVE_SIGSET_T)
|
#if defined(HAVE_SIGPROCMASK) && defined(HAVE_SIGSET_T)
|
||||||
static sigset_t oldmask;
|
static sigset_t oldmask;
|
||||||
@ -223,7 +220,6 @@ do_block( int block )
|
|||||||
is_blocked = 0;
|
is_blocked = 0;
|
||||||
}
|
}
|
||||||
#endif /*! HAVE_SIGPROCMASK && HAVE_SIGSET_T */
|
#endif /*! HAVE_SIGPROCMASK && HAVE_SIGSET_T */
|
||||||
#endif /*HAVE_DOSISH_SYSTEM*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -238,3 +234,5 @@ unblock_all_signals()
|
|||||||
do_block(0);
|
do_block(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* !HAVE_DOSISH_SYSTEM */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user