applied patch 430452 (mingw32 compilation fixes)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-06-05 20:32:09 +00:00
parent 0c71220c86
commit 7f017c64bb
5 changed files with 11 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Microsoft compiler loves underscores, feed them to it // Microsoft compiler loves underscores, feed them to it
#if defined( __VISUALC__ ) || defined( __GNUWIN32__ ) #if defined( __VISUALC__ ) || wxCHECK_W32API_VERSION( 0, 5 )
// functions // functions
#define wxClose _close #define wxClose _close
#define wxRead _read #define wxRead _read

View File

@@ -63,7 +63,8 @@
#define wxHAVE_TCHAR_FUNCTIONS #define wxHAVE_TCHAR_FUNCTIONS
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520) #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
#define wxHAVE_TCHAR_FUNCTIONS #define wxHAVE_TCHAR_FUNCTIONS
#elif defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 0, 6 ) // w32api isn't yet tchar safe, will be soon, this is a placeholder
#elif defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 10, 0 )
#define wxHAVE_TCHAR_FUNCTIONS #define wxHAVE_TCHAR_FUNCTIONS
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>

View File

@@ -201,7 +201,8 @@ extern int WXDLLEXPORT wxVsnprintf(wxChar *buf, size_t len,
int iLen = s.PrintfV(format, argptr); int iLen = s.PrintfV(format, argptr);
if ( iLen != -1 ) if ( iLen != -1 )
{ {
wxStrncpy(buf, s.c_str(), iLen); wxStrncpy(buf, s.c_str(), len);
buf[len-1] = wxT('\0');
} }
return iLen; return iLen;

View File

@@ -36,6 +36,9 @@
#ifdef __WIN32__ #ifdef __WIN32__
#if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS #if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS
#if wxCHECK_W32API_VERSION( 1, 0 )
#include <windows.h>
#endif
#include <shlobj.h> // for DROPFILES structure #include <shlobj.h> // for DROPFILES structure
#endif #endif
#else #else

View File

@@ -29,6 +29,9 @@
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
// standard headers // standard headers
#if wxCHECK_W32API_VERSION( 1, 0 )
#include <windows.h>
#endif
#include <rpc.h> // UUID related functions #include <rpc.h> // UUID related functions
#include "wx/msw/ole/uuid.h" #include "wx/msw/ole/uuid.h"