summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-08-18 14:27:05 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-08-18 15:24:42 +0200
commit6f3943bca189a934a6a04576b9a83db625a87d9f (patch)
tree657aa20a6d3dd1700d71f74d36b76586f1443381
parent3bbc40af2aa41c12e73ac4f6bc1b9c56554e59c6 (diff)
downloadcygnal-6f3943bca189a934a6a04576b9a83db625a87d9f.tar.gz
cygnal-6f3943bca189a934a6a04576b9a83db625a87d9f.tar.bz2
cygnal-6f3943bca189a934a6a04576b9a83db625a87d9f.zip
Reinstantiate Cygwin function called `__getreent'
This partially reverts commit 10a30e7 as far as the Cygwin version of the __getreent function is concerned. Remove _COMPILING_NEWLIB guard only allowing to use __getreent inline function when building newlib, since we wan to use it in Cygwin as well. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Stefan Assmann <sassmann@redhat.com>
-rw-r--r--winsup/cygwin/include/cygwin/config.h2
-rw-r--r--winsup/cygwin/thread.cc7
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h
index c09641ed1..46c020897 100644
--- a/winsup/cygwin/include/cygwin/config.h
+++ b/winsup/cygwin/include/cygwin/config.h
@@ -35,7 +35,6 @@ extern "C" {
compute these offsets already exists for the sake of gendef so
we might as well just use it here. */
-#ifdef _COMPILING_NEWLIB
#ifdef __x86_64__
#include "../tlsoffsets64.h"
#else
@@ -52,7 +51,6 @@ extern inline struct _reent *__getreent (void)
#endif
return (struct _reent *) (ret + tls_local_clib);
}
-#endif /* _COMPILING_NEWLIB */
#ifdef __x86_64__
# define __SYMBOL_PREFIX
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index d9271fc4b..4414785ad 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -80,6 +80,13 @@ pthread_mutex::no_owner()
return res;
}
+#undef __getreent
+extern "C" struct _reent *
+__getreent ()
+{
+ return &_my_tls.local_clib;
+}
+
extern "C" void
__cygwin_lock_init (_LOCK_T *lock)
{