bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] isxdigit() in C++


From: Miroslav Lichvar
Subject: [Bug-readline] isxdigit() in C++
Date: Mon, 25 Jul 2011 17:36:53 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

there is a problem with the isxdigit macro when compiling a readline
code in C++. The original bug report with analysis is here:

https://bugzilla.redhat.com/show_bug.cgi?id=723299 


diff -up readline-6.2/chardefs.h.isxdigit readline-6.2/chardefs.h
--- readline-6.2/chardefs.h.isxdigit    2011-07-25 17:29:14.916721904 +0200
+++ readline-6.2/chardefs.h     2011-07-25 17:35:03.083899778 +0200
@@ -72,7 +72,7 @@
 #  define IN_CTYPE_DOMAIN(c) isascii(c)
 #endif
 
-#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT)
+#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus)
 #  define isxdigit(c)   (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 
'A' && (c) <= 'F'))
 #endif
 

Thanks,

-- 
Miroslav Lichvar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]