mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +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
|
@ -1,5 +1,8 @@
|
|||
2010-04-20 Werner Koch <wk@g10code.com>
|
||||
|
||||
* estream.c (es_deinit): New.
|
||||
(es_init_do): Intll atexit handler to flush all streams.
|
||||
|
||||
* Makefile.am (common_sources): Add gettime.h.
|
||||
|
||||
2010-04-20 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
@ -16,7 +19,7 @@
|
|||
|
||||
2010-04-15 Werner Koch <wk@g10code.com>
|
||||
|
||||
* util.h: Factor time related fucntions out to ...
|
||||
* util.h: Factor time related functions out to ...
|
||||
* gettime.h: New.
|
||||
(gnupg_copy_time): Move to ...
|
||||
* gettime.c (gnupg_copy_time): New.
|
||||
|
|
|
@ -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