From 4de58fe6fa1385f4754e3ecc27dc01f92ea73126 Mon Sep 17 00:00:00 2001
From: tg <tg@mirbsd.org>
Date: Tue, 7 Apr 2009 18:46:07 +0000
Subject: [PATCH] globalise SIZE_MAX definition

---
 lalloc.c | 10 +---------
 sh.h     |  9 ++++++++-
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/lalloc.c b/lalloc.c
index e6d23ee..8803038 100644
--- a/lalloc.c
+++ b/lalloc.c
@@ -1,14 +1,6 @@
 #include "sh.h"
 
-__RCSID("$MirOS: src/bin/mksh/lalloc.c,v 1.7 2009/03/24 18:34:39 tg Exp $");
-
-#ifndef SIZE_MAX
-#ifdef SIZE_T_MAX
-#define SIZE_MAX	SIZE_T_MAX
-#else
-#define SIZE_MAX	((size_t)-1)
-#endif
-#endif
+__RCSID("$MirOS: src/bin/mksh/lalloc.c,v 1.8 2009/04/07 18:46:07 tg Exp $");
 
 /* build with CPPFLAGS+= -DUSE_REALLOC_MALLOC=0 on ancient systems */
 #if defined(USE_REALLOC_MALLOC) && (USE_REALLOC_MALLOC == 0)
diff --git a/sh.h b/sh.h
index 8ba4563..01b12e2 100644
--- a/sh.h
+++ b/sh.h
@@ -102,7 +102,7 @@
 #define __SCCSID(x)	__IDSTRING(sccsid,x)
 
 #ifdef EXTERN
-__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.290 2009/04/07 18:41:37 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.291 2009/04/07 18:46:07 tg Exp $");
 #endif
 #define MKSH_VERSION "R37 2009/04/05"
 
@@ -182,6 +182,13 @@ typedef int bool;
 #ifndef PATH_MAX
 #define PATH_MAX	1024
 #endif
+#ifndef SIZE_MAX
+#ifdef SIZE_T_MAX
+#define SIZE_MAX	SIZE_T_MAX
+#else
+#define SIZE_MAX	((size_t)-1)
+#endif
+#endif
 #ifndef S_ISLNK
 #define S_ISLNK(m)	((m & 0170000) == 0120000)
 #endif