test_and_{set,clear}_bit are currently broken as they do nothing if bit > sizeof(long) * CHAR_BIT. Attached patch also changes int to long in 3 previous macros, which could lead to inconsistent behavior on non-little-endian architectures where sizeof(int) != sizeof(long). Fix: Patch attached with submission follows:
This was fixed in http://svnweb.freebsd.org/base?view=revision&revision=254120