[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error compiling regex gnulib module with pgcc compiler
From: |
Paul Eggert |
Subject: |
Re: error compiling regex gnulib module with pgcc compiler |
Date: |
Tue, 10 Jan 2006 12:16:36 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Ralf Wildenhues <address@hidden> writes:
>> Thanks for checking that. Can you please run the following
>> program on that platform and send us the output? If it outputs
>> "preprocessor thinks BITSET_WORD_BITS = 64", then we have an
>> obvious fix to regex_internal.h. Thanks.
>
> Yes
OK, thanks, I installed the following patch into both gnulib and
coreutils. A pgcc maintainer wrote me that this should be fixed when
version 6.1-2 comes out, so I put that into the comment.
2006-01-10 Paul Eggert <address@hidden>
* regex_internal.h (BITSET_WORD_BITS):
Work around a bug in 64-bit PGC (before version 6.1-2), where the
preprocessor mishandles large unsigned values as if they were signed.
Problem reported by Claudio Fontana in
<http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
Index: regex_internal.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/regex_internal.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -p -u -r1.19 -r1.20
--- regex_internal.h 25 Sep 2005 04:20:16 -0000 1.19
+++ regex_internal.h 10 Jan 2006 20:14:43 -0000 1.20
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <address@hidden>.
@@ -182,6 +182,10 @@ typedef unsigned long int bitset_word;
# if BITSET_WORD_BITS <= SBC_MAX
# error "Invalid SBC_MAX"
# endif
+ #elif BITSET_WORD_MAX == (0xffffffff + 2) * 0xffffffff
+/* Work around a bug in 64-bit PGC (before version 6.1-2), where the
+ preprocessor mishandles large unsigned values as if they were signed. */
+# define BITSET_WORD_BITS 64
#else
# error "Add case for new bitset_word size"
#endif