]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid compilation error on Solaris 7 with cc.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Jun 2011 15:49:56 +0000 (17:49 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Jun 2011 15:53:58 +0000 (17:53 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/msgl-fsearch.c

index e02c44fa331362ae8bf0c890a7421a1b54447afd..7ede0067047c92dd31ad2aef39e03ce811efaaf8 100644 (file)
@@ -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.
index d5cf71b65050a1b85939c4592096264ed9d9fa44..4cacf398c34783dba13d60086816c5e6be90abb5 100644 (file)
@@ -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.  */