[gnome-keyring] [pkcs11] Make custom pkcs11 constants unsigned longs.



commit 1c6fc47e9abaaa25fa2bf2e081f3da81f08d31d4
Author: Stef Walter <stef memberwebs com>
Date:   Sat Oct 10 02:01:48 2009 +0000

    [pkcs11] Make custom pkcs11 constants unsigned longs.
    
    Make our custom PKCS#11 unsigned longs, which could otherwise
    be problematic on 64-bit platforms. See bug #595543

 pkcs11/pkcs11g.h |    6 +++---
 pkcs11/pkcs11i.h |    8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/pkcs11/pkcs11g.h b/pkcs11/pkcs11g.h
index e71d5a5..74b5b0f 100644
--- a/pkcs11/pkcs11g.h
+++ b/pkcs11/pkcs11g.h
@@ -26,9 +26,9 @@
 
 #include "pkcs11.h"
 
-#define CKA_GNOME (CKA_VENDOR_DEFINED | 0x474E4D45 /* GNME */ )
-#define CKO_GNOME (CKO_VENDOR_DEFINED | 0x474E4D45 /* GNME */ )
-#define CKR_GNOME (CKR_VENDOR_DEFINED | 0x474E4D45 /* GNME */ )
+#define CKA_GNOME (CKA_VENDOR_DEFINED | 0x474E4D45UL /* GNME */ )
+#define CKO_GNOME (CKO_VENDOR_DEFINED | 0x474E4D45UL /* GNME */ )
+#define CKR_GNOME (CKR_VENDOR_DEFINED | 0x474E4D45UL /* GNME */ )
 
 /* -------------------------------------------------------------------
  * OBJECT UNIQUE IDENTIFIER
diff --git a/pkcs11/pkcs11i.h b/pkcs11/pkcs11i.h
index 6d3cb7f..f980010 100644
--- a/pkcs11/pkcs11i.h
+++ b/pkcs11/pkcs11i.h
@@ -30,8 +30,8 @@
 /* Signifies that nobody is logged in */
 #define CKU_NONE G_MAXULONG
 
-#define CK_GNOME_MAX_SLOT                           (0x000000FF)
-#define CK_GNOME_MAX_HANDLE                         (((CK_ULONG)-1) >> 10)
+#define CK_GNOME_MAX_SLOT                           (0x000000FFUL)
+#define CK_GNOME_MAX_HANDLE                         (((CK_ULONG)-1UL) >> 10)
 
 /* -------------------------------------------------------------------
  * OBJECT HASH
@@ -45,10 +45,10 @@
  */
 
 /* Flag for CK_INFO when applications are supported */
-#define CKF_G_APPLICATIONS                       0x40000000
+#define CKF_G_APPLICATIONS                       0x40000000UL
 
 /* Call C_OpenSession with this when passing CK_G_APPLICATION */
-#define CKF_G_APPLICATION_SESSION                0x40000000
+#define CKF_G_APPLICATION_SESSION                0x40000000UL
 
 typedef CK_ULONG CK_G_APPLICATION_ID;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]