diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-06-24 03:17:00 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-06-24 03:17:00 +0000 |
commit | b65bb93e6711a3543228928e6793c49481df54d6 (patch) | |
tree | 18bfa0c975b200bc5db7719d827c8d04f910955e | |
parent | 3cb5b2112c21c0b7d4d044332b1e5ab60d2bdde2 (diff) | |
download | tigervnc-b65bb93e6711a3543228928e6793c49481df54d6.tar.gz tigervnc-b65bb93e6711a3543228928e6793c49481df54d6.zip |
Fix build issues with Visual C++ (implemented macro version of snprintf + re-ordered headers to ensure that winsock is included ahead of windows.h)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4527 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | vncviewer/CConn.cxx | 6 | ||||
-rw-r--r-- | vncviewer/DesktopWindow.cxx | 6 | ||||
-rw-r--r-- | vncviewer/DesktopWindow.h | 6 | ||||
-rw-r--r-- | vncviewer/OptionsDialog.cxx | 8 | ||||
-rw-r--r-- | vncviewer/Viewport.cxx | 10 | ||||
-rw-r--r-- | vncviewer/vncviewer.cxx | 6 | ||||
-rw-r--r-- | vncviewer/win32.h | 5 |
7 files changed, 33 insertions, 14 deletions
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index 5ae26f0b..8d233f05 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -18,7 +18,9 @@ */ #include <assert.h> +#ifndef _WIN32 #include <unistd.h> +#endif #include <rfb/CMsgWriter.h> #include <rfb/encodings.h> @@ -37,6 +39,10 @@ #include "i18n.h" #include "parameters.h" +#ifdef WIN32 +#include "win32.h" +#endif + using namespace rdr; using namespace rfb; using namespace std; diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 456e372f..859d2b63 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -21,9 +21,6 @@ #include <stdio.h> #include <string.h> -#include <FL/Fl_Scroll.H> -#include <FL/x.H> - #include <rfb/LogWriter.h> #include "DesktopWindow.h" @@ -31,6 +28,9 @@ #include "i18n.h" #include "parameters.h" +#include <FL/Fl_Scroll.H> +#include <FL/x.H> + #ifdef WIN32 #include "win32.h" #endif diff --git a/vncviewer/DesktopWindow.h b/vncviewer/DesktopWindow.h index 08483066..a190b700 100644 --- a/vncviewer/DesktopWindow.h +++ b/vncviewer/DesktopWindow.h @@ -22,13 +22,13 @@ #include <map> -#include <FL/Fl.H> -#include <FL/Fl_Window.H> - #include <rfb/Rect.h> #include "Viewport.h" +#include <FL/Fl.H> +#include <FL/Fl_Window.H> + class CConn; class DesktopWindow : public Fl_Window { diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx index abe6a89d..d3928b50 100644 --- a/vncviewer/OptionsDialog.cxx +++ b/vncviewer/OptionsDialog.cxx @@ -20,10 +20,6 @@ #include <list> -#include <FL/Fl_Tabs.H> -#include <FL/Fl_Button.H> -#include <FL/Fl_Return_Button.H> - #include <rdr/types.h> #include <rfb/encodings.h> @@ -38,6 +34,10 @@ #include "i18n.h" #include "parameters.h" +#include <FL/Fl_Tabs.H> +#include <FL/Fl_Button.H> +#include <FL/Fl_Return_Button.H> + using namespace std; using namespace rdr; using namespace rfb; diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index 8d57e9bd..80b48545 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -21,9 +21,6 @@ #include <stdio.h> #include <string.h> -#include <FL/fl_draw.H> -#include <FL/fl_ask.H> - #include <rfb/CMsgWriter.h> #include <rfb/LogWriter.h> @@ -46,6 +43,13 @@ #include "parameters.h" #include "keysym2ucs.h" +#include <FL/fl_draw.H> +#include <FL/fl_ask.H> + +#ifdef WIN32 +#include "win32.h" +#endif + using namespace rfb; using namespace rdr; diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx index b9e8ab56..41d3796c 100644 --- a/vncviewer/vncviewer.cxx +++ b/vncviewer/vncviewer.cxx @@ -1,6 +1,6 @@ /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. * Copyright 2011 Pierre Ossman <ossman@cendio.se> for Cendio AB - * Copyright (C) 2011 D. R. Commander + * Copyright (C) 2011 D. R. Commander. All Rights Reserved. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,6 +53,10 @@ #include "ServerDialog.h" #include "UserDialog.h" +#ifdef WIN32 +#include "win32.h" +#endif + rfb::LogWriter vlog("main"); using namespace network; diff --git a/vncviewer/win32.h b/vncviewer/win32.h index 0cc1c113..35be77b5 100644 --- a/vncviewer/win32.h +++ b/vncviewer/win32.h @@ -1,5 +1,6 @@ /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. * Copyright 2011 Pierre Ossman <ossman@cendio.se> for Cendio AB + * Copyright (C) 2011 D. R. Commander. All Rights Reserved. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +21,10 @@ #ifndef __VNCVIEWER_WIN32_H__ #define __VNCVIEWER_WIN32_H__ +#ifdef _MSC_VER +#define snprintf(str, n, format, ...) _snprintf_s(str, n, _TRUNCATE, format, __VA_ARGS__) +#endif + extern "C" { int win32_enable_lowlevel_keyboard(HWND hwnd); |