Fix unportable use of bit-fields.
authorBruno Haible <bruno@clisp.org>
Tue, 7 Apr 2009 02:07:30 +0000 (04:07 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Apr 2009 02:07:30 +0000 (04:07 +0200)
ChangeLog
lib/unicase/special-casing.h

index d08ee3a..bdb3e2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-04-06  Bruno Haible  <bruno@clisp.org>
 
+       Fix unportable use of bit-fields.
+       * lib/unicase/special-casing.h (struct special_casing_rule): Change the
+       bit-field type from 'int' to 'signed int'. Otherwise Solaris cc,
+       AIX xlc, and OSF/1 cc interpret it as 'unsigned int'.
+
+2009-04-06  Bruno Haible  <bruno@clisp.org>
+
        Avoid test failures on AIX and OSF/1.
        * tests/unicase/test-u8-casefold.c (check): Account for the possibility
        that malloc(0) = NULL.
index a702f01..ab88b84 100644 (file)
@@ -38,7 +38,7 @@ struct special_casing_rule
   /*bool*/ unsigned int has_next : 1;
 
   /* Context.  */
-  int context : 7;
+  signed int context : 7;
 
   /* Language, or an empty string.  */
   char language[2];