]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ldap-int.h
LDAP C-API changes
[openldap] / libraries / libldap / ldap-int.h
index bd3335c1533e15ac4313116c08206dcf76782a80..7948578895fe4aa2562c13d5a3808b3c83332733 100644 (file)
@@ -8,6 +8,10 @@
 #ifndef        _LDAP_INT_H
 #define        _LDAP_INT_H 1
 
+#ifdef LDAP_COMPILING_R
+#define LDAP_THREAD_SAFE 1
+#endif
+
 #include "../liblber/lber-int.h"
 #include "ldap_log.h"
 #include "ldap.h"
@@ -139,7 +143,6 @@ struct ldap {
 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
 };
 
-
 /*
  * in init.c
  */
@@ -240,6 +243,10 @@ LDAP_F int cldap_getmsg    ( LDAP *ld, struct timeval *timeout, BerElement *ber );
 BerElement *ldap_build_search_req( LDAP *ld, char *base, int scope,
        char *filter, char **attrs, int attrsonly );
 
+/*
+ * in strdup.c
+ */
+char *ldap_strdup LDAP_P(( const char * ));
 
 /*
  * in unbind.c
@@ -270,6 +277,30 @@ int ldap_8859_to_t61( char **bufp, unsigned long *buflenp, int free_input );
 #endif /* LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET */
 #endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */
 
+/*
+ * in util_r.c
+ * 
+ */
+
+struct hostent;        /* avoid pulling in <netdb.h> */
+
+extern char *ldap_int_strtok( char *str, const char *delim, char **pos );
+extern char *ldap_int_ctime( const time_t *tp, char *buf );
+extern int ldap_int_gethostbyname_a(
+       const char *name, 
+       struct hostent *resbuf,
+       char **buf,
+       struct hostent **result,
+       int *herrno_ptr );
+extern int ldap_int_gethostbyaddr_a(
+       const char *addr,
+       int len,
+       int type,
+       struct hostent *resbuf,
+       char **buf,
+       struct hostent **result,
+       int *herrno_ptr );
+
 LDAP_END_DECL
 
 #endif /* _LDAP_INT_H */