X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldap_pvt.h;h=f26889af743e8e75c9106f9fa3d56e6db49f51f6;hb=6bdf7b150bed28cff1fafcdb0c3a9430a4c83bdf;hp=bbf461c7b4dfdadaac5840c9dc1a2489db770f6a;hpb=4bc19cbbb9edbbebe45667ee77867808a866236d;p=openldap diff --git a/include/ldap_pvt.h b/include/ldap_pvt.h index bbf461c7b4..f26889af74 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-2007 The OpenLDAP Foundation. + * Copyright 1998-2008 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -169,7 +169,7 @@ LDAP_F( int ) ldap_bv2rdn_x LDAP_P(( struct berval *, LDAPRDN *, char **, unsigned flags, void *ctx )); LDAP_F( int ) ldap_rdn2bv_x LDAP_P(( LDAPRDN rdn, struct berval *bv, unsigned flags, void *ctx )); -#endif +#endif /* LDAP_AVA_NULL */ /* url.c */ LDAP_F (void) ldap_pvt_hex_unescape LDAP_P(( char *s )); @@ -195,12 +195,10 @@ LDAP_F (void) ldap_pvt_hex_unescape LDAP_P(( char *s )); /* controls.c */ struct ldapcontrol; -LDAP_F (struct ldapcontrol *) ldap_control_dup LDAP_P(( - const struct ldapcontrol *ctrl )); - -LDAP_F (struct ldapcontrol **) ldap_controls_dup LDAP_P(( - struct ldapcontrol *const *ctrls )); - +LDAP_F (int) +ldap_pvt_put_control LDAP_P(( + const struct ldapcontrol *c, + BerElement *ber )); LDAP_F (int) ldap_pvt_get_controls LDAP_P(( BerElement *be, struct ldapcontrol ***ctrlsp)); @@ -227,7 +225,7 @@ LDAP_F (void) ldap_pvt_sasl_remove LDAP_P(( struct sockbuf * )); #ifndef LDAP_PVT_SASL_LOCAL_SSF #define LDAP_PVT_SASL_LOCAL_SSF 71 /* SSF for Unix Domain Sockets */ -#endif +#endif /* ! LDAP_PVT_SASL_LOCAL_SSF */ struct ldap; struct ldapmsg; @@ -318,6 +316,8 @@ LDAP_END_DECL * If none is available, unsigned long data is used. */ +LDAP_BEGIN_DECL + #ifdef USE_MP_BIGNUM /* * Use OpenSSL's BIGNUM @@ -406,4 +406,15 @@ typedef unsigned long ldap_pvt_mp_t; #include "ldap_pvt_uc.h" +LDAP_END_DECL + +LDAP_BEGIN_DECL + +#include /* get CHAR_BIT */ + +/* Buffer space for sign, decimal digits and \0. Note: log10(2) < 146/485. */ +#define LDAP_PVT_INTTYPE_CHARS(type) (((sizeof(type)*CHAR_BIT-1)*146)/485 + 3) + +LDAP_END_DECL + #endif /* _LDAP_PVT_H */