From 2528bd43fc89fc5a14867a055dc9f0e2192ffe79 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 2 Jun 2008 06:48:35 +0000 Subject: [PATCH] - don't use openldap/portable and build the human readable version - silent strdup redclaration warning --- ext/ldap/ldap.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 -- 2.40.0