From 02757ec3d0047ea7a719a7c0e6284335663b5496 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 7 Apr 2009 04:07:30 +0200 Subject: [PATCH] Fix unportable use of bit-fields. --- ChangeLog | 7 +++++++ lib/unicase/special-casing.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d08ee3ae4..bdb3e2f9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-04-06 Bruno Haible + 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 + Avoid test failures on AIX and OSF/1. * tests/unicase/test-u8-casefold.c (check): Account for the possibility that malloc(0) = NULL. diff --git a/lib/unicase/special-casing.h b/lib/unicase/special-casing.h index a702f0146..ab88b84d8 100644 --- a/lib/unicase/special-casing.h +++ b/lib/unicase/special-casing.h @@ -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]; -- 2.11.0