Fixed some issues (OS flags, directives, type, ...). 

Hi,

Find 5 commits in that PR that fixe some issues.
Let me know if anything need to be changed.

Cheers,

Hugues.