]> git.sur5r.net Git - openldap/blobdiff - servers/ldapd/result.c
Blindly added Autoconf support to ldapd.
[openldap] / servers / ldapd / result.c
index 3f77032342c0a02d1762be5d6e5685593336e1f5..22eb9b933ca5c6e0f61c4f7b99f3ed4f62eefcae 100644 (file)
  * is provided ``as is'' without express or implied warranty.
  */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/syslog.h>
+
 #include <quipu/dsap.h>
 #include <quipu/dap2.h>
 #include <quipu/dua.h>
-#ifdef __hpux
-#include <syslog.h>
-#else
-#include <sys/syslog.h>
-#endif
+
 #include "lber.h"
 #include "ldap.h"
 #include "common.h"
 
 extern int     dosyslog;
-#ifdef COMPAT
+#ifdef LDAP_COMPAT
 extern int     ldap_compat;
 #endif
 
@@ -131,7 +130,7 @@ dsa_response(
                        return;
                }
                if ( m->m_msgtype == LDAP_REQ_SEARCH 
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
                    || m->m_msgtype == OLD_LDAP_REQ_SEARCH
 #endif
                    )
@@ -154,7 +153,7 @@ dsa_response(
                        int     bound, rc;
 
                        switch ( m->m_msgtype ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
                        case OLD_LDAP_REQ_ADD:
                        case OLD_LDAP_REQ_MODIFY:
                        case OLD_LDAP_REQ_MODRDN:
@@ -162,7 +161,7 @@ dsa_response(
                        case OLD_LDAP_REQ_COMPARE:
                        case OLD_LDAP_REQ_SEARCH:
 #endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
                        case LDAP_REQ_DELETE_30:
 #endif
                        case LDAP_REQ_ADD:
@@ -283,7 +282,7 @@ send_ldap_msgresult(
     char               *text
 )
 {
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
        if ( m->m_cldap ) {
                SAFEMEMCPY( (char *)sb->sb_useaddr, &m->m_clientaddr,
                    sizeof( struct sockaddr ));
@@ -308,19 +307,19 @@ send_ldap_result(
 {
        BerElement      *ber;
        int             rc;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
        int             cldap;
 #endif
        extern int      version;
 
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
        cldap = ( sb->sb_naddr > 0 );
 #endif
 
        Debug( LDAP_DEBUG_TRACE, "send_ldap_result\n", 0, 0, 0 );
 
        if ( tag == LBER_DEFAULT )
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
                tag = ldap_compat == 20 ? OLD_LBER_SEQUENCE : LBER_SEQUENCE;
 #else
                tag = LBER_SEQUENCE;
@@ -332,20 +331,20 @@ send_ldap_result(
        }
 
        if ( version != 1 ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
                if ( ldap_compat == 20 ) {
                        rc = ber_printf( ber, "t{it{tess}}", OLD_LBER_SEQUENCE,
                            msgid, tag, LBER_INTEGER, err,
                            matched ? matched : "", text );
                } else
 #endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
                if ( ldap_compat == 30 ) {
                        rc = ber_printf( ber, "{it{{ess}}}", msgid, tag, err,
                            matched ? matched : "", text );
                } else
 #endif
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
                if ( cldap ) {
                        rc = ber_printf( ber, "{is{t{ess}}}", msgid, "", tag,
                            err, matched ? matched : "", text );