]> granicus.if.org Git - php/commitdiff
Fix for Bug #18746 by sfox and I
authorDan Kalowsky <kalowsky@php.net>
Tue, 13 Aug 2002 04:10:31 +0000 (04:10 +0000)
committerDan Kalowsky <kalowsky@php.net>
Tue, 13 Aug 2002 04:10:31 +0000 (04:10 +0000)
#What is the GDBM_FIX for anyways, we can find it anywhere?

ext/db/db.c

index fc9ec2d23c64a8a613a724382aac69b190bd2882..e181c7da7db321cd4cbbe7f1d124db876d9d344b 100644 (file)
 #include <unistd.h>
 #endif
 
-#ifdef PHP_31
-#include "os/nt/flock.h"
-#else
 #ifdef PHP_WIN32
 #include "win32/flock.h"
 #else
 #include <sys/file.h>
 #endif
-#endif
 
 #if HAVE_FCNTL_H
 #include <fcntl.h>
@@ -630,7 +626,12 @@ char *php_dbm_fetch(dbm_info *info, char *key TSRMLS_DC)
        DBM_TYPE dbf;
 
        key_datum.dptr = key;
+#ifdef PHP_WIN32
+       key_datum.dsize = strlen(key+1);
+#else
        key_datum.dsize = strlen(key);
+#endif
+
 #if GDBM_FIX
        key_datum.dsize++;
 #endif