[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why AC_C_CHAR_UNSIGNED?
From: |
Eric Blake |
Subject: |
Re: Why AC_C_CHAR_UNSIGNED? |
Date: |
Wed, 6 Aug 2008 15:26:08 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
> According to Ralf Wildenhues on 8/3/2008 11:53 PM:
> | No. The macro is not broken, don't fix it. When you receive a bug
> | report about a system where it is problematic, then fix it. Until
> | then, all you're doing is making life harder for users.
>
> I think the verdict is in. AC_C_CHAR_UNSIGNED will not be obsoleted in
> 2.63, unless someone points to a platform where the current implementation
> gets it wrong. However, I am still open to a doc patch that mentions the
> alternative of CHAR_MIN.
Here's what I'm committing. [I've also done a commit to resync various
upstream files, such as GNUmakefile].
From: Eric Blake <address@hidden>
Date: Wed, 6 Aug 2008 09:24:09 -0600
Subject: [PATCH] AC_C_CHAR_UNSIGNED is not strictly necessary.
* doc/autoconf.texi (C Compiler) <AC_C_CHAR_UNSIGNED>: Mention a
portable alternative to this macro.
* THANKS: Update.
Reported by Hallvard B Furuseth.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 6 ++++++
THANKS | 1 +
doc/autoconf.texi | 11 +++++++++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 155637b..ed7a915 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-08-06 Eric Blake <address@hidden>
+ AC_C_CHAR_UNSIGNED is not strictly necessary.
+ * doc/autoconf.texi (C Compiler) <AC_C_CHAR_UNSIGNED>: Mention a
+ portable alternative to this macro.
+ * THANKS: Update.
+ Reported by Hallvard B Furuseth.
+
Update some files from upstream.
* GNUmakefile: Update.
* build-aux/announce-gen: Likewise.
diff --git a/THANKS b/THANKS
index 912ec2c..7b903a9 100644
--- a/THANKS
+++ b/THANKS
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index b1b2a24..61cccca 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -6884,6 +6884,17 @@ if it accepts one of those, otherwise define @code
{inline} to be empty.
@cvindex __CHAR_UNSIGNED__
If the C type @code{char} is unsigned, define @code{__CHAR_UNSIGNED__},
unless the C compiler predefines it.
+
+These days, using this macro is not necessary. The same information can
+be determined by this portable alternative, thus avoiding the use of
+preprocessor macros in the namespace reserved for the implementation.
+
address@hidden
+#include <limits.h>
+#if CHAR_MIN == 0
+# define CHAR_UNSIGNED 1
+#endif
address@hidden example
@end defmac
@defmac AC_C_STRINGIZE
--
1.5.6.4