svn commit: r243747 - stable/9/contrib/sendmail/src
Hajimu UMEMOTO
ume at FreeBSD.org
Sat Dec 1 11:03:20 UTC 2012
Author: ume
Date: Sat Dec 1 11:03:19 2012
New Revision: 243747
URL: http://svnweb.freebsd.org/changeset/base/243747
Log:
MFC r243649: cyrus-sasl 2.1.26 was released. In this version, the type
of callback functions was changed from "unsigned long" to "size_t".
Modified:
stable/9/contrib/sendmail/src/sasl.c
Directory Properties:
stable/9/contrib/sendmail/ (props changed)
Modified: stable/9/contrib/sendmail/src/sasl.c
==============================================================================
--- stable/9/contrib/sendmail/src/sasl.c Sat Dec 1 08:59:36 2012 (r243746)
+++ stable/9/contrib/sendmail/src/sasl.c Sat Dec 1 11:03:19 2012 (r243747)
@@ -24,9 +24,15 @@ SM_RCSID("@(#)$Id: sasl.c,v 8.22 2006/08
** 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);
}
More information about the svn-src-all
mailing list