diff --git a/examples/osgsimulation/osgsimulation.cpp b/examples/osgsimulation/osgsimulation.cpp index 6aa58fd36..c5509b43a 100644 --- a/examples/osgsimulation/osgsimulation.cpp +++ b/examples/osgsimulation/osgsimulation.cpp @@ -16,7 +16,7 @@ * THE SOFTWARE. */ -#ifdef WIN32 +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) ///////////////////////////////////////////////////////////////////////////// // Disable unavoidable warning messages: diff --git a/src/osgDB/FileNameUtils.cpp b/src/osgDB/FileNameUtils.cpp index 39b4f5406..f67e527be 100644 --- a/src/osgDB/FileNameUtils.cpp +++ b/src/osgDB/FileNameUtils.cpp @@ -19,7 +19,9 @@ #include #ifdef WIN32 +#if !defined(__MINGW32__) #define _WIN32_WINNT 0x0500 +#endif #include #endif diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp index 1575efcaa..7d86b3788 100644 --- a/src/osgDB/FileUtils.cpp +++ b/src/osgDB/FileUtils.cpp @@ -34,7 +34,10 @@ typedef char TCHAR; #include // for _mkdir #define mkdir(x,y) _mkdir((x)) + +#if !defined(__MINGW32__) #define stat64 _stati64 +#endif // set up for windows so acts just like unix access(). #ifndef F_OK diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp index 29c87e3e9..73cae9fb4 100644 --- a/src/osgPlugins/zip/unzip.cpp +++ b/src/osgPlugins/zip/unzip.cpp @@ -2989,7 +2989,7 @@ int unzlocal_getByte(LUFILE *fin,int *pi) int unzlocal_getShort (LUFILE *fin,uLong *pX) { uLong x ; - int i; + int i = 0; int err; err = unzlocal_getByte(fin,&i); @@ -3009,7 +3009,7 @@ int unzlocal_getShort (LUFILE *fin,uLong *pX) int unzlocal_getLong (LUFILE *fin,uLong *pX) { uLong x ; - int i; + int i = 0; int err; err = unzlocal_getByte(fin,&i); diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index 7122ce4c9..f4b1bda19 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -1674,9 +1674,9 @@ static int ChooseMatchingPixelFormat( HDC hdc, int screenNum, const WGLIntegerAt 1, // version number PFD_DRAW_TO_WINDOW | // support window PFD_SUPPORT_OPENGL | // support OpenGL - DWORD(_traits->doubleBuffer ? PFD_DOUBLEBUFFER : NULL) | // double buffered ? - DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_COPY ? PFD_SWAP_COPY : NULL) | - DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_EXCHANGE ? PFD_SWAP_EXCHANGE : NULL), + DWORD(_traits->doubleBuffer ? PFD_DOUBLEBUFFER : 0) | // double buffered ? + DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_COPY ? PFD_SWAP_COPY : 0) | + DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_EXCHANGE ? PFD_SWAP_EXCHANGE : 0), PFD_TYPE_RGBA, // RGBA type BYTE(_traits->red + _traits->green + _traits->blue), // color depth BYTE(_traits->red), 0, BYTE(_traits->green), 0, BYTE(_traits->blue), 0, // shift bits ignored