[Date Prev][Date Next] [Chronological] [Thread] [Top]

nonstandard assumptions in the code

I've been getting a bit nervous lately about the number of non-ANSI
assumptions which the OpenLDAP code makes.  I'd like to at least write a
test program which configure can run and which tries to warn if one of
the assumptions do not hold.

Here are the nonstandard assumptions I have found.  Do anyone know any

* two's complement integers
* at least 4-byte 'int'
* 8-bit 'char'
* ASCII or EBCDIC character set (or a superset of these)
  (basic assumptions, leave these alone)

* no padding bits in 'unsigned int'
  (required by back-bdb/dbcache.c:bdb_db_hash() - don't know why)

* can cast 'int' to 'void *' and back
  (at least back-shell)

* can cast function pointers to 'void *' and back
  (at least the threading stuff)

* can meaningfully compare pointers to different malloced blocks

* 'long long' support
  (liblutil/uuid.c - can write #ifndef HAVE_LONG_LONG variant to fix it)

* accepts string literals longer than 509 characters
  (easy to fix)

* other limits, like lower max num of #defines
  (leave these alone)

One other question - how do I test whether the ldap installation will
support EBCDIC?  I know EBCDIC support has been added, or at least is
partly added, but I don't know how to test for it in configure.