summaryrefslogtreecommitdiff
path: root/ext/SDBM_File
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2012-06-03 18:17:28 -0500
committerCraig A. Berry <craigberry@mac.com>2012-06-03 18:17:28 -0500
commit938f40b7bc0ceab111fbb5619a242158aa040f06 (patch)
tree7a0240ab87054c305b147329b2d8cb2480dbd76f /ext/SDBM_File
parentbbd7bacc48bc053e51f3c115412abb4137bea796 (diff)
downloadperl-938f40b7bc0ceab111fbb5619a242158aa040f06.tar.gz
extern "C" for sdbm.c.
Whether we really need to be rolling our own prototypes for malloc and free in this day and age is unclear, but since we do, we need to keep them in the unmangled C namespace rather than in C++'s std:: namespace.
Diffstat (limited to 'ext/SDBM_File')
-rw-r--r--ext/SDBM_File/sdbm/sdbm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c
index 46be83e560..f01a08a145 100644
--- a/ext/SDBM_File/sdbm/sdbm.c
+++ b/ext/SDBM_File/sdbm/sdbm.c
@@ -37,10 +37,17 @@
#include <errno.h> /* See notes in perl.h about avoiding
extern int errno; */
+#ifdef __cplusplus
+extern "C" {
+#endif
extern Malloc_t malloc proto((MEM_SIZE));
extern Free_t free proto((Malloc_t));
+#ifdef __cplusplus
+}
+#endif
+
/*
* forward
*/