]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make it compile with Solaris cc.
authorBruno Haible <bruno@clisp.org>
Wed, 9 Feb 2005 11:21:03 +0000 (11:21 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:11 +0000 (12:12 +0200)
gettext-tools/libgrep/ChangeLog
gettext-tools/libgrep/dfa.c

index 6c830cb1f069e678cb528843b3531c5ac3dcf71e..88bdad0d25dcbd5fc6733e6188e33f7546a0fb3d 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-08  David Kaelbling  <drk@sgi.com>
+
+       * dfa.c (lex): Remove non-constant initializers.
+
 2005-02-08  Bruno Haible  <bruno@clisp.org>
 
        * kwset.h (kwsincr, kwsprep): Change return type to 'const char *'.
index b52ed633343899aa876ba9610eeecfd188127298..536f0aaface4b850b65248533b6010cac1b0e8e8 100644 (file)
@@ -1029,12 +1029,17 @@ lex (void)
                          setbit_case_fold (c, ccl);
                      } else {
                        /* POSIX locales are painful - leave the decision to libc */
-                       char expr[6] = { '[', c, '-', c2, ']', '\0' };
                        regex_t re;
+                       char expr[6]; /* = { '[', c, '-', c2, ']', '\0' }; */
+
+                       expr[0] = '['; expr[1] = c; expr[2] = '-';
+                       expr[3] = c2; expr[4] = ']'; expr[5] = '\0';
                        if (regcomp (&re, expr, case_fold ? REG_ICASE : 0) == REG_NOERROR) {
                          for (c = 0; c < NOTCHAR; ++c) {
-                           char buf[2] = { c, '\0' };
                            regmatch_t mat;
+                           char buf[2]; /* = { c, '\0' }; */
+
+                           buf[0] = c; buf[1] = '\0';
                            if (regexec (&re, buf, 1, &mat, 0) == REG_NOERROR
                                && mat.rm_so == 0 && mat.rm_eo == 1)
                               setbit_case_fold (c, ccl);