Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2003 09:11:37 -0700 (PDT)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30311 for review
Message-ID:  <200305011611.h41GBbq4068524@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30311

Change 30311 by des@des.at.des.thinksec.com on 2003/05/01 09:11:15

	Some compilers (gcc at least) promote the integer literal 0x80000000
	to long, while enums are required to fit in an int.  To avoid the
	warning this causes, use (-0x7fffffff - 1) instead of 0x80000000.

Affected files ...

.. //depot/projects/openpam/include/security/pam_constants.h#20 edit

Differences ...

==== //depot/projects/openpam/include/security/pam_constants.h#20 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/openpam/include/security/pam_constants.h#19 $
+ * $P4: //depot/projects/openpam/include/security/pam_constants.h#20 $
  */
 
 #ifndef _PAM_CONSTANTS_H_INCLUDED
@@ -97,7 +97,8 @@
  * XSSO 5.4
  */
 enum {
-	PAM_SILENT			= 0x80000000,
+	/* some compilers promote 0x8000000 to long */
+	PAM_SILENT			= (-0x7fffffff - 1),
 	PAM_DISALLOW_NULL_AUTHTOK	= 0x1,
 	PAM_ESTABLISH_CRED		= 0x1,
 	PAM_DELETE_CRED			= 0x2,



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