mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
More changes on the way to remove secring.gpg.
This commit is contained in:
parent
00f8eafbef
commit
a1412b05de
31 changed files with 843 additions and 936 deletions
|
@ -423,6 +423,14 @@ es_pth_write (int fd, const void *buffer, size_t size)
|
|||
|
||||
|
||||
|
||||
static void
|
||||
es_deinit (void)
|
||||
{
|
||||
/* Flush all streams. */
|
||||
es_fflush (NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Initialization.
|
||||
*/
|
||||
|
@ -430,17 +438,20 @@ es_pth_write (int fd, const void *buffer, size_t size)
|
|||
static int
|
||||
es_init_do (void)
|
||||
{
|
||||
#ifdef HAVE_PTH
|
||||
static int initialized;
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
#ifdef HAVE_PTH
|
||||
if (!pth_init () && errno != EPERM )
|
||||
return -1;
|
||||
if (pth_mutex_init (&estream_list_lock))
|
||||
initialized = 1;
|
||||
}
|
||||
#else
|
||||
initialized = 1;
|
||||
#endif
|
||||
atexit (es_deinit);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue