]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ldap-int.h
LDAP C-API changes
[openldap] / libraries / libldap / ldap-int.h
index 09628931fc7cbc8a1f1b265c122208888313c896..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"
@@ -242,12 +246,7 @@ BerElement *ldap_build_search_req( LDAP *ld, char *base, int scope,
 /*
  * in strdup.c
  */
-#ifdef HAVE_STRDUP
-#define      ldap_strdup(s)    strdup(s)
-extern char *strdup();
-#else
-extern char *ldap_strdup LDAP_P(( const char * ));
-#endif
+char *ldap_strdup LDAP_P(( const char * ));
 
 /*
  * in unbind.c
@@ -278,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 */