Types: make SilcUInt32 an unsigned int in most cases.
[silc.git] / lib / silcutil / silctypes.h
index 70bc30165b4a41c530fa8508a90788184c47dd71..d7f979766577c666ee2e5f6726ab4f2727bb28a4 100644 (file)
@@ -177,14 +177,14 @@ typedef signed short SilcInt16;
  *
  * SOURCE
  */
-#if SILC_SIZEOF_LONG == 4
-typedef unsigned long SilcUInt32;
-typedef signed long SilcInt32;
-#else
 #if SILC_SIZEOF_INT == 4
 typedef unsigned int SilcUInt32;
 typedef signed int SilcInt32;
 #else
+#if SILC_SIZEOF_LONG == 4
+typedef unsigned long SilcUInt32;
+typedef signed long SilcInt32;
+#else
 #if SILC_SIZEOF_LONG_LONG >= 4
 #ifndef WIN32
 typedef unsigned long long SilcUInt32;
@@ -634,4 +634,11 @@ do {                                               \
 #endif
 /***/
 
+typedef char __check_size1[sizeof(SilcInt8)   ==       1 ? 1 : -1];
+typedef char __check_size2[sizeof(SilcUInt8)  ==       1 ? 1 : -1];
+typedef char __check_size3[sizeof(SilcInt16)  ==       2 ? 1 : -1];
+typedef char __check_size4[sizeof(SilcUInt16) ==       2 ? 1 : -1];
+typedef char __check_size5[sizeof(SilcInt32)  ==       4 ? 1 : -1];
+typedef char __check_size6[sizeof(SilcUInt32) ==       4 ? 1 : -1];
+
 #endif /* SILCTYPES_H */