visual studio support

deprecated rand_r() calls removed();
log() disambiguation;
missing assert() header added;
portable endian.h header added (public domain license);