/* ** j3.c ** ** demonstrate problem encountered in python ** build of selectmodule.c where the POLLNVAL ** definition under AIX causes problems because ** of short->int promotion. ** */ #include #include int main(int argc, char **argv) { short ashort; ashort = POLLNVAL; printf("ashort (%%hx) = %hx, ashort (%%x) = %x\n", ashort, ashort); printf("POLLNVAL (%%hx) = %hx, POLLNVAL (%%x) = %x\n", POLLNVAL, POLLNVAL); printf("\n"); printf("ashort == POLLNVAL => %d\n", (ashort == POLLNVAL)); printf("ashort == (short)POLLNVAL => %d\n", (ashort == (short)POLLNVAL)); }