A terribly hacked version of exchndl.c from 
mingw-utils 0.3 (http://sourceforge.net/projects/mingw)
