diff options
author | Werner Koch <[email protected]> | 2004-06-14 08:32:07 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-06-14 08:32:07 +0000 |
commit | feb40e2c6ec1eb008960fbcbbb683c96110bf8aa (patch) | |
tree | 698dbaefd7987af73d70e87820d2ca1b286bbd9a /tools/no-libgcrypt.c | |
parent | post release version bump (diff) | |
download | gnupg-feb40e2c6ec1eb008960fbcbbb683c96110bf8aa.tar.gz gnupg-feb40e2c6ec1eb008960fbcbbb683c96110bf8aa.zip |
* xreadline.c: New. Based on the iobuf_read_line function.
* no-libgcrypt.c (gcry_realloc, gcry_xmalloc, gcry_xcalloc): New.
* gpgconf-comp.c (retrieve_options_from_program)
(retrieve_options_from_file, change_options_file)
(change_options_program, gc_component_change_options): Replaced
getline by read_line and test for allocation failure.
Diffstat (limited to '')
-rw-r--r-- | tools/no-libgcrypt.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/no-libgcrypt.c b/tools/no-libgcrypt.c index b5342732d..0fabec90d 100644 --- a/tools/no-libgcrypt.c +++ b/tools/no-libgcrypt.c @@ -39,6 +39,12 @@ out_of_core (void) void * +gcry_malloc (size_t n) +{ + return malloc (n); +} + +void * gcry_xmalloc (size_t n) { void *p = malloc (n); @@ -47,6 +53,13 @@ gcry_xmalloc (size_t n) return p; } + +void * +gcry_realloc (void *a, size_t n) +{ + return realloc (a, n); +} + void * gcry_xrealloc (void *a, size_t n) { @@ -56,6 +69,14 @@ gcry_xrealloc (void *a, size_t n) return p; } + + +void * +gcry_calloc (size_t n, size_t m) +{ + return calloc (n, m); +} + void * gcry_xcalloc (size_t n, size_t m) { @@ -65,6 +86,7 @@ gcry_xcalloc (size_t n, size_t m) return p; } + char * gcry_xstrdup (const char *string) { |