The prototypes for the home-grown malloc replacements were not
protected with extern "C" declarations, so linking the SDBM_File
extension failed when configuring with -Dusemymalloc=y and building
with C++.
# define realloc Perl_realloc
# define free Perl_mfree
+#ifdef __cplusplus
+extern "C" {
+#endif
+
Malloc_t Perl_malloc proto((MEM_SIZE nbytes));
Malloc_t Perl_calloc proto((MEM_SIZE elements, MEM_SIZE size));
Malloc_t Perl_realloc proto((Malloc_t where, MEM_SIZE nbytes));
Free_t Perl_mfree proto((Malloc_t where));
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* MYMALLOC */
#ifdef I_STRING