mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
cyrus-sasl 2.1.26 was released. In this version, the type of callback
functions was changed from "unsigned long" to "size_t". Reviewed by: gshapiro MFC after: 3 days
This commit is contained in:
parent
8bf4020830
commit
a944d3c61e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243649
@ -24,9 +24,15 @@ SM_RCSID("@(#)$Id: sasl.c,v 8.22 2006/08/15 23:24:57 ca Exp $")
|
||||
** using unsigned long: for portability, it should be size_t.
|
||||
*/
|
||||
|
||||
void *sm_sasl_malloc __P((unsigned long));
|
||||
static void *sm_sasl_calloc __P((unsigned long, unsigned long));
|
||||
static void *sm_sasl_realloc __P((void *, unsigned long));
|
||||
#if defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a
|
||||
#define SM_SASL_SIZE_T size_t
|
||||
#else /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
|
||||
#define SM_SASL_SIZE_T unsigned long
|
||||
#endif /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
|
||||
|
||||
void *sm_sasl_malloc __P((SM_SASL_SIZE_T));
|
||||
static void *sm_sasl_calloc __P((SM_SASL_SIZE_T, SM_SASL_SIZE_T));
|
||||
static void *sm_sasl_realloc __P((void *, SM_SASL_SIZE_T));
|
||||
void sm_sasl_free __P((void *));
|
||||
|
||||
/*
|
||||
@ -50,7 +56,7 @@ void sm_sasl_free __P((void *));
|
||||
|
||||
void *
|
||||
sm_sasl_malloc(size)
|
||||
unsigned long size;
|
||||
SM_SASL_SIZE_T size;
|
||||
{
|
||||
return sm_malloc((size_t) size);
|
||||
}
|
||||
@ -71,8 +77,8 @@ sm_sasl_malloc(size)
|
||||
|
||||
static void *
|
||||
sm_sasl_calloc(nelem, elemsize)
|
||||
unsigned long nelem;
|
||||
unsigned long elemsize;
|
||||
SM_SASL_SIZE_T nelem;
|
||||
SM_SASL_SIZE_T elemsize;
|
||||
{
|
||||
size_t size;
|
||||
void *p;
|
||||
@ -99,7 +105,7 @@ sm_sasl_calloc(nelem, elemsize)
|
||||
static void *
|
||||
sm_sasl_realloc(o, size)
|
||||
void *o;
|
||||
unsigned long size;
|
||||
SM_SASL_SIZE_T size;
|
||||
{
|
||||
return sm_realloc(o, (size_t) size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user