NDBM just isn't meant to be used with C++. So this
Marcus Holland-Moritz [Thu, 6 Nov 2008 22:16:03 +0000 (22:16 +0000)]
change makes the intro of NDBM_File.xs even uglier,
but hopefully it also makes tests pass now.

p4raw-id: //depot/perl@34757

ext/NDBM_File/NDBM_File.xs

index add9796..aa769ec 100644 (file)
@@ -3,20 +3,26 @@
 #include "XSUB.h"
 #undef NDBM_HEADER_USES_PROTOTYPES
 #if defined(I_GDBM_NDBM)
-#  include <gdbm-ndbm.h> /* Debian compatibility version */
 #  ifdef GDBM_NDBM_H_USES_PROTOTYPES
 #    define NDBM_HEADER_USES_PROTOTYPES
+START_EXTERN_C
 #  endif
+#  include <gdbm-ndbm.h> /* Debian compatibility version */
 #elif defined(I_GDBMNDBM)
-#  include <gdbm/ndbm.h> /* RedHat compatibility version */
 #  ifdef GDBMNDBM_H_USES_PROTOTYPES
 #    define NDBM_HEADER_USES_PROTOTYPES
+START_EXTERN_C
 #  endif
+#  include <gdbm/ndbm.h> /* RedHat compatibility version */
 #elif defined(I_NDBM)
-#  include <ndbm.h>
 #  ifdef NDBM_H_USES_PROTOTYPES
 #    define NDBM_HEADER_USES_PROTOTYPES
+START_EXTERN_C
 #  endif
+#  include <ndbm.h>
+#endif
+#ifdef NDBM_HEADER_USES_PROTOTYPES
+END_EXTERN_C
 #endif
 
 typedef struct {