summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ext/sdbm/_sdbm.c2
-rw-r--r--ext/sdbm/depend4
-rw-r--r--ext/sdbm/sdbm.h6
4 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 427f32e495a..77a99018a10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue May 11 11:49:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/sdbm/sdbm.h (DBM): large file support on win32.
+ [ruby-core:23039]
+
+ * ext/sdbm/depend: objects depend on sdbm.h.
+
Tue May 11 09:57:05 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval_intern.h (rb_vm_get_sourceline): add prototype.
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index 0b46056af52..533146f223b 100644
--- a/ext/sdbm/_sdbm.c
+++ b/ext/sdbm/_sdbm.c
@@ -11,9 +11,9 @@
/*char sdbm_rcsid[] = "$Id$";*/
#endif
-#include "sdbm.h"
#include "ruby/config.h"
#include "ruby/defines.h"
+#include "sdbm.h"
/*
* sdbm - ndbm work-alike hashed database library
diff --git a/ext/sdbm/depend b/ext/sdbm/depend
index 1d8b13d13ff..f205edc6116 100644
--- a/ext/sdbm/depend
+++ b/ext/sdbm/depend
@@ -1,2 +1,2 @@
-_sdbm.o: _sdbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
-init.o: init.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
+_sdbm.o: _sdbm.c sdbm.h $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
+init.o: init.c sdbm.h $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/sdbm/sdbm.h b/ext/sdbm/sdbm.h
index 9691b298555..c3b53c4a8f4 100644
--- a/ext/sdbm/sdbm.h
+++ b/ext/sdbm/sdbm.h
@@ -7,6 +7,8 @@
#ifndef _SDBM_H_
#define _SDBM_H_
+#include <stdio.h>
+
#define DBLKSIZ 4096
#define PBLKSIZ 1024
#define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */
@@ -19,11 +21,11 @@ typedef struct {
int dirf; /* directory file descriptor */
int pagf; /* page file descriptor */
int flags; /* status/error flags, see below */
- long maxbno; /* size of dirfile in bits */
+ int keyptr; /* current key for nextkey */
+ off_t maxbno; /* size of dirfile in bits */
long curbit; /* current bit number */
long hmask; /* current hash mask */
long blkptr; /* current block for nextkey */
- int keyptr; /* current key for nextkey */
long blkno; /* current page to read/write */
long pagbno; /* current page in pagbuf */
char pagbuf[PBLKSIZ]; /* page file block buffer */