mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 550401: Do the __declspec import/export dance in mozalloc to avoid MSVC warnings. r=bsmedberg
This commit is contained in:
parent
24c35dec9d
commit
da9eaa48df
@ -48,6 +48,10 @@
|
||||
#include <stddef.h> // for size_t
|
||||
#include <stdlib.h> // for malloc, free
|
||||
|
||||
#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
|
||||
# define MOZALLOC_EXPORT __declspec(dllexport)
|
||||
#endif
|
||||
|
||||
// Make sure that "malloc" et al. resolve to their libc variants.
|
||||
#define MOZALLOC_DONT_DEFINE_MACRO_WRAPPERS
|
||||
#include "mozilla/mozalloc.h"
|
||||
|
@ -54,8 +54,11 @@
|
||||
* I.e., we don't #include <stdlib.h> or <new> on purpose.
|
||||
*/
|
||||
|
||||
#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
|
||||
# define MOZALLOC_EXPORT __declspec(dllexport)
|
||||
#if defined(MOZALLOC_EXPORT)
|
||||
// do nothing: it's been defined to __declspec(dllexport) by
|
||||
// mozalloc*.cpp on platforms where that's required
|
||||
#elif defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
|
||||
# define MOZALLOC_EXPORT __declspec(dllimport)
|
||||
#elif defined(HAVE_VISIBILITY_ATTRIBUTE)
|
||||
/* Make sure symbols are still exported even if we're wrapped in a
|
||||
* |visibility push(hidden)| blanket. */
|
||||
|
@ -46,6 +46,10 @@
|
||||
# include <unistd.h> // for _exit
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
|
||||
# define MOZALLOC_EXPORT __declspec(dllexport)
|
||||
#endif
|
||||
|
||||
#include "mozilla/mozalloc_oom.h"
|
||||
|
||||
static int gDummyCounter;
|
||||
|
@ -41,9 +41,11 @@
|
||||
#ifndef mozilla_mozalloc_oom_h
|
||||
#define mozilla_mozalloc_oom_h
|
||||
|
||||
|
||||
#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
|
||||
# define MOZALLOC_EXPORT __declspec(dllexport)
|
||||
#if defined(MOZALLOC_EXPORT)
|
||||
// do nothing: it's been defined to __declspec(dllexport) by
|
||||
// mozalloc*.cpp on platforms where that's required
|
||||
#elif defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
|
||||
# define MOZALLOC_EXPORT __declspec(dllimport)
|
||||
#elif defined(HAVE_VISIBILITY_ATTRIBUTE)
|
||||
/* Make sure symbols are still exported even if we're wrapped in a
|
||||
* |visibility push(hidden)| blanket. */
|
||||
|
@ -50,7 +50,10 @@
|
||||
# if defined(__cplusplus)
|
||||
# include NEW_H /* to give mozalloc std::bad_alloc */
|
||||
# endif
|
||||
# include <stdlib.h> /* to give mozalloc malloc/free decls */
|
||||
/* include these to avoid the macro wrappers causing these headers to
|
||||
* declare system functions with moz_ prefixes */
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include "mozilla/mozalloc.h"
|
||||
# include "mozilla/mozalloc_macro_wrappers.h"
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user