summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-09 10:40:59 +0100
committerwm4 <wm4@nowhere>2014-11-09 10:40:59 +0100
commitdc054a1fdb1e9145e905612f296bbafd5ba7b530 (patch)
treed6bf23c9bc0ceacb8e5586eab94b340a028422af
parent0e8772a3bdca491230c90d3c9c7ab2ac5c18c2e7 (diff)
downloadlibass-dc054a1fdb1e9145e905612f296bbafd5ba7b530.tar.bz2
libass-dc054a1fdb1e9145e905612f296bbafd5ba7b530.tar.xz
Provide SIZE_MAX fallback
SIZE_MAX is in C99, but not in C89. It is in <stdint.h>, and is always a macro, so this fallback should be pretty portable and cause no issues.
-rw-r--r--libass/ass_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libass/ass_utils.h b/libass/ass_utils.h
index 36826d3..6ae7328 100644
--- a/libass/ass_utils.h
+++ b/libass/ass_utils.h
@@ -32,6 +32,10 @@
#include "ass.h"
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)-1)
+#endif
+
#define MSGL_FATAL 0
#define MSGL_ERR 1
#define MSGL_WARN 2