mirror of
https://github.com/partic2/libffi
synced 2026-11-11 02:27:19 +00:00
Various MSVC-related changes.
This commit is contained in:
committed by
Anthony Green
parent
e1539266e6
commit
0a1ab12a8d
@@ -25,6 +25,14 @@
|
||||
#define __UNUSED__
|
||||
#endif
|
||||
|
||||
/* Define __FASTCALL__ so that other compilers than gcc can run the tests. */
|
||||
#undef __FASTCALL__
|
||||
#if defined _MSC_VER
|
||||
#define __FASTCALL__ __fastcall
|
||||
#else
|
||||
#define __FASTCALL__ __attribute__((fastcall))
|
||||
#endif
|
||||
|
||||
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
|
||||
file open. */
|
||||
#ifdef HAVE_MMAP_ANON
|
||||
@@ -110,6 +118,15 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* MSVC kludge. */
|
||||
#if defined _MSC_VER
|
||||
#define PRIuPTR "lu"
|
||||
#define PRIu8 "u"
|
||||
#define PRId8 "d"
|
||||
#define PRIu64 "I64u"
|
||||
#define PRId64 "I64d"
|
||||
#endif
|
||||
|
||||
#ifdef USING_MMAP
|
||||
static inline void *
|
||||
allocate_mmap (size_t size)
|
||||
|
||||
Reference in New Issue
Block a user