deprecated rand_r() calls removed();
log() disambiguation;
missing assert() header added;
portable endian.h header added (for visual studio);