summaryrefslogtreecommitdiffstats
path: root/Modules/dbmmodule.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-14 15:48:06 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-14 15:48:06 (GMT)
commitd94f70716ec4714dac1f96a153900ac7234d38ef (patch)
tree8693e2e206836d791b9038e7e286a1302664d32f /Modules/dbmmodule.c
parent641fbe66e732dd435d774b70b4902bbd764c37ab (diff)
downloadcpython-d94f70716ec4714dac1f96a153900ac7234d38ef.zip
cpython-d94f70716ec4714dac1f96a153900ac7234d38ef.tar.gz
cpython-d94f70716ec4714dac1f96a153900ac7234d38ef.tar.bz2
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 c0cfb29..afb039b 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