#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #ifdef HAVE_WINDOWS_H # define WIN32_LEAN_AND_MEAN # include #endif #include "output.hh" using std::cout; using std::endl; using std::string; void output_string(const string &str){ /* Better to have some kind of HAVE_MESSAGEBOX, but that's not possible since: 1. MessageBox is a macro that is defined to MessageBoxA or MessageBoxW. 2. MessageBox{A,W} are called with the stdcall calling convention, mangling the names based on the parameters meaning that autoconf can't get this right. 3. We can't define the full prototype for MessageBox{A,W} since the parameters are typedef'd out the wazoo and our guess could well break on 64-bit Windows. */ #ifdef HAVE_WINDOWS_H MessageBox(NULL, str.c_str(), "Message", MB_OK|MB_ICONEXCLAMATION); #else cout << str << endl; #endif }