Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in1
-rwxr-xr-xmono/metadata/threads.c3
-rw-r--r--winconfig.h4
3 files changed, 6 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 7379d27d42a..77da5ed7179 100644
--- a/configure.in
+++ b/configure.in
@@ -2146,6 +2146,7 @@ else
AC_CHECK_DECLS(InterlockedIncrement64, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(InterlockedAdd, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(InterlockedAdd64, [], [], [[#include <windows.h>]])
+ AC_CHECK_DECLS(__readfsdword, [], [], [[#include <windows.h>]])
fi
dnl socklen_t check
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 694993ad986..07f991ec838 100755
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -811,9 +811,8 @@ mono_thread_create (MonoDomain *domain, gpointer func, gpointer arg)
mono_thread_create_internal (domain, func, arg, FALSE, FALSE, 0);
}
-#if defined(HOST_WIN32) && defined(__GNUC__)
+#if defined(HOST_WIN32) && HAVE_DECL___READFSDWORD==0
static __inline__ __attribute__((always_inline))
-/* This is not defined by gcc */
unsigned long long
__readfsdword (unsigned long offset)
{
diff --git a/winconfig.h b/winconfig.h
index 834bbe7bfae..9d08af30e08 100644
--- a/winconfig.h
+++ b/winconfig.h
@@ -96,6 +96,10 @@
and to 0 if you don't. */
#define HAVE_DECL_INTERLOCKEDCOMPAREEXCHANGE64 1
+/* Define to 1 if you have the declaration of `__readfsdword',
+ and to 0 if you don't. */
+#define HAVE_DECL___READFSDWORD 1
+
/* Define to 1 if you have the <dirent.h> header file. */
/* #define HAVE_DIRENT_H 1 */