]> granicus.if.org Git - php/commitdiff
Hopefully fixes build with IBM's LDAP library
authorStig Venaas <venaas@php.net>
Tue, 9 Jul 2002 20:54:49 +0000 (20:54 +0000)
committerStig Venaas <venaas@php.net>
Tue, 9 Jul 2002 20:54:49 +0000 (20:54 +0000)
ext/ldap/ldap.c

index 3060b96f8c2aa4390d3605b7d195cac272efe5d2..fe53349b6336a1eef7dfb58d98e81a4a8c3cacfc 100644 (file)
@@ -226,7 +226,9 @@ PHP_MINIT_FUNCTION(ldap)
        REGISTER_LONG_CONSTANT("LDAP_OPT_PROTOCOL_VERSION", LDAP_OPT_PROTOCOL_VERSION, CONST_PERSISTENT | CONST_CS);
        REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_NUMBER", LDAP_OPT_ERROR_NUMBER, CONST_PERSISTENT | CONST_CS);
        REGISTER_LONG_CONSTANT("LDAP_OPT_REFERRALS", LDAP_OPT_REFERRALS, CONST_PERSISTENT | CONST_CS);
+#ifdef LDAP_OPT_RESTART
        REGISTER_LONG_CONSTANT("LDAP_OPT_RESTART", LDAP_OPT_RESTART, CONST_PERSISTENT | CONST_CS);
+#endif
        REGISTER_LONG_CONSTANT("LDAP_OPT_HOST_NAME", LDAP_OPT_HOST_NAME, CONST_PERSISTENT | CONST_CS);
        REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_STRING", LDAP_OPT_ERROR_STRING, CONST_PERSISTENT | CONST_CS);
 #ifdef LDAP_OPT_MATCHED_DN
@@ -1641,7 +1643,9 @@ PHP_FUNCTION(ldap_get_option)
        case LDAP_OPT_PROTOCOL_VERSION:
        case LDAP_OPT_ERROR_NUMBER:
        case LDAP_OPT_REFERRALS:
+#ifdef LDAP_OPT_RESTART
        case LDAP_OPT_RESTART:
+#endif
                {
                        int val;
                        if (ldap_get_option(ld->link, opt, &val)) {
@@ -1736,7 +1740,9 @@ PHP_FUNCTION(ldap_set_option)
                } break;
                /* options with boolean value */
        case LDAP_OPT_REFERRALS:
+#ifdef LDAP_OPT_RESTART
        case LDAP_OPT_RESTART:
+#endif
                {
                        void *val;
                        convert_to_boolean_ex(newval);