From: Kurt Zeilenga Date: Sun, 1 Sep 2002 05:57:37 +0000 (+0000) Subject: Add buf size macros X-Git-Tag: OPENLDAP_REL_ENG_2_1_5~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97ebcd93e6ca5dbecf5724368c977344521f4943;p=openldap Add buf size macros --- diff --git a/include/lutil.h b/include/lutil.h index 4c8f425543..4a53306b81 100644 --- a/include/lutil.h +++ b/include/lutil.h @@ -120,6 +120,8 @@ lutil_strncopy LDAP_P(( char *dst, const char *src, size_t n )); struct tm; +/* use this macro to statically allocate buffer for lutil_gentime */ +#define LDAP_LUTIL_GENTIME_BUFSIZE 22 LDAP_LUTIL_F( size_t ) lutil_gentime LDAP_P(( char *s, size_t max, const struct tm *tm )); @@ -133,10 +135,14 @@ LDAP_LUTIL_F( int ) lutil_pair( ber_socket_t sd[2] ); /* uuid.c */ +/* use this macro to allocate buffer for lutil_uuidstr */ +#define LDAP_LUTIL_UUIDSTR_BUFSIZE 40 LDAP_LUTIL_F( size_t ) lutil_uuidstr( char *buf, size_t len ); /* csn.c */ +/* use this macro to allocate buffer for lutil_csnstr */ +#define LDAP_LUTIL_CSNSTR_BUFSIZE 64 LDAP_LUTIL_F( size_t ) lutil_csnstr( char *buf, size_t len, unsigned int replica, unsigned int mod );