summaryrefslogtreecommitdiff
path: root/ext/ldap/ldap.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2008-06-02 06:48:35 +0000
committerPierre Joye <pajoye@php.net>2008-06-02 06:48:35 +0000
commit2528bd43fc89fc5a14867a055dc9f0e2192ffe79 (patch)
tree5975ca0cfeea71040978e21fc0efc233a6e23431 /ext/ldap/ldap.c
parent8290e3324a584a9a1c9aa35153f4f9f5b530f067 (diff)
downloadphp-git-2528bd43fc89fc5a14867a055dc9f0e2192ffe79.tar.gz
- don't use openldap/portable and build the human readable version
- silent strdup redclaration warning
Diffstat (limited to 'ext/ldap/ldap.c')
-rw-r--r--ext/ldap/ldap.c11
1 files 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 <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