Include pbd/localtime_r.h for mingw build
Use jack_native_thread_t for portability

Requires future attention in AudioEngine due to timbyr's use JACK2 extension to JACK API
Disable some non-portable code that is only used for debugging
Use PBD::pthread_name in debug output for portability
Use Glib::usleep for portability
Include pthread.h in butler.h for mingw build

Jack2 on windows doesn't include pthread headers so it is necessary
to include them explicitly.
Work around badly chosen argument name in giomm/dbusmessage.h

interface is defined in windows/mingw headers. hopefully this will
be fixed in giomm at some point and this crap can be removed
Use Glib functions to create tmp file path
Include pbd/timersub.h for mingw build
Use uint32_t type instead of uint
Disable checking for memory locking support on windows

not sure if this is needed on windows, can implement later in PBD
Change/improve enum as IN and OUT are defined via windows.h
Include pbd/localtime_r.h for mingw build
undef SearchPath where needed as it is defined via windows.h
Work around badly chosen argument name in  giomm/dbusmessage.h

interface is defined in windows/mingw headers. hopefully this will
be fixed in giomm at some point and this crap can be removed
Fix ambiguous type CheckMenuItem that is also defined via windows.h