diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-14 14:03:01 +0200 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-21 16:53:13 +0100 |
commit | 96523a53aeb24ef2374ea899f3a1f4cc1045d355 (patch) | |
tree | 67c75953eb242f9d6db749d8e4fbdb1719ec78ce /util.c | |
parent | b21d8587d6f2e56db4e5c64099cb03cbde2f8906 (diff) | |
download | perl-96523a53aeb24ef2374ea899f3a1f4cc1045d355.tar.gz |
Don't declare C89 realloc()
The declaration is actually for PerlMem_realloc(), which is a macro for
either realloc() or an indirection through the interpreter struct, depending
on configuration — see iperlsys.h. If it's the indrection, this declaration
will be a syntax error, so it must be in fact plain old realloc().
The declaration is guarded with HAS_REALLOC_PROTOTYPE, which isn't actually
defined or consulted anywhere else in the codebase.
Since we require C89, there's no need for this — we #include <stdlib.h>, and
therefore can assume realloc() exists.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -214,9 +214,6 @@ Perl_safesysrealloc(Malloc_t where,MEM_SIZE size) ? ((struct perl_memory_debug_header *)((char *)where - PERL_MEMORY_DEBUG_HEADER_SIZE))->size : 0; #endif -#if !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) && !defined(PERL_MICRO) - Malloc_t PerlMem_realloc(); -#endif /* !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) */ if (!size) { safesysfree(where); |