PERFORCE change 30311 for review

Dag-Erling Smorgrav des at FreeBSD.org
Thu May 1 09:11:39 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=30311

Change 30311 by des at 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,


More information about the p4-projects mailing list