aboutsummaryrefslogtreecommitdiffstats
path: root/include/memory.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-09-27 19:37:53 +0000
committerWerner Koch <[email protected]>2003-09-27 19:37:53 +0000
commit20ed53942acc3b30576bae70826cced13bc84f4e (patch)
treeec1060581a6d035dc7a292b15e77aef90001054a /include/memory.h
parent* options.h, g10.c (main), keylist.c (list_keyblock_print): Add (diff)
downloadgnupg-20ed53942acc3b30576bae70826cced13bc84f4e.tar.gz
gnupg-20ed53942acc3b30576bae70826cced13bc84f4e.zip
First bits of a card support backport from 1.9. It is not enabled by
default and tehre is not yet much more than a new configure option. * configure.ac (LIBUSB_LIBS,HAVE_LIBUSB): Check for Libusb. (--enable-card-support): New. * sign.c (do_sign) [ENABLE_CARD_SUPPORT]: Divert to card. * cardglue.c, cardglue.h: New. * Makefile.am (gpg_LDADD): Added. (card_support_sources): New. * memory.h (xmalloc): Define xmalloc macros in terms of m_alloc.
Diffstat (limited to 'include/memory.h')
-rw-r--r--include/memory.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/memory.h b/include/memory.h
index 959f2999e..2482d083f 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -90,4 +90,13 @@ unsigned secmem_get_flags(void);
EXTERN_UNLESS_MAIN_MODULE int memory_debug_mode;
EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
+/* To prepare a migration to the xmalloc suite of function as used in
+ 1.9 we define a couple of macros. */
+#define xmalloc(n) m_alloc ((n))
+#define xcalloc(n,m) m_alloc_clear ((n)*(m))
+#define xmalloc_secure(n) m_alloc_secure (n)
+#define xcalloc_secure(n) m_alloc_secure_clear ((n)*(m))
+#define xfree(a) m_free (a)
+
+
#endif /*G10_MEMORY_H*/