From: Pierre Joye Date: Mon, 2 Jun 2008 06:48:35 +0000 (+0000) Subject: - don't use openldap/portable and build the human readable version X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2528bd43fc89fc5a14867a055dc9f0e2192ffe79;p=php - don't use openldap/portable and build the human readable version - silent strdup redclaration warning --- diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index fc7787f083..007e5ce19e 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -44,14 +44,12 @@ #include "php_ldap.h" #ifdef PHP_WIN32 -/* TODO: check if this file is installed on *nix as well */ -#include #include #if HAVE_NSLDAP #include #endif -#ifndef _strdup -#define strdup _strdup +#ifndef strdup +# define strdup _strdup #endif #undef WINDOWS #undef strcasecmp @@ -250,8 +248,9 @@ PHP_MINFO_FUNCTION(ldap) php_info_print_table_row(2, "Total Links", tmp); -#ifdef OPENLDAP_VERSION - snprintf(tmp, 31, "%s", OPENLDAP_VERSION); +#ifdef LDAP_VENDOR_VERSION_MAJOR + snprintf(tmp, 31, "%d.%d.%d", LDAP_VENDOR_VERSION_MAJOR, + LDAP_VENDOR_VERSION_MINOR, LDAP_VENDOR_VERSION_PATCH); php_info_print_table_row(2, "Version", tmp); #endif