]> granicus.if.org Git - php/commitdiff
- don't use openldap/portable and build the human readable version
authorPierre Joye <pajoye@php.net>
Mon, 2 Jun 2008 06:48:35 +0000 (06:48 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 2 Jun 2008 06:48:35 +0000 (06:48 +0000)
- silent strdup redclaration warning

ext/ldap/ldap.c

index fc7787f083d7b74ee6d9150b6dd43ca98d8e7fb4..007e5ce19e9e44f43177674af519b4edeb30a2f2 100644 (file)
 #include "php_ldap.h"
 
 #ifdef PHP_WIN32
-/* TODO: check if this file is installed on *nix as well */
-#include <openldap/portable.h>
 #include <string.h>
 #if HAVE_NSLDAP
 #include <winsock2.h>
 #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