Add missing checks for SIZE_MAX
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/6ef989c8 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6ef989c8 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6ef989c8 Branch: refs/heads/master Commit: 6ef989c8ef723cb5907ce5395fdd302ef272846e Parents: 846c7cc Author: Nick Wellnhofer <[email protected]> Authored: Sun Nov 4 16:02:31 2012 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Mon Nov 12 20:42:04 2012 +0100 ---------------------------------------------------------------------- core/Lucy/Search/QueryParser.c | 4 ++++ modules/unicode/utf8proc/utf8proc.h | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/6ef989c8/core/Lucy/Search/QueryParser.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Search/QueryParser.c b/core/Lucy/Search/QueryParser.c index de2fc70..56152e6 100644 --- a/core/Lucy/Search/QueryParser.c +++ b/core/Lucy/Search/QueryParser.c @@ -37,6 +37,10 @@ #include "Lucy/Search/TermQuery.h" #include "Lucy/Search/Query.h" +#ifndef SIZE_MAX + #define SIZE_MAX ((size_t)-1) +#endif + #define SHOULD LUCY_QPARSER_SHOULD #define MUST LUCY_QPARSER_MUST #define MUST_NOT LUCY_QPARSER_MUST_NOT http://git-wip-us.apache.org/repos/asf/lucy/blob/6ef989c8/modules/unicode/utf8proc/utf8proc.h ---------------------------------------------------------------------- diff --git a/modules/unicode/utf8proc/utf8proc.h b/modules/unicode/utf8proc/utf8proc.h index 98b6ca3..d96f89e 100644 --- a/modules/unicode/utf8proc/utf8proc.h +++ b/modules/unicode/utf8proc/utf8proc.h @@ -79,6 +79,10 @@ enum {false, true}; extern "C" { #endif +#ifndef SIZE_MAX +#define SIZE_MAX ((size_t)-1) +#endif + #ifndef SSIZE_MAX #define SSIZE_MAX ((size_t)SIZE_MAX/2) #endif
