public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Assume that _IO_MTSAFE_IO is always defined in libio/stdfiles.c
Date: Tue, 19 Jun 2018 10:18:00 -0000	[thread overview]
Message-ID: <87po0n5bc2.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <mvmin6f9j3v.fsf@suse.de> (Andreas Schwab's message of "Tue, 19 Jun 2018 12:16:36 +0200")

* Andreas Schwab:

> On Jun 19 2018, Florian Weimer <fw@deneb.enyo.de> wrote:
>
>> Please look at the other patch:
>>
>>   <https://sourceware.org/ml/libc-alpha/2018-06/msg00543.html>
>
> And what do I see there?

The first hunk changes the definition of DEF_STDFILE:

| diff --git a/libio/stdfiles.c b/libio/stdfiles.c
| index 18e1172ad0..2435f412f2 100644
| --- a/libio/stdfiles.c
| +++ b/libio/stdfiles.c
| @@ -33,11 +33,19 @@
|  
|  #include "libioP.h"
|  
| +#ifdef SHARED
| +/* Place the variables defined below in a separate section for the
| +   interposition check in vtables.c.  */
| +# define STDFILE_SECTION __attribute__ ((section ("__libc_IO_stdfiles")))
| +#else
| +# define STDFILE_SECTION
| +#endif
| +
|  #define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|    static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|    static struct _IO_wide_data _IO_wide_data_##FD \
|      = { ._wide_vtable = &_IO_wfile_jumps }; \
| -  struct _IO_FILE_plus NAME \
| +  struct _IO_FILE_plus NAME STDFILE_SECTION \
|      = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
|         &_IO_file_jumps};

Without the cleanup, the change would have to happen in two places.

  reply	other threads:[~2018-06-19 10:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19  9:03 Florian Weimer
2018-06-19  9:14 ` Andreas Schwab
2018-06-19  9:17   ` Florian Weimer
2018-06-19  9:27     ` Andreas Schwab
2018-06-19  9:29       ` Florian Weimer
2018-06-19  9:31         ` Andreas Schwab
2018-06-19  9:57           ` Florian Weimer
2018-06-19 10:16             ` Andreas Schwab
2018-06-19 10:18               ` Florian Weimer [this message]
2018-06-19 10:30                 ` Andreas Schwab

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=87po0n5bc2.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    /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).