summaryrefslogtreecommitdiff
path: root/lib/gnutls_mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gnutls_mem.h')
-rw-r--r--lib/gnutls_mem.h35
1 files changed, 7 insertions, 28 deletions
diff --git a/lib/gnutls_mem.h b/lib/gnutls_mem.h
index 9de14a0e94..aa0ab8e89a 100644
--- a/lib/gnutls_mem.h
+++ b/lib/gnutls_mem.h
@@ -5,7 +5,7 @@
# include <dmalloc.h>
#endif
-typedef void svoid; /* for functions that allocate using gnutls_secure_free */
+typedef void svoid; /* for functions that allocate using gnutls_secure_malloc */
/* Use gnutls_afree() when calling alloca, or
* memory leaks may occur in systems which do not
@@ -19,36 +19,15 @@ typedef void svoid; /* for functions that allocate using gnutls_secure_free */
# define gnutls_afree gnutls_free
#endif /* HAVE_ALLOCA */
-#ifdef USE_LIBCALLOC
-# define gnutls_malloc malloc
-# define gnutls_realloc realloc
-# define gnutls_realloc_fast(x, y) (y==0?x:realloc(x, y))
-# define gnutls_free free
-# define gnutls_calloc calloc
-# define gnutls_secure_malloc malloc
-# define gnutls_secure_realloc realloc
-# define gnutls_secure_free free
-# define gnutls_secure_calloc calloc
-# define gnutls_strdup strdup
-int _gnutls_is_secure_memory(const void*);
+void* (*gnutls_secure_malloc)(size_t);
+void* (*gnutls_malloc)(size_t);
+void (*gnutls_free)(void*);
+int (*_gnutls_is_secure_memory)(const void*);
+void* (*gnutls_realloc)(void*, size_t);
-#else
-
-svoid* gnutls_secure_malloc( size_t size);
svoid* gnutls_secure_calloc( size_t nmemb, size_t size);
-size_t _gnutls_secure_ptr_size( svoid* ptr);
-svoid* gnutls_secure_realloc( svoid* ptr, size_t size);
-void gnutls_secure_free( svoid* ptr);
-int _gnutls_is_secure_memory(const svoid* mem);
-
-void* gnutls_malloc( size_t size);
void* gnutls_calloc( size_t nmemb, size_t size);
-size_t _gnutls_malloc_ptr_size( void* ptr);
-void* gnutls_realloc( void* ptr, size_t size);
-void* gnutls_realloc_fast( void* ptr, size_t size);
-void gnutls_free( void* ptr);
-char* gnutls_strdup( const char* s);
-#endif
+char* gnutls_strdup( const char* s);
#endif /* GNUTLS_MEM_H */