]> granicus.if.org Git - libass/commitdiff
Provide SIZE_MAX fallback
authorwm4 <wm4@nowhere>
Sun, 9 Nov 2014 09:40:59 +0000 (10:40 +0100)
committerwm4 <wm4@nowhere>
Sun, 9 Nov 2014 09:40:59 +0000 (10:40 +0100)
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.

libass/ass_utils.h

index 36826d3f6c48d745ab71fbcf4cfd62f84a21302a..6ae732871da7d57ec44bd672e8d17ee0079cdeeb 100644 (file)
 
 #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