[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: RE24 testing (pre-testing on 2.4.27)
Aaron Richton wrote:
On Tue, 8 Nov 2011, Howard Chu wrote:
msync is not applicable here. It's only relevant if changes are made
using the mmap'd region, and we don't.
Right, good point. A few one-liners that aren't really worth an ITS
(yet?):
---
In libraries/libmdb/mdb.c, the compiler is warning about:
5920 rc = mdb_drop0(mc, mc->mc_db->md_flags& MDB_DUPSORT);
5921 if (rc)
5922 mdb_cursor_close(mc);
5923 return rc;
5924
5925 /* Can't delete the main DB */
5926 if (del&& dbi> MAIN_DBI) {
5926 being unreached (because of 5923). Braces on 5921?
Fixed in mdb.master, thanks.
---
#undef DEBUG, and "#define DKEY(x)"
preprocesses to:
( void ) ( "found leaf index %u [%s], rc = %i" ,
i, , rc);
so IMO:
#define DKEY(x) ""
or any other blank-ish concept...
DEBUG cannot (normally) be undef'd, so this is a misuse of the code.
---
On Solaris 9, stdint.h doesn't exist. inttypes.h does, and should (in
theory) be a drop-in replacement. Or, we can try for C90-compliance (by
using neither), or.......?
and
if it's C99-style types, servers/slapd/back-mdb uses u_int32_t which
should probably be uint32_t. (Berkeley DB gets around this with some
definitions in db.h, but I see no reason for mdb to have those hacks...)
Haven't really thought about this. If it's present on MacOSX then I guess it's
safe to switch; it is present in Android/bionic.
----
Solaris 9 defines BYTE_ORDER via<resolv.h>, I don't see any danger in
just #include'ing that on all platforms? (Apparently future standards
might include an endian.h for this...there's no standard like no
standard...)
Solaris uses <sys/byteorder.h> or <sys/isa_defs.h>, which is pulled in already
via <sys/param.h>. I think all we need to do is add a few #ifdef
_LITTLE_ENDIAN / _BIG_ENDIAN to map this over.
----
PAGESIZE is part of SUSv2<limits.h>; would you be open to a patch to
change that to MDB_PAGESIZE?
Maybe. It might be sufficient just to surround ours with #ifndef PAGESIZE
since the particular value isn't critical.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/