Enum fix to safe-ctype.h for gcc build with native cc on vax ultrix

John David Anglin dave@hiauly1.hia.nrc.ca
Thu Mar 1 12:39:00 GMT 2001


Please review.

-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-02-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* safe-ctype.h (_sch_test): Cast enum bit to short int for pcc
	compatibility.

--- safe-ctype.h.orig	Sat Dec 16 14:12:06 2000
+++ safe-ctype.h	Sun Feb 18 20:00:54 2001
@@ -69,7 +69,7 @@
 /* Character classification.  */
 extern const unsigned short _sch_istable[256];
 
-#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (bit))
+#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
 
 #define ISALPHA(c)  _sch_test(c, _sch_isalpha)
 #define ISALNUM(c)  _sch_test(c, _sch_isalnum)



More information about the Gcc-patches mailing list