From: Marcus Holland-Moritz Date: Thu, 6 Nov 2008 22:16:03 +0000 (+0000) Subject: NDBM just isn't meant to be used with C++. So this X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3327bb648bca3705820d35dd728f98436ea9f8aa;p=p5sagit%2Fp5-mst-13.2.git NDBM just isn't meant to be used with C++. So this change makes the intro of NDBM_File.xs even uglier, but hopefully it also makes tests pass now. p4raw-id: //depot/perl@34757 --- diff --git a/ext/NDBM_File/NDBM_File.xs b/ext/NDBM_File/NDBM_File.xs index add9796..aa769ec 100644 --- a/ext/NDBM_File/NDBM_File.xs +++ b/ext/NDBM_File/NDBM_File.xs @@ -3,20 +3,26 @@ #include "XSUB.h" #undef NDBM_HEADER_USES_PROTOTYPES #if defined(I_GDBM_NDBM) -# include /* Debian compatibility version */ # ifdef GDBM_NDBM_H_USES_PROTOTYPES # define NDBM_HEADER_USES_PROTOTYPES +START_EXTERN_C # endif +# include /* Debian compatibility version */ #elif defined(I_GDBMNDBM) -# include /* RedHat compatibility version */ # ifdef GDBMNDBM_H_USES_PROTOTYPES # define NDBM_HEADER_USES_PROTOTYPES +START_EXTERN_C # endif +# include /* RedHat compatibility version */ #elif defined(I_NDBM) -# include # ifdef NDBM_H_USES_PROTOTYPES # define NDBM_HEADER_USES_PROTOTYPES +START_EXTERN_C # endif +# include +#endif +#ifdef NDBM_HEADER_USES_PROTOTYPES +END_EXTERN_C #endif typedef struct {