[Pkg-db-devel] Bug#297511: types u_int and u_long not defined

Cedric Cellier Cedric Cellier <rixed@happyleptic.org>, 297511@bugs.debian.org
Tue, 01 Mar 2005 08:04:23 +0100


Package: libdb4.3-dev
Version: 4.3.27-1

/usr/include/db.h says (to the mainteners?) :

/*
  * !!!
  * Berkeley DB uses specifically sized types.  If they're not provided by
  * the system, typedef them here.
  *
  * We protect them against multiple inclusion using __BIT_TYPES_DEFINED__,
  * as does BIND and Kerberos, since we don't know for sure what #include
  * files the user is using.
  *
  * !!!
  * (...)
  */

But the reserved space for these definitions is left blank.
So that gcc fail to compile this simple test :

$ cat > /tmp/test.db.c
#include <db.h>
^D
$ gcc --std=c99 -c tdb.c
errors !!

This works without specifying std=c99 or with std=gnu99 because of gcc 
additions.

Shouldn't trivials typedefs be added right into db.h ?