diff options
author | Werner Koch <wk@gnupg.org> | 1998-08-05 18:51:59 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-08-05 18:51:59 +0200 |
commit | 9b609091ab3249a41c3a9f2417ba0250405792c8 (patch) | |
tree | eac3b271488722262dd71f003641d88d35fb64a1 /util | |
parent | add coprocess facility (diff) | |
download | gnupg2-9b609091ab3249a41c3a9f2417ba0250405792c8.tar.xz gnupg2-9b609091ab3249a41c3a9f2417ba0250405792c8.zip |
intermediate check in
Diffstat (limited to 'util')
-rw-r--r-- | util/ChangeLog | 4 | ||||
-rw-r--r-- | util/iobuf.c | 2 | ||||
-rw-r--r-- | util/secmem.c | 7 |
3 files changed, 11 insertions, 2 deletions
diff --git a/util/ChangeLog b/util/ChangeLog index aa9afe6e3..ece073420 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,7 @@ +Mon Aug 3 17:06:00 1998 Werner Koch (wk@(none)) + + * secmem.c (MAP_ANON): Add a macro test + Wed Jul 29 14:53:34 1998 Werner Koch (wk@(none)) * ttyio.c (tty_get_answer_is_yes): New. diff --git a/util/iobuf.c b/util/iobuf.c index 3067ac433..6ad001334 100644 --- a/util/iobuf.c +++ b/util/iobuf.c @@ -706,6 +706,8 @@ iobuf_pop_filter( IOBUF a, int (*f)(void *opaque, int control, m_free(a->d.buf); memcpy(a,b, sizeof *a); m_free(b); + if( DBG_IOBUF ) + log_debug("iobuf-%d.%d: popped filter\n", a->no, a->subno ); } else if( !b->chain ) { /* remove the last iobuf from the chain */ log_bug("Ohh jeee, trying to remove a head filter\n"); diff --git a/util/secmem.c b/util/secmem.c index 583c96201..d78fabecf 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -35,6 +35,9 @@ #include "util.h" #include "i18n.h" +#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) + #define MAP_ANONYMOUS MAP_ANON +#endif #define DEFAULT_POOLSIZE 8196 @@ -105,10 +108,10 @@ init_pool( size_t n) if( disable_secmem ) log_bug("secure memory is disabled"); - #if HAVE_MMAP && defined(MAP_ANONYMOUS) + #if HAVE_MMAP && defined(MAP_ANON) poolsize = (poolsize + 4095) & ~4095; pool = mmap( 0, poolsize, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + MAP_PRIVATE|MAP_ANON, -1, 0); if( pool == (void*)-1 ) log_error("can't mmap pool of %u bytes: %s - using malloc\n", (unsigned)poolsize, strerror(errno)); |