In addition to brhans' answer, you should define single SFR bits like this:
sbit led1 = P2^0; instead of this:
#define led1 P2^0 The syntax with ^ is an extension of Keil C51, and it is only allowed in such definitions.
You did this already for other bits.