]> git.sur5r.net Git - openldap/blobdiff - servers/ldapd/association.c
Update build environment:
[openldap] / servers / ldapd / association.c
index cea7b959a1ea64d45e8ff0b97fc4529e5399bd78..3ca61c9e47a98a1323b83e124841b8abc6e68533 100644 (file)
  * is provided ``as is'' without express or implied warranty.
  */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <string.h>
+
+#include <ac/errno.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
 #include <quipu/commonarg.h>
 #include <quipu/ds_error.h>
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include "lber.h"
-#include "ldap.h"
+#include <quipu/dap.h>                 /* get dap_unbind() */
 #if ISODEPACKAGE == IC
 #include <ll/isoaddrs.h>
 #else
 #include <isoaddrs.h>
 #endif
+
+#include "lber.h"
+#include "ldap.h"
 #include "common.h"
-#ifdef SVR4
-#if !defined(_AIX) && !defined(__osf__) && !defined(linux)
-#include <sys/filio.h>
+
+#ifdef HAVE_SYS_IOCTL_H 
+#include <sys/ioctl.h>
 #endif
+#ifdef HAVE_SYS_FILIO_H 
+#include <sys/filio.h>
 #endif
 
 #ifdef __hpux
 
 struct conn    *conns;
 
-struct conn *conn_dup( struct conn *cn )
+struct conn *
+conn_dup( struct conn *cn )
 {
        struct conn     *new;
-       struct PSAPaddr *psap_cpy();
-
        if ( (new = (struct conn *) malloc( sizeof(struct conn) )) == NULL )
                return( NULL );
 
@@ -65,10 +70,9 @@ struct conn *conn_dup( struct conn *cn )
 }
 
 int
-conn_init()
+conn_init( void )
 {
-       extern char     *dsa_address;
-       struct PSAPaddr *addr, *psap_cpy();
+       struct PSAPaddr *addr;
 
        if ( (conns = (struct conn *) malloc( sizeof(struct conn) )) == NULL ) {
                Debug( LDAP_DEBUG_ANY, "conn_init: malloc failed\n", 0, 0, 0 );
@@ -99,7 +103,6 @@ void
 conn_free( struct conn *conn )
 {
        struct timeval  tv;
-       extern int      referral_connection_timeout;
 
        Debug( LDAP_DEBUG_TRACE, "conn_free (%s): refcnt is %d\n",
            paddr2str( conn->c_paddr, NULLNA ), conn->c_refcnt, 0 );
@@ -168,7 +171,7 @@ conn_setfds( fd_set *fds )
 }
 
 void
-conn_badfds()
+conn_badfds( void )
 {
        struct conn     *tmp;
 
@@ -181,7 +184,8 @@ conn_badfds()
        }
 }
 
-struct conn *conn_getfd( fd_set *fds )
+struct conn *
+conn_getfd( fd_set *fds )
 {
        struct conn     *tmp;
 
@@ -215,12 +219,14 @@ conn_add( struct conn *new )
        conns = new;
 }
 
-static psap_cmp( struct PSAPaddr *a, struct PSAPaddr *b )
+static int
+psap_cmp( struct PSAPaddr *a, struct PSAPaddr *b )
 {
        return( bcmp( (char *) a, (char *) b, sizeof(struct PSAPaddr) ) );
 }
 
-struct conn *conn_find( struct conn *c )
+struct conn *
+conn_find( struct conn *c )
 {
        struct conn     *tmp;
 
@@ -257,7 +263,7 @@ struct conn *conn_find( struct conn *c )
 }
 
 void
-conn_close()
+conn_close( void )
 {
        struct conn     *tmp;
 
@@ -271,7 +277,6 @@ int
 isclosed( int ad )
 {
        int             o;
-       extern int      errno;
 
        if ( ioctl( ad, FIOGETOWN, &o ) < 0 )
                return( errno == EBADF ? 1 : 0 );