diff options
author | Bruno Haible <bruno@clisp.org> | 2011-06-13 17:49:56 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-06-13 17:53:58 +0200 |
commit | a7f869070589ccec34dcc7aceb503d210bb03847 (patch) | |
tree | 9c6924c6e7097a2037934fcb4a63bce2ce30a30c | |
parent | 8604a93b5efc963bd26fd648b3b9367987e075bb (diff) | |
download | external_gettext-a7f869070589ccec34dcc7aceb503d210bb03847.zip external_gettext-a7f869070589ccec34dcc7aceb503d210bb03847.tar.gz external_gettext-a7f869070589ccec34dcc7aceb503d210bb03847.tar.bz2 |
Avoid compilation error on Solaris 7 with cc.
-rw-r--r-- | gettext-tools/src/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-tools/src/msgl-fsearch.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index e02c44f..7ede006 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2011-06-13 Bruno Haible <bruno@clisp.org> + + Avoid compilation error on Solaris 7 with cc. + * msgl-fsearch.c (SHORT_MSG_MAX): Define more directly with SunPRO C. + 2011-06-04 Bruno Haible <bruno@clisp.org> Avoid link error when linking statically on AIX 7. diff --git a/gettext-tools/src/msgl-fsearch.c b/gettext-tools/src/msgl-fsearch.c index d5cf71b..4cacf39 100644 --- a/gettext-tools/src/msgl-fsearch.c +++ b/gettext-tools/src/msgl-fsearch.c @@ -1,5 +1,5 @@ /* Fast fuzzy searching among messages. - Copyright (C) 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. This program is free software: you can redistribute it and/or modify @@ -182,7 +182,12 @@ add_index (index_list_ty list, index_ty idx) limit the search to lengths l' in the range l / (2 / FUZZY_THRESHOLD - 1) <= l' <= l * (2 / FUZZY_THRESHOLD - 1) Thus we need the list of the short strings up to length: */ -#define SHORT_MSG_MAX (int) (SHORT_STRING_MAX_BYTES * (2 / FUZZY_THRESHOLD - 1)) +#if !defined __SUNPRO_C +# define SHORT_MSG_MAX (int) (SHORT_STRING_MAX_BYTES * (2 / FUZZY_THRESHOLD - 1)) +#else +/* Sun C on Solaris 8 cannot compute this constant expression. */ +# define SHORT_MSG_MAX 28 +#endif /* A fuzzy index contains a hash table mapping all n-grams to their occurrences list. */ |