Add reentrant declaration for C51 / C251.
Add test case to test compilation with Keil C251.
Fix remaining issues on C251.
Remove some compiler warnings for C251.
Improve Makefile.