summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-14 14:03:01 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:53:13 +0100
commit96523a53aeb24ef2374ea899f3a1f4cc1045d355 (patch)
tree67c75953eb242f9d6db749d8e4fbdb1719ec78ce /util.c
parentb21d8587d6f2e56db4e5c64099cb03cbde2f8906 (diff)
downloadperl-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.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/util.c b/util.c
index e7fe661e0f..087c918faa 100644
--- a/util.c
+++ b/util.c
@@ -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);