summaryrefslogtreecommitdiff
path: root/ext/dbm
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-13 05:37:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-13 05:37:52 +0000
commit0a64817fb80016030c03518fb9459f63c11605ea (patch)
tree3ea2e607f9ea08c56830ef7b803cd259e3d67c7f /ext/dbm
parent210367ec889f5910e270d6ea2c7ddb8a8d939e61 (diff)
remove marshal/gtk/kconv
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/dbm.c7
-rw-r--r--ext/dbm/depend2
-rw-r--r--ext/dbm/extconf.rb5
3 files changed, 9 insertions, 5 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index 2764a32..4d83cec 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -12,6 +12,9 @@
#include "ruby.h"
+#ifdef HAVE_CDEFS_H
+# include <cdefs.h>
+#endif
#include <ndbm.h>
#include <fcntl.h>
#include <errno.h>
@@ -84,7 +87,7 @@ fdbm_s_open(argc, argv, klass)
obj = Data_Make_Struct(klass,struct dbmdata,0,free_dbm,dbmp);
dbmp->di_dbm = dbm;
dbmp->di_size = -1;
- rb_obj_call_init(obj);
+ rb_obj_call_init(obj, argc, argv);
return obj;
}
@@ -329,7 +332,7 @@ fdbm_store(obj, keystr, valstr)
dbmp->di_size = -1;
dbm = dbmp->di_dbm;
if (dbm_store(dbm, key, val, DBM_REPLACE)) {
-#ifdef HAVE_DBM_CLAERERR
+#ifdef HAVE_DBM_CLEARERR
dbm_clearerr(dbm);
#endif
if (errno == EPERM) rb_sys_fail(0);
diff --git a/ext/dbm/depend b/ext/dbm/depend
index d7f1f41..5fae80b 100644
--- a/ext/dbm/depend
+++ b/ext/dbm/depend
@@ -1 +1 @@
-dbm.o: dbm.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+dbm.o: dbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 3a96cee..2219891 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -1,9 +1,10 @@
require 'mkmf'
-$LDFLAGS = "-L/usr/local/lib"
+dir_config("dbm")
have_library("gdbm", "dbm_open") or
have_library("db", "dbm_open") or
have_library("dbm", "dbm_open")
-if have_func("dbm_open")
+have_header("cdefs.h")
+if have_header("ndbm.h") and have_func("dbm_open")
have_func("dbm_clearerr")
create_makefile("dbm")
end