pajoye          Mon Jun  2 00:24:19 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/ldap   ldap.c 
  Log:
  - add OpenLDAP version info in phpinfo (windows only, have to check if 
openldap/portable.h is present on linux headers)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.161.2.3.2.11.2.8&r2=1.161.2.3.2.11.2.9&diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.8 
php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.9
--- php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.8  Sun May  4 21:17:32 2008
+++ php-src/ext/ldap/ldap.c     Mon Jun  2 00:24:19 2008
@@ -23,7 +23,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: ldap.c,v 1.161.2.3.2.11.2.8 2008/05/04 21:17:32 colder Exp $ */
+/* $Id: ldap.c,v 1.161.2.3.2.11.2.9 2008/06/02 00:24:19 pajoye Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -38,18 +38,21 @@
 
 #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
@@ -237,7 +240,7 @@
 
        php_info_print_table_start();
        php_info_print_table_row(2, "LDAP Support", "enabled");
-       php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 
1.161.2.3.2.11.2.8 2008/05/04 21:17:32 colder Exp $");
+       php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 
1.161.2.3.2.11.2.9 2008/06/02 00:24:19 pajoye Exp $");
 
        if (LDAPG(max_links) == -1) {
                snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -246,6 +249,12 @@
        }
        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);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to