summaryrefslogtreecommitdiff
path: root/Modules/dbmmodule.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-14 15:48:06 +0000
committerFred Drake <fdrake@acm.org>2000-09-14 15:48:06 +0000
commitd94f70716ec4714dac1f96a153900ac7234d38ef (patch)
tree8693e2e206836d791b9038e7e286a1302664d32f /Modules/dbmmodule.c
parent641fbe66e732dd435d774b70b4902bbd764c37ab (diff)
downloadcpython-git-d94f70716ec4714dac1f96a153900ac7234d38ef.tar.gz
Use the configure support to determine which ndbm.h header to include.
Diffstat (limited to 'Modules/dbmmodule.c')
-rw-r--r--Modules/dbmmodule.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c
index c0cfb29c15..afb039b3a8 100644
--- a/Modules/dbmmodule.c
+++ b/Modules/dbmmodule.c
@@ -7,7 +7,17 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+
+/* Some Linux systems install gdbm/ndbm.h, but not ndbm.h. This supports
+ * whichever configure was able to locate.
+ */
+#if defined(HAVE_NDBM_H)
#include <ndbm.h>
+#elif defined(HAVE_GDBM_NDBM_H)
+#include <gdbm/ndbm.h>
+#else
+#error "No ndbm.h available!"
+#endif
typedef struct {
PyObject_HEAD