Revert "Fix __getreent function for Cygwin"
This reverts commit 4de8596. It worked around a problem which was actually introduced by patch 10a30e7 a few weeks ago. Rather than adding special code to the newlib version of __getreent, the followup patch reinstantiates the original, Cygwin-only implementation of __getreent. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Stefan Assmann <sassmann@redhat.com>
This commit is contained in:
parent
eb61113daf
commit
3bbc40af2a
@ -1,4 +1,5 @@
|
|||||||
/* default reentrant pointer when multithread enabled */
|
/* default reentrant pointer when multithread enabled */
|
||||||
|
|
||||||
#include <_ansi.h>
|
#include <_ansi.h>
|
||||||
#include <reent.h>
|
#include <reent.h>
|
||||||
|
|
||||||
@ -9,11 +10,5 @@
|
|||||||
struct _reent *
|
struct _reent *
|
||||||
_DEFUN_VOID(__getreent)
|
_DEFUN_VOID(__getreent)
|
||||||
{
|
{
|
||||||
#ifdef __CYGWIN__
|
|
||||||
/* Utilize Cygwin's inline definition from include/cygwin/config.h
|
|
||||||
(note the extra underscore) */
|
|
||||||
return __inline_getreent ();
|
|
||||||
#else
|
|
||||||
return _impure_ptr;
|
return _impure_ptr;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ extern "C" {
|
|||||||
#include "../tlsoffsets.h"
|
#include "../tlsoffsets.h"
|
||||||
#endif
|
#endif
|
||||||
__attribute__((gnu_inline))
|
__attribute__((gnu_inline))
|
||||||
extern inline struct _reent *__inline_getreent (void)
|
extern inline struct _reent *__getreent (void)
|
||||||
{
|
{
|
||||||
register char *ret;
|
register char *ret;
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
@ -52,7 +52,6 @@ extern inline struct _reent *__inline_getreent (void)
|
|||||||
#endif
|
#endif
|
||||||
return (struct _reent *) (ret + tls_local_clib);
|
return (struct _reent *) (ret + tls_local_clib);
|
||||||
}
|
}
|
||||||
#define __getreent() __inline_getreent()
|
|
||||||
#endif /* _COMPILING_NEWLIB */
|
#endif /* _COMPILING_NEWLIB */
|
||||||
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user