public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Revert "Fix __getreent function for Cygwin"
Date: Thu, 18 Aug 2016 13:25:00 -0000	[thread overview]
Message-ID: <20160818132513.13728.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3bbc40af2aa41c12e73ac4f6bc1b9c56554e59c6

commit 3bbc40af2aa41c12e73ac4f6bc1b9c56554e59c6
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Aug 18 14:26:42 2016 +0200

    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>

Diff:
---
 newlib/libc/reent/getreent.c          | 7 +------
 winsup/cygwin/include/cygwin/config.h | 3 +--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
index 1769232..60ae6fb 100644
--- a/newlib/libc/reent/getreent.c
+++ b/newlib/libc/reent/getreent.c
@@ -1,4 +1,5 @@
 /* default reentrant pointer when multithread enabled */
+
 #include <_ansi.h>
 #include <reent.h>
 
@@ -9,11 +10,5 @@
 struct _reent *
 _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;
-#endif
 }
diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h
index 585a256..c09641e 100644
--- a/winsup/cygwin/include/cygwin/config.h
+++ b/winsup/cygwin/include/cygwin/config.h
@@ -42,7 +42,7 @@ extern "C" {
 #include "../tlsoffsets.h"
 #endif
 __attribute__((gnu_inline))
-extern inline struct _reent *__inline_getreent (void)
+extern inline struct _reent *__getreent (void)
 {
   register char *ret;
 #ifdef __x86_64__
@@ -52,7 +52,6 @@ extern inline struct _reent *__inline_getreent (void)
 #endif
   return (struct _reent *) (ret + tls_local_clib);
 }
-#define __getreent()	__inline_getreent()
 #endif  /* _COMPILING_NEWLIB */
 
 #ifdef __x86_64__


                 reply	other threads:[~2016-08-18 13:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160818132513.13728.qmail@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).