In some Linux distributions the libndbm is broken
Jarkko Hietaniemi [Wed, 27 Jun 2001 11:55:06 +0000 (11:55 +0000)]
(no null key support), therefore link with libgdbm
(if available), since it has a working ndbm emulation,
from Jonathan Stowe.

p4raw-id: //depot/perl@10984

MANIFEST
ext/NDBM_File/hints/linux.pl [new file with mode: 0644]

index 5491ac0..0cf83a8 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -386,6 +386,7 @@ ext/MIME/Base64/t/unicode.t See whether MIME::Base64 works
 ext/NDBM_File/hints/cygwin.pl  Hint for NDBM_File for named architecture
 ext/NDBM_File/hints/dec_osf.pl Hint for NDBM_File for named architecture
 ext/NDBM_File/hints/dynixptx.pl        Hint for NDBM_File for named architecture
+ext/NDBM_File/hints/linux.pl   Hint for NDBM_File for named architecture
 ext/NDBM_File/hints/sco.pl     Hint for NDBM_File for named architecture
 ext/NDBM_File/hints/solaris.pl Hint for NDBM_File for named architecture
 ext/NDBM_File/hints/svr4.pl    Hint for NDBM_File for named architecture
diff --git a/ext/NDBM_File/hints/linux.pl b/ext/NDBM_File/hints/linux.pl
new file mode 100644 (file)
index 0000000..47f9d2c
--- /dev/null
@@ -0,0 +1,6 @@
+# Some distributions have both gdbm and ndbm
+# Prefer gdbm to avoid the broken ndbm in some distributions
+# (no null key support)
+# Jonathan Stowe <gellyfish@gellyfish.com>
+use Config;
+$self->{LIBS} = ['-lgdbm'] if $Config{libs} =~ /\b-lgdbm\b/;