Various fixes, mostly to remove warnings from visual studio 8 and to make the implementation more clean on windows.
Marcelo Roberto Jimenez
Please read the comments I did on the first patch.
What I add here is that you should submit only one patch for each tracker issue, so that we can discuss each patch individually.
I will close this issue, please start a new one for each patch. Also, please modify your patches according to the recommendations I did on the first patch.