utils: Define MAX_(U)INT_TYPE to the maximum size integer type available
authorMartin Willi <martin@revosec.ch>
Thu, 19 Mar 2015 15:29:06 +0000 (16:29 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 14 Apr 2015 10:03:57 +0000 (12:03 +0200)
src/libstrongswan/utils/utils.h

index bacea66..029a375 100644 (file)
@@ -410,6 +410,12 @@ typedef __int128 int128_t;
  * 128 bit wide unsigned integer, if supported
  */
 typedef unsigned __int128 u_int128_t;
+
+# define MAX_INT_TYPE int128_t
+# define MAX_UINT_TYPE u_int128_t
+#else
+# define MAX_INT_TYPE int64_t
+# define MAX_UINT_TYPE u_int64_t
 #endif
 
 typedef enum status_t status_t;