GNU Emacs 18.55 and AIX PS/2 1.1
Jonathan Hue
hue at netcom.UUCP
Thu Oct 12 15:27:01 AEST 1989
In article <34525 at srcsip.UUCP> carciofi at SRC.Honeywell.COM (Jim Carciofini) writes:
>#define HAVE_PTYS
>/* Hack to get around apparent bug in AIX C compiler? "regex.c" appears to
> assume that C will extend the sign bit when a char is cast to an int.
> AIX C V1.1 does not do this. This hack does not work when compiler
> optimizations are turned on. Is there a better way to do this? */
>#undef SIGN_EXTEND_CHAR
>#define SIGN_EXTEND_CHAR(x) ((signed char) x)
It's not a bug - chars are unsigned in the PS/2's compiler. It shouldn't
extend the sign when promoting to an int. When I brought up 18.52 I used
something like the following:
#define SIGN_EXTEND_CHAR(x) ((x) & 0x80 ? ((x) - 255) : (x))
-Jonathan
More information about the Comp.unix.aix
mailing list