mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1119776, Part 7: Avoid defining snprintf when MSVC provides it (other), r=bsmedberg
--HG-- extra : rebase_source : 3fc7e4e83f57252e15cf32846f23e497f8532ea5
This commit is contained in:
parent
29950a47ae
commit
1a3d2e92d2
@ -27,7 +27,9 @@
|
||||
// we want a wmain entry point
|
||||
#define XRE_DONT_SUPPORT_XPSP2 // See https://bugzil.la/1023941#c32
|
||||
#include "nsWindowsWMain.cpp"
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
|
@ -43,7 +43,9 @@
|
||||
#define XRE_DONT_SUPPORT_XPSP2
|
||||
#endif
|
||||
#include "nsWindowsWMain.cpp"
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
#include "BinaryPath.h"
|
||||
|
@ -70,8 +70,10 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#define spawnvp _spawnvp
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
//NOTE: this is for the stat *call* and the stat *struct*
|
||||
#define stat _stat
|
||||
#endif
|
||||
|
@ -21,9 +21,10 @@
|
||||
/* Windows configuration */
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
#define inline __inline
|
||||
#define strncasecmp strnicmp
|
||||
#if _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#define va_copy(a,b) ((a)=(b))
|
||||
|
||||
#endif
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "jsctypes-test.h"
|
||||
#include "jsctypes-test-finalizer.h"
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
#include <stdio.h>
|
||||
#include "typedefs.h"
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif // defined(XP_WIN)
|
||||
#endif
|
||||
|
||||
template <typename T> struct ValueTraits {
|
||||
static T literal() { return static_cast<T>(109.25); }
|
||||
|
@ -39,7 +39,9 @@
|
||||
#ifdef WIN32
|
||||
#define WIN32_LEAN_AND_MEAN // We only need minimal includes
|
||||
#include <windows.h>
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf // see comment in strutil.cc
|
||||
#endif
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "common/logging.h"
|
||||
#include "common/pathname_stripper.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
@ -46,7 +46,9 @@
|
||||
#include <io.h>
|
||||
#define PRIx64 "llx"
|
||||
#define PRIx32 "lx"
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#else // _WIN32
|
||||
#include <unistd.h>
|
||||
#define O_BINARY 0
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "x86_operand_list.h"
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "libdis.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "libdis.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "ia32_settings.h"
|
||||
extern ia32_settings_t ia32_settings;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
@ -45,6 +45,8 @@
|
||||
# define LOG_S "%S"
|
||||
# define NS_T(str) L ## str
|
||||
# define NS_SLASH NS_T('\\')
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
// On Windows, _snprintf and _snwprintf don't guarantee null termination. These
|
||||
// macros always leave room in the buffer for null termination and set the end
|
||||
// of the buffer to null in case the string is larger than the buffer. Having
|
||||
@ -62,6 +64,7 @@ static inline int mysnprintf(char* dest, size_t count, const char* fmt, ...)
|
||||
return result;
|
||||
}
|
||||
#define snprintf mysnprintf
|
||||
#endif
|
||||
static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, ...)
|
||||
{
|
||||
size_t _count = count - 1;
|
||||
|
@ -53,7 +53,7 @@ int sProfileEntries = 0;
|
||||
using std::string;
|
||||
using namespace mozilla;
|
||||
|
||||
#if _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "nsTArray.h"
|
||||
#include "nsUTF8Utils.h"
|
||||
|
||||
#if _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
// Self
|
||||
#include "ProfileEntry.h"
|
||||
|
||||
#if _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "nsStackWalk.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "nsStackWalk.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef XP_WIN
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
|
@ -40,7 +40,9 @@ static bool do_preload = false;
|
||||
#if defined(XP_WIN)
|
||||
#include <windows.h>
|
||||
#include <mbstring.h>
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
typedef HINSTANCE LibHandleType;
|
||||
|
||||
|
@ -8,7 +8,9 @@
|
||||
#include <stdlib.h>
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
|
@ -13,8 +13,10 @@
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strcasecmp _stricmp
|
||||
#define PATH_SEPARATOR_CHAR '\\'
|
||||
#define R_OK 04
|
||||
|
Loading…
Reference in New Issue
Block a user