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?):
All of these have been addressed, except <stdint.h> vs <inttypes.h>. Since it builds fine for me as-is on Solaris, I haven't changed that. I guess that's still open to discussion if anyone else has info on which is more commonly provided.
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?
#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...
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...)
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...)
PAGESIZE is part of SUSv2<limits.h>; would you be open to a patch to change that to MDB_PAGESIZE?