Whoops...
If you wish to use the macro directly: Configure the OpenLDAP source tree (to generate internal headers), then
#include "<openldap source>/include/portable.h"
#include <openldap source>/libraries/libldap/ldap-int.h.
At least that's what the OpenLDAP source files do.