X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldap_pvt.h;h=3256e058e0e051958df5ab54be9f1a6377907f16;hb=9d346699a0af68775cf617061199a197a86effd2;hp=49138125636c5125f68f24ca706c6612606e48b7;hpb=ae9c14c832363cb1b760ed729e4e0bcd64b740e4;p=openldap diff --git a/include/ldap_pvt.h b/include/ldap_pvt.h index 4913812563..3256e058e0 100644 --- a/include/ldap_pvt.h +++ b/include/ldap_pvt.h @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2009 The OpenLDAP Foundation. + * Copyright 1998-2010 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -91,6 +91,47 @@ ldap_pvt_ctime LDAP_P(( const time_t *tp, char *buf )); +# if defined( HAVE_GMTIME_R ) +# define USE_GMTIME_R +# define ldap_pvt_gmtime(timep, result) gmtime_r((timep), (result)) +# else +LDAP_F( struct tm * ) +ldap_pvt_gmtime LDAP_P(( + LDAP_CONST time_t *timep, + struct tm *result )); +#endif + +# if defined( HAVE_LOCALTIME_R ) +# define USE_LOCALTIME_R +# define ldap_pvt_localtime(timep, result) localtime_r((timep), (result)) +# else +LDAP_F( struct tm * ) +ldap_pvt_localtime LDAP_P(( + LDAP_CONST time_t *timep, + struct tm *result )); +# endif + +#if defined( USE_GMTIME_R ) && defined( USE_LOCALTIME_R ) +# define ldap_pvt_gmtime_lock() (0) +# define ldap_pvt_gmtime_unlock() (0) +#else +LDAP_F( int ) +ldap_pvt_gmtime_lock LDAP_P(( void )); + +LDAP_F( int ) +ldap_pvt_gmtime_unlock LDAP_P(( void )); +#endif /* USE_GMTIME_R && USE_LOCALTIME_R */ + +/* Get current time as a structured time */ +struct lutil_tm; +LDAP_F( void ) +ldap_pvt_gettime LDAP_P(( struct lutil_tm * )); + +/* use this macro to allocate buffer for ldap_pvt_csnstr */ +#define LDAP_PVT_CSNSTR_BUFSIZE 64 +LDAP_F( size_t ) +ldap_pvt_csnstr( char *buf, size_t len, unsigned int replica, unsigned int mod ); + LDAP_F( char *) ldap_pvt_get_fqdn LDAP_P(( char * )); struct hostent; /* avoid pulling in */ @@ -262,6 +303,8 @@ struct sb_sasl_generic_data { Sockbuf_Buf sec_buf_in; Sockbuf_Buf buf_in; Sockbuf_Buf buf_out; + unsigned int flags; +#define LDAP_PVT_SASL_PARTIAL_WRITE 1 }; #ifndef LDAP_PVT_SASL_LOCAL_SSF