Hi. On 08/06/2017 12:28 AM, Guillem Jover wrote: > > Well, obviously not entirely as complete but the BSDs (and libbsd > otherwise) do have something like <sys/bitstring.h>. >
The difference between sys/bitstring.h and the package I propose is that bitstring.h implements a bit array within one unit of data storage (unsigned char, 1 byte, 8 bits), while my package uses an array of units (array of unsigned long integers, usually 32 or 64 bits EACH). This means that BSD's bit array can't be longer that 8 bits, while mine is limited by memory size only. > BTW, I noticed when I checked the implementation that you are using > HAVE_BITFIELD_H as the header macro protector, but that's actually a > bad idea, as with the typical autoconf based build-system that macro > will already be defined if the build-system does something like > AC_CHECK_HEADERS([bitfield.h]), which means the contents will be > secluded. Oh, yes, you are right. I was able to reproduce this problem. The name of the header guard needs to be changed. Thank you very much for pointing it out. Best regards, Vitalie Ciubotaru