CPT updates for Debian and Cygwin platform - 2

The pull requests list all the previous commits which were merged in the past. Let me know if I should send you patches instead, lest we have merging conflicts.