[svn] pinentry - r188 - in trunk: . secmem
svn author wk
cvs at cvs.gnupg.org
Fri Oct 17 15:47:43 CEST 2008
Author: wk
Date: 2008-10-17 15:47:43 +0200 (Fri, 17 Oct 2008)
New Revision: 188
Modified:
trunk/ChangeLog
trunk/secmem/memory.h
trunk/secmem/secmem.c
Log:
C++ protection and a new function.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-07-25 13:46:53 UTC (rev 187)
+++ trunk/ChangeLog 2008-10-17 13:47:43 UTC (rev 188)
@@ -1,3 +1,9 @@
+2008-10-17 Werner Koch <wk at g10code.com>
+
+ * secmem/memory.h: Add C++ extern declaration.
+
+ * secmem/secmem.c (secmem_get_max_size): New.
+
2008-07-25 Marcus Brinkmann <marcus at ulysses.g10code.com>
* qt4/Makefile.am (DISTCLEANFILES): Rename to CLEANFILES.
Modified: trunk/secmem/memory.h
===================================================================
--- trunk/secmem/memory.h 2008-07-25 13:46:53 UTC (rev 187)
+++ trunk/secmem/memory.h 2008-10-17 13:47:43 UTC (rev 188)
@@ -22,6 +22,14 @@
#include <sys/types.h>
+#ifdef __cplusplus
+extern "C" {
+#if 0
+}
+#endif
+#endif
+
+
/* values for flags, hardcoded in secmem.c */
#define SECMEM_WARN 0
#define SECMEM_DONT_WARN 1
@@ -36,5 +44,12 @@
void secmem_dump_stats(void);
void secmem_set_flags( unsigned flags );
unsigned secmem_get_flags(void);
+size_t secmem_get_max_size (void);
+#if 0
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
#endif /* _MEMORY_H */
Modified: trunk/secmem/secmem.c
===================================================================
--- trunk/secmem/secmem.c 2008-07-25 13:46:53 UTC (rev 187)
+++ trunk/secmem/secmem.c 2008-10-17 13:47:43 UTC (rev 188)
@@ -446,3 +446,9 @@
(ulong)poollen, (ulong)poolsize );
}
+
+size_t
+secmem_get_max_size (void)
+{
+ return poolsize;
+}
More information about the Gnupg-commits
mailing list