patch 9.0.2138: Overflow logic requires long long
Problem: Overflow logic requires long long
Solution: Define vimlong_T data type to make life easier
for porters
closes: #13598
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/vim.h b/src/vim.h
index 6fb8978..7d0d128 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -435,6 +435,12 @@
*/
typedef unsigned int u8char_T; // int is 32 bits or more
+/*
+ * The vimlong_T has sizeof(vimlong_T) >= 2 * sizeof(int).
+ * One use is simple handling of overflow in int calculations.
+ */
+typedef long long vimlong_T;
+
#ifndef UNIX // For Unix this is included in os_unix.h
# include <stdio.h>
# include <ctype.h>