]> granicus.if.org Git - php/commitdiff
- add OpenLDAP version info in phpinfo (windows only, have to check if openldap/porta...
authorPierre Joye <pajoye@php.net>
Mon, 2 Jun 2008 00:24:19 +0000 (00:24 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 2 Jun 2008 00:24:19 +0000 (00:24 +0000)
ext/ldap/ldap.c

index 66d2a33584e38c1d0f0f4ed04663f07eb0ba8dfd..fc7787f083d7b74ee6d9150b6dd43ca98d8e7fb4 100644 (file)
 
 #include "php.h"
 #include "php_ini.h"
-
 #include <stddef.h>
 
 #include "ext/standard/dl.h"
 #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
+#endif
 #undef WINDOWS
 #undef strcasecmp
 #undef strncasecmp
@@ -246,6 +249,12 @@ PHP_MINFO_FUNCTION(ldap)
        }
        php_info_print_table_row(2, "Total Links", tmp);
 
+       
+#ifdef OPENLDAP_VERSION
+       snprintf(tmp, 31, "%s", OPENLDAP_VERSION);
+       php_info_print_table_row(2, "Version", tmp);
+#endif
+
 #ifdef LDAP_API_VERSION
        snprintf(tmp, 31, "%d", LDAP_API_VERSION);
        php_info_print_table_row(2, "API Version", tmp);