Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Dec 2012 11:12:04 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r243749 - stable/7/contrib/sendmail/src
Message-ID:  <201212011112.qB1BC4VZ095098@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ume
Date: Sat Dec  1 11:12:04 2012
New Revision: 243749
URL: http://svnweb.freebsd.org/changeset/base/243749

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/7/contrib/sendmail/src/sasl.c
Directory Properties:
  stable/7/contrib/sendmail/   (props changed)

Modified: stable/7/contrib/sendmail/src/sasl.c
==============================================================================
--- stable/7/contrib/sendmail/src/sasl.c	Sat Dec  1 11:08:46 2012	(r243748)
+++ stable/7/contrib/sendmail/src/sasl.c	Sat Dec  1 11:12:04 2012	(r243749)
@@ -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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212011112.qB1BC4VZ095098>