Anthony, please revert this patch until Ram Pai provides a better version. It causes too many problems. At least it - breaks -pflash somefile -snapshot - breaks mingw32 build due to redefined _open - uses PATH_MAX rev3 does not fix any of the above. At this chance: there is at least one indention issue remaining in fill_token() which would be nice to fix while reworking the patch. Jan