]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1234: Compile error when SIZE_MAX is not defined v9.1.1234
authorZoltan Arpadffy <zoltan.arpadffy@gmail.com>
Mon, 24 Mar 2025 19:31:12 +0000 (20:31 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 24 Mar 2025 19:33:08 +0000 (20:33 +0100)
Problem:  Compile error when SIZE_MAX is not defined
Solution: Define SIZE_MAX (Zoltan Arpadffy)

related: #16962

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/version.c
src/vim.h

index 00d10e86de41f233b28d23242b951ab7d420d7ff..89359fbe9663bc43341e234822cf4fd4c8538e2d 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1234,
 /**/
     1233,
 /**/
index dd04f6504300dfb61bfcb273161e0f51eb80334d..55b901132f182ba75e57fb48571470f66e016ea1 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
 # endif
 #endif
 
+// C89 does not define SIZE_MAX
+#if defined(__hpux) || defined(VMS)
+# ifndef SIZE_MAX
+#  define SIZE_MAX ((size_t)(-1))
+# endif
+#endif
+
 // user ID of root is usually zero, but not for everybody
 #ifdef __TANDEM
 # ifndef _TANDEM_SOURCE